Shop OBEX P1 Docs P2 Docs Learn Events
Blinker on demo board: puzzler — Parallax Forums

Blinker on demo board: puzzler

rokickirokicki Posts: 1,000
edited 2006-05-19 01:08 in Propeller 1
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?

Comments

  • Phillip Y.Phillip Y. Posts: 62
    edited 2006-05-18 23:30
    P23,p22 are joined by 240 and 470 ohm resistors
    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.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-05-19 01:08
    The LEDs are shared with the VGA port, it is the 2 bit DAC resistors used for the VGA port thats causing this. As Phillip mentioned, setting the ports to output and driving them fixes this issue.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    1+1=10
Sign In or Register to comment.