Content originally posted in LPCWare by bladerunner on Tue Mar 23 07:48:24 MST 2010
Quote: xpresso
From the data sheet it quotes the sink/source for normal pins to be 4ma with at 0.4 volts. This implies a worst case internal FET resistance of 100 ohms. (0.4v/4ma = 100 ohms)
The short circuit current is specified as -45 and 50 ma. Again this Implies about a 100 ohm internal FET.
Note 14 on short circuit current:
[14]Allowed as long as the current limit does not exceed the maximum current allowed by the device.
From these specs one can see that it is possible to get say 10ma from several normal pins to direct drive an LED. The total number of will be limited by the 100ma limit on the supply and ground pins. The micro uses 17ma at 72 MHz. This leaves 83ma for current leaving other pins.
For example you could drive 8 LEDs a 10ma. For a 3.3 volt supply the external current limiting resistor will be about 47 ohms assuming a 1.8 volt drop on the LED.
Many high efficiency LEDs will look fine with less than 10ma, so more could be driven.
Another option to get higher current drive would be to parallel several ports. If you needed to drive 80ma into one LED you could use 8 ports, the defective output resistance would be about 12.5 ohms.
Nicely put. Just want to add that many high-brightness, low-current LED's run just fine on 2mA-3mA. So very easy to drive even without a "strong" pin buffer. Regards :)