pins wont go low!

reaperarch

New Member
hi, all.
im having a weird problem trying to control some leds.
if i say:

high 1
pause 1000
low 1
pause 1000
high 2
etc...

pin 1 doesn't turn off when the code hits low 1. it turns off when pin2 is supposed to go low! pin 2 only turns off when 4 goes low etc...

all other commands work fine. if anyone could help, it would be much appreciated.
ps: im using a 08m starter kit.
 

eclectic

Moderator
Reaperarch

1. What is the full program please.

2. How does it behave, when you run it in the Simulator?

3. Exactly how have you connected the LED's / resistors?

e
 

reaperarch

New Member
hi, thanks for the reply.
the full prog is:
l:
high 1
pause 1000
low 1
pause 1000
high 2
pause 1000
low 2 (pin1 turns off here)
pause 1000
high 4
pause 1000
low 4 (pin2 turns off here)
pause 1000
goto l

they're rgb leds with built in resistors (1-red,2-blue,4-green). the sim runs fine.
 
Last edited:

eclectic

Moderator
Sorry, I'm still a little bit confused.

1. The simulator is OK. Great.

2. The Program looks OK.


"they're rgb leds with built in resistors (1-red,2-blue,4-green)."

I don't quite understand that line

3. So, how exactly is everything connected?


I'm assuming your 08 board looks like the one in the pic.
 

Attachments

Last edited:

reaperarch

New Member
yep, thats the proto board.
pin 1 is red, 2 is green, 4 is blue
the leds are from sparkfun. they come in a strip of 3 with builtin smd resistors
 

hippy

Ex-Staff (retired)
It sounds like it could be a wiring issue or perhaps some confusion between common-cathode or common-anode.

You say when the pins turn a LED off, but which commands turn them on ?

Added : Dang ! My Crystal Ball is running just a little too slow today :)
 
Last edited:
Top