Electronic – IC Max IO Pin Current

currentintegrated-circuitmaximum-ratings

I was looking at the spec sheet for the ATTiny2313A microcontroller and it specifies an absolute maximum rating for the DC current through each IO pin at 40mA, and the maximum DC current through the ground/Vcc pins at 200mA.

I'm planning on using this micro controller to drive some LED displays, so there could be potentially a significant amount of current being sourced/sinked. I know I absolutely should keep the currents below the absolute maximum rating, but preferably I'd like to keep this below a recommended level, which unfortunately there's none listed.

The same goes for a variety of other IC circuits (logic shift registers, analog switches, multiplexers, etc.) I looked into using for driving the LED displays, which only list absolute maximum current ratings.

So my question is what is generally a good safety margin for different IC circuits which only list absolute maximum current ratings? Can I bump right up to 40 mA* and be perfectly safe? Or do I want a comfortable safety factor of 2x, 3x, etc.?

*note: I'm assuming I never actually exceed 40 mA, for example a 35 mA nominal value with a 5 mA variance.

post-note: I know that there exist specially designed constant-current LED drivers, however I think this is still a relevant question for driving other components.

Best Answer

Absolute maximum ratings are there to tell you what is (pretty much) guaranteed to damage your IC if exceeded, they are not recommended for normal use (notice the "at these or above..." in the first clip below)

All decent datasheets will have recommended operating conditions, which are the ones you want to go from rather than the absolute maximum values. For most small micros, 15-20mA is a typical maximum operating condition.

In the datasheet for your uC, it gives a table showing the OH and OL voltages over current, which both range up to 20mA. Note the voltage rise/drop at 20mA and you can see exceeding this will cause the OH and OL levels to go out of spec compatibility wise (example shown for 5V supply - things are different for 3.3V and 1.8V)
For example you can see at 25°C, the output low voltage is at around 0.5V @ 20mA (more with higher temp)
So, I would assume 20mA max for the outputs (at 5V - see other tables for 3.3V and 1.8V). Also take note of the little notes under the tables detailing the guaranteed hi/lo input values and combined current ratings.

Abs Max 1

Abs Max 2

Abs Max 3

Basically decide on your operating conditions (temp, voltage etc) read all the tables carefully and do the math to make sure you keep within specs.

If you are planning on driving some LED displays, either use an appropriately rated driver chip or add some discrete transistors on each pin to drive the LED. Unless you are only using a couple of low current indicator LEDs, this is generally the way to go.

Related Topic