If so, that's important to me for two reasons. So I can quit worrying about burning out my chip by shorting the pins, and so I can start worrying about other possible problems due to dirty wiring.
Data sheet implies 192mA can be drawn from an IO port pin.page 340 Figure 27-22https://www.sparkfun.com/datasheets/Components/SMD/ATMega328.pdfFigure 27-22.53 volts/20mA = 26 ohmsextrapolated by me...5v/26 ohm = 0.192 amps192 mA output current is possible at 25 degrees F......
26.1 Absolute Maximum Ratings*DC Current per I/O Pin ............................................... 40.0 mA*NOTICE: Stresses beyond those listed under "AbsoluteMaximum Ratings" may cause permanent damageto the device. This is a stress rating only andfunctional operation of the device at these orother conditions beyond those indicated in theoperational sections of this specification is notimplied. Exposure to absolute maximum ratingconditions for extended periods may affectdevice reliability.
Are you game to try 1 more experiment? Ie, connect a 100nF cap directly onto one of the I/O pins, and then measure the voltage and current with your same output pulses, :-).EDIT: actually, 2 more experiments. it would also be interesting to see the dynamic turn-on/off characteristics of the I/O pin outputs. Eg, connect a 125 ohm R to gnd from an I/O pin [5V/40mA = 125ohms], and just measure the basic turn-on/turn-off times, ie rise/fall times.
BillO, what you're saying is that the high spikes (hundreds of milliamps) you were seeing back on page 5 were probably caused by dirty setup, and once you cleaned up the setup the readings settled down to pretty much maxing out at 88 mA? And that's probably limited by the internal resistance of the output pins?
In any case, thanks for your work on this, everyone who contributed.
The increase of output "resistance" is caused by temperature dependency of the internal resistance of the channel (the T is the strongest factor I think). The power dissipation of the internal output structure (based on your measurement) will be P = 88mA ^2 * 56ohm = 0.43W that is huge (considering the size of the output transistor), so its temperature rises above 20mA current, definitely.
The increase of output "resistance" is caused by temperature dependency of the internal resistance of the channel (the T is the strongest factor I think). The power dissipation of the internal output structure (based on your measurement) will be P = 88mA ^2 * 56ohm = 0.43W that is huge (considering the size of the output transistor), so its temperature rises above 20mA current, definitely. The power dissipated at 20mA (based on your measurement):P = 20mA ^2 * 25ohm = 0.01W
0.43W is high, but I was not drawing it for any longer than about 7.8x10-6 seconds at a time.
you can see that the exponential component begins to dominate shortly after 40mA indicating that the output MOSFET is actually going into to overload at that point.
So there we have it, the myth is just that, a myth and totally ungrounded in fact. Even if all the measurements were off by a factor of two, the fact is, you can run any reasonably sane logic level MOSFET directly off the pin of and Arduino till the cows come home, PWM or not. Where this myth came from is anyone's guess, but if you believe in it, you have my pity.