Blinker on demo board: puzzler
rokicki
Posts: 1,000
Here's a fun puzzle for those with a demo board.
Frequently I will run my demo board connected to nothing more than the PC (through USB) and whatever
hardware I'm trying to figure out (just to minimize the number of cables). For this reason, I want to use
the built-in eight LEDs to debug.
So I coded the simplest blinker program that sets say P23 as an output, and blinks it. I was a little
surprised to see not only the top LED but the one below it blinked!
Thinking something might be wrong, I tried P21. Same thing, the LED below it also blinked.
Yet when I tried P17, it blinked alone, with no other LEDs blinking. This made me think my propeller
chip had been damanged somehow.
But, with a tiny bit of effort, I have figured out why this happened. Nothing is wrong with my demo
board. Can you figure out why this happened?
Frequently I will run my demo board connected to nothing more than the PC (through USB) and whatever
hardware I'm trying to figure out (just to minimize the number of cables). For this reason, I want to use
the built-in eight LEDs to debug.
So I coded the simplest blinker program that sets say P23 as an output, and blinks it. I was a little
surprised to see not only the top LED but the one below it blinked!
Thinking something might be wrong, I tried P21. Same thing, the LED below it also blinked.
Yet when I tried P17, it blinked alone, with no other LEDs blinking. This made me think my propeller
chip had been damanged somehow.
But, with a tiny bit of effort, I have figured out why this happened. Nothing is wrong with my demo
board. Can you figure out why this happened?
Comments
P21,P20 are joined by 240 and 470 ohm resistors
P19,P18 are joined by 240 and 470 ohm resistors
P17 seperate
P16 seperate
If you only make one pin an output, when 1 is output it will flow through the resistors and make the other led come on.
If you make both pins outputs and output a 1 and a 0 only one will come on.
Phillip Y.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
1+1=10