Current problem at digital pins


I bought a new arduino duemilanove on ebay from hong kong. everything was ok until i tried to wire my 7segment led displat to my arduino. i noticed that all leds besides i wired to digital13 lights a bit(even hard to see). i hooked up two high bright leds on d12 and d13. i mesuared the currents and the results was

d13:50mA d12:140uA

i cant see what the problem is. please help me :'(

by the way d13 voltage is about 4.95v without load. others about 4.80v without load


You can only take a maximum of 40mA from a pin.

Have you read this:-

i know it can provide maximum 40mA but i think that was about the tolerance thing. pin13 works great other digital pins provide under 1mA thats the problem

other digital pins provide under 1mA

Have you initialized the other pins as outputs. Pin 13 is an output by default the rest are inputs.

There is no tolerance on the 40mA it is the ABSOLUTE maximum,

I have had some issues previously using pin13 when properly defined...


i initialized every digital pin as output using this

void setup() {

  for (int thisPin = 1; thisPin < 14; thisPin++)  {
    pinMode(thisPin, OUTPUT);    
    digitalWrite(thisPin, HIGH);   

There is also a maximum current for all outputs combined. I don't recall the exact limit, but IIRC it's in the neighborhood of 200mA or 250mA.


IIRC it's in the neighborhood of 200mA or 250mA.

I think that's about right.

Possibly worse than that: see page 314, notes 1 through 4.