2
\$\begingroup\$

I'm using for some DIY project ATmega8-16PU, during the reading of the datasheet

(Datasheet Revision 2486AA–AVR–02/2013 )

I've encountered in section "Electrical Characteristics – TA = -40°C to 85°C" parameter, which is called "DC Current VCC and GND Pins". Value of this parameter is 300mA. I was looking in Internet for some meaningful interpretation of this parameter. What I found was however a lot of confusion on the topic. Here are three possible interpretation of this parameter, can you please tell me, which one is the right one.

  • 300mA is total current into all VCC and out of all GND pins.
  • 300mA is current into all VCC pins and there is 300mA out of all GND pins
  • 300mA is current into each VCC pin and 300mA is current out of each GND pin

The most reasonable explanation supporting last interpretation I found under following link:

Allowed current thru AVR devices

Depending on which interpretation is right one, I can e.g. change package type to TQFP in order to increase my current budget.

Please note that I don't want to exceed any Absolut Maximum Ratings, what I want however is to try out exceeding test conditions in datasheet.

\$\endgroup\$
2
\$\begingroup\$

To remove further confusion. There is only one Vcc pin.
AVcc is a different power domain only for the ADC Clock system and PORTC. Read the notes below the table.

This is the right answer:

300mA is total current into all VCC and out of all GND pins.

See also note 3.1

The sum of all IOL, for all ports, should not exceed 300mA.

and

The sum of all IOL, for ports C0 - C5 should not exceed 100mA.

Which is for Avcc, a special power domain for the analog part, not a normal Vcc.

The reason for these limits is the resistance in the leadframe and bondwire and metal layers on the chip itself. A high voltage over this resistance has negative effect on the capabilities of other pins. The voltage levels (VOL/VOH) and thresholds (VIH/VIL) may shift, possibly outside of the specification. It may also add more heat than the package can handle.

\$\endgroup\$
  • \$\begingroup\$ What about TQFP package, where are two VCC pins ? \$\endgroup\$ – Lazureus Aug 14 at 14:25
  • \$\begingroup\$ @Lazureus The rules in note 3 and 4 don't change. The odd thing is though, the 105c version allows more current per PORT, but less on the supply pins.... \$\endgroup\$ – Jeroen3 Aug 14 at 18:26
  • \$\begingroup\$ What do you mean by saying 105c version ? Please confirm also that I've understood your answer correctly on the following example. Let's assume that we're running uC at 16MHz and it draws 25mA. From your answer I understood that what's left to me is 250mA current budget, which I can freely use to source/sink current e.g. I can source current for 10 LEDs with 25mA but I cannot sink any current more. \$\endgroup\$ – Lazureus Aug 14 at 19:25
  • \$\begingroup\$ @Lazureus There are two versions. One rated up to 85C, and one for 105C, two different specification tables. With 25mA Icore you're left with 275mA current budget absolute maximum. Note that with 25 mA on a pin you'll be below 4.2V output. You chip might run hot when you run 250mA trough it. \$\endgroup\$ – Jeroen3 Aug 14 at 20:02
  • \$\begingroup\$ Yes, I know that there are two versions, but I wrote, which ATmega8 I mean, namely I meant ATmega8-16PU, which is up to 85C version. BTW "DC Current VCC and GND Pins" for 105C version is lower and equal to 200mA. Why are saying that I'm left with 275mA current budget, I thought that this 25mA of Icore must be calculated twice, once for VCC pin and 2nd for the GND pin. \$\endgroup\$ – Lazureus Aug 14 at 20:09
1
\$\begingroup\$

Edit: I read the link you posted, https://forum.arduino.cc/index.php?topic=161354.0, and it does contradict what I say here. It states that the limit is per pin. It appears to be a quote from an official support person, but the answer is so different from what I would have assumed that I would personally verify with their support again if I was going to be relying on it.

