oPossum wrote:Get the ATmega 48/88/168/328 spec sheet directly from Atmel web site. .
Now THAT's a Spec. Funny how there's another spec document that doesn't say it's incomplete.
OK, the spec information is clear, then, for Digital Output pins up to 20 ma. There is no information on characteristics from 20 to 40 ma.
Since the reality is that there's a fet device turned on well, with a fairly constant On resistance, the curves probably extrapolate reasonable well.
The 328 has about .5 volts droop in both source and sink at 20ma. That means the R on is about 25 ohms.
It probably would have about 1.0 volts droop at 40ma. I'll test that soon.. BUT it would probably source or sink about 200ma in a short-circuit condition. That's about 1 watt in the output circuit area for the pin, and that sounds, technically speaking, Real Bad!
oPossum, I could not find any reference to a PER PORT maximum current in the spec, with quite a few searches. Can you point to that anywhere? I know I heard about it somewhere... The Spec. says maximum Vcc and Ground chip current is 200ma. So 10 pins at 20ma is at max that way. But that's still not a lot of power dissipation in the chip: each output pin drops .5V at 20ma so there's only 10 milliwatts dissipated on chip per pin.
I found this discussion on the Arduino Forum, which is related, but not cookbook!:http://www.arduino.cc/cgi-bin/yabb2/YaB ... 902243/all
ANYWAY, the only reason I care: Let's try to get some consensus on what Arduino users should to told about acceptable output pin currents. The 40ma the Arduino website talks about is a problem, and there's no mention of total current.
I just found another discussion here:http://www.arduino.cc/cgi-bin/yabb2/YaB ... 7338756/12
which interestingly has some earlier Atmel spec that shows the V-I characteristics in the "Beyond the absolute maximum" zone! The curves are fairly linear out to 2 volts internal drop and 70ma or so.
This all implies that if you connected a LED display that had 3.0 volts drop at 40ma and you connected it between two output pins, one of which was source and the other sink, AND you ran about 50% duty cycle, you'd have 1.0 volts drop in both source and sink, and a peak current of 40 ma and an average current of 20ma. Maybe that's skirting the edge of workability???
Any-ANYWAY, I also sent a note into Atmel and maybe we can all collaborate on language for the Arduino site that will keep users from getting into trouble..
Thanks for listening, if you're still awake :-)