Go Down

Topic: Pins 2 and 3 can't light up an LED? (Read 529 times) previous topic - next topic

atmh

I'm in the beginning stages of my project (essentially a stopwatch) and I was starting off by getting my base code in place.  So far, I just have it light up a new LED in an array of LEDs every second.  The issue is that the first two LED's don't light up all that bright.  I know it's not the LED's because I've switched them out with ones I know work.  So I've tested it in a variety of methods and it seems overwhelmingly positive that it's something Arduino is doing.  So my question is as such:

do pins 2 and 3 have a resistor in them that is much higher than others?
can they not output the same voltage/current as the other pins?
could my Arduino be damaged?

I should note that the LED's DO light up, but not nearly as bright as they should, you can really only see it in low light.

Thanks!

kuuk

did you declare these pins as outputs? the atmega has internal resistors.


Code: [Select]

pinMode(2,OUTPUT);
pinMode(3,OUTPUT);


kuk

atmh

Yes, I did.  I did all the output pin declarations in the same place, those were the only two that were not working.

kuuk

i'm sorry. then i don't know. there's no extra resistors for these pins on the board http://www.arduino.cc/en/uploads/Main/Arduino-Diecimila-schematic.pdf

what kind of led matrix did you use? did you try to connect just one LED to pin 2 (or 3 ) and GND ? same effect?
maybe the problem is not the provided current but the current sinking on the other side (GND or corresponding pin in your matrix setup). this wouldn't explain anything but help to track down the problem.

i'm sure i've used LEDs on all pins without noticing differences.


Go Up