If you add the current going in to all of the VCC pins, it must be less than 300 mA. Also, if you add the current coming out of all of the GND pins, it must be less than 300 mA. (I don't understand the difference between your first and second bullet points.)

Also, be aware that these are absolute maximum ratings, and, as the datasheet says, "functional operation of the device at these or other conditions beyond those indicated in the operational sections of this specification is not implied." That means that even if you are running less than 300 mA, if you are violating some other parameter in the later tables, the part might be totally non-functional during that time, and possibly not until turning off the power to the part for a while. All that it means is that the part will not be immediately and irreversibly destroyed.

It is pretty unusual to want to "try out exceeding test conditions in datasheet" unless you really know what you are doing and working with a large enough sample size that you can have some confidence that you can push the parameter farther than the datasheet limits.

\$\endgroup\$
  • \$\begingroup\$ as far as I understood, you're saying that middle bullet point is right, so let me use the same example, which I gave to Jeroen3 answer. Let's assume that we're running uC at 16MHz and it draws 25mA. From your answer I understood that what's left to me is 275mA current budget for VCC pins and 275mA for GND pin. So I can then source 10 LEDs with 27,5mA current and sink current of value 27,5mA for another 10 LEDs. Please check also comment to answer from Jeroen3 in order to understand difference between 1st and 2nd bullet point. \$\endgroup\$ – Lazureus Aug 14 at 19:35
  • \$\begingroup\$ I think that is probably almost OK (assuming you know 25 mA is the max current the part will consume). However, strictly speaking the max guaranteed currents on the pins are 20 mA per pin based on some text in footnote 4, "If IOH exceeds the test condition, VOH may exceed the related specification. Pins are not guaranteed to source current greater than the listed test condition." It's a self-contradictory note, though, since it also says "each I/O port can source more than the test conditions." I guess they think "guaranteed" is a stronger statement than "can," but I don't like it. \$\endgroup\$ – Reinstate Monica Aug 14 at 19:54
  • \$\begingroup\$ Exactly because of this note "If IOH exceeds the test condition, VOH may exceed the related specification. Pins are not guaranteed to source current greater than the listed test condition." I wrote in question that I want to exceed test conditions by sourcing/sinking more that 20mA on the pin. What do you think then about quote from Atmel support ? According to it, with packages like TQFP, which have two VCC and GND current limit doubles as far as I understood. \$\endgroup\$ – Lazureus Aug 14 at 20:15
  • \$\begingroup\$ Personally, I think what you are proposing will likely be fine. However, I would personally not design a circuit driving more than a few LEDs directly from the Atmega, and probably only at 10 mA each, since I try not to run parts close to the datasheet limits if I don't have a very good reason (and I'm not working in an industry where size/cost/power matter very much). I would just put an extra buffer or LED driver chip on the board. Up to you how far you want to push it though. \$\endgroup\$ – Reinstate Monica Aug 14 at 20:18
1
\$\begingroup\$

I think you're missing a VERY important text in how you're reading the datasheet.

I think you found this on page 235:

enter image description here

The "electrical Characteristics" apply to the whole chapter so all tables in this chapter.

Now what you missed: Absolute Maximum Ratings

This section can be found in almost any datasheet and they relate to values that should never be exceeded. So that means, these values aren't for "normal operation", as you never want to come close to these values in normal operation.

Exceed these values and the chip might suffer permanent damage.

So "DC Current Vcc and GND Pins ... 300 mA" means that the current flowing into or out of any pin named Vcc or GND cannot exceed 300 mA. The direction of the current is not mentioned so it does not matter! If the direction of the current would matter then that would be mentioned.

Also: this is not for normal operation so there is no reason that the current has to flow in a certain direction. For example when ICs are tested after fabrication or tested in circuit after soldering it is possible to inject or draw a current to test the connection. That's not normal operation. In this test the current must be less than 300 mA.

\$\endgroup\$
  • \$\begingroup\$ as far as I understood, you're saying that middle bullet point is right, so let me use the same example, which I gave to Jeroen3 answer. Let's assume that we're running uC at 16MHz and it draws 25mA. From your answer I understood that what's left to me is 275mA current budget for VCC pins and 275mA for GND pin. So I can then source 10 LEDs with 27,5mA current and sink current of value 27,5mA for another 10 LEDs. What do you think then about this link to arduino forum, where someone quotes Atmel technical support? \$\endgroup\$ – Lazureus Aug 14 at 20:12
  • \$\begingroup\$ From your answer I understood that what's left to me is 275mA current budget So despite me saying that ...these values aren't for "normal operation", as you never want to come close to these values in normal operation. you're still going for the 300 mA? OK: if you think that that 300 mA is a "current budget" then really, you're doing this wrong. \$\endgroup\$ – Bimpelrekkie Aug 14 at 21:05
  • \$\begingroup\$ A properly used ATMega8 isn't supposed to draw more current than a couple of mA. If you want to power many LEDs then do like all experienced designers do: use MOSFETs to switch the LED currents. Use the ATMega to control the gates of the MOSFETs. But go ahead and use up that "300 mA current budget" just don't come complaining to me if your mcu dies prematurely! \$\endgroup\$ – Bimpelrekkie Aug 14 at 21:05
  • \$\begingroup\$ Ok, I get your point, but the thing is that I don't want to exceed Absolute Maximum Values, that's why I've asked this question and as far as I understood datasheet and your interpretation below configuration fulfills all conditions in datasheet: Icore 25mA, then Sourcing IOs: C0-C4 = 5*20mA=100mA, B0-B7=8*20mA=160mA, Sinking IOs: C5,C6= 2*20mA=40mA, D0-D7=8*20mA=160mA. \$\endgroup\$ – Lazureus Aug 15 at 7:10
  • \$\begingroup\$ Have you taken into account the power dissipation of all those outputs? These outputs aren't very "strong" so if you draw 20 mA from an output, there will be a voltage drop between VCC (or GND) and that output. That means power dissipation. That all adds up and heats up the IC. You might exceed the total power dissipation. Also, increased temperatures means the IC will age more quickly. Again: you're not doing this the way all experienced designers do this. That is your choice but note that there are reasons to use MOSFETs to switch those currents. \$\endgroup\$ – Bimpelrekkie Aug 15 at 16:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.