Digital Output Problem

While adding LEDs to digital outputs (to be turned on/off via code), there was a problem with ports 5 and 6. The LEDs in 1-4 were fine, but 5 & 6 were dim. The behaved normally, but were just dim. For now, I have them hooked to gnd and +5v of those ports (working at full brightness).
Any thoughts?

5-10 i believe are digital inputs unless you set them as outputs.

I have 1 - 6 set as dig. output, 7-10 as input, and the rest are output. 1 - 6 behave fine, and respond to code, it’s just that they are dim.

Are all the LEDs identical? The digital outputs cannot source much current (just a few mA). Some LEDs can light up OK with this much current, whereas others will barely come on.

If you swap one of the bright LEDs from port 1-4 into 5 or 6, is it dim or bright?

Cheers,

  • Dean

Do’h! I forgot that the outputs supply less amperes than the +5 connection. It’s the same story for each port. I think I’m gonna make a strip of MOSFETs and diodes for accessory control.
Thanks

I am powering an ultra bright LED via the digital output and it is driving very bright.

Did you put a resistor between the LED and the controller? If you don’t use a resistor the LED basically becomes a direct short. I hope you didn’t fry anything in your controller.

Check out this page for info on powering LEDs as well as a calculator for determining resistor values. I am using a 100 ohm resistor and it seems to be working fine.

Check out my wiki for more information.

Yeah- I always practice safe LEDing using my resistors. I found that page a while ago and it’s very nice. As for the MOSFETS, I ordered some (P-channel, crap, I needed N-channel, oh well) and have a nice PCB layout designed, but at $50+ for 3 boards, I think I’m gonna prototype it…