Monday 30 July 2018

atmega - Real maximum current for ATmega328?


Everything I read says that the ATmega328 can provide 40mA per pin. However when I've measured the actual current provided by one pin it was showing 80mA. It was the same on every pin I tested. Anyone else noticed this? Or is it just unique to this specific one?



RM: ATMega328 datasheet



Answer



Summary:




  • You must distinguish between "guaranteed operating conditions" and "absolute maximum ratings". Also between current from an eg a logic high output pin at a usefully high voltage and short circuit current from a pin.




  • At 80 mA you are exposing the IC to conditions that exceeds the manufacturer's guarantees for product survival and the manufacturer explicitly advises that such practices may cause permanent damage to the IC.


    YMMV :-)







Operating and Absolute-maximum figures


Manufacturers publish data that tells you what conditions they guarantee a device will meet in practice when operating normally. They also publish absolute maximum ratings for a device, beyond which damage to the device may occur.


On pages 519 and 520 are tables that specify the voltage and current output conditions which Atmel guarantees. Not that as current increases the voltage drops due to increased voltage drop across the internal circuitry. They do not specify what current you can get when you load a high output pin down to almost 0 Volts - but you can be sure it would be more than the maximum guaranteed figure and that it would probably risk damaging the IC.


The most important specification with respect to your question is on page 317 of the ATmega328 datasheet


This says


29.1 Absolute Maximum Ratings*


DC Current per I/O Pin ................................................ 40.0mA



and



  • NOTICE Stresses beyond those listed under “Absolute Maximum Ratings” may cause permanent damage to the device. This is a stress rating only and functional operation of the device at these or other conditions beyond those indicated in the operational sections of this specification is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability.


"Absolute Maximum Ratings" are in all reputable data sheets and mean just what they say. They are the absolute maximum at which the device is guaranteed by the manufacturer not to suffer permanent damage at. Usually the guaranteed operating conditions are lower than the absolute maximum ratings.


You say that "you have tried this on every pin. Note the manufacturer's comment



  • Exposure to absolute maximum rating conditions for extended periods may affect device reliability.


Here "extended periods" is at the manufacturer's and Murphy's discretion.





Chances are you have not damaged the IC. But if you operate it at above maximum values you may. And if you operate it at above maximum operating values you may get misoperation in practice. "Proper" designs must always observe operating limits set by the manufacturer.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...