# Mega2560 max current question...........

I am sorry to be repeating a question that must get repeated often on the forums. I have been reading as much info as I can and just want to clarify if I am interpreting the first line of the following quote accurately. If i am reading this correctly does the author suggest tying all 4 x ground pins together and all 4 x 5v power pins together i.e. making a connection between them to allow me to draw up to 800mA max in my project? Or should I balance the power and ground distribution by splitting sections of my circuit according to the grouped pins? Any help would be greatly appreciated:

"Yes. Make sure that all Vcc, AVcc, and Gnd pins are connected. The device can handle 800mA that way.

You may have to spread them around a little:

Although each I/O port can sink more than the test conditions (20mA at VCC = 5V, 10mA at VCC = 3V) under steady state conditions (non-transient), the following must be observed:

ATmega640/1280/2560: 1.)The sum of all IOL, for ports J0-J7, A0-A7, G2 should not exceed 200 mA. 2.)The sum of all IOL, for ports C0-C7, G0-G1, D0-D7, L0-L7 should not exceed 200 mA. 3.)The sum of all IOL, for ports G3-G4, B0-B7, H0-B7 should not exceed 200 mA. 4.)The sum of all IOL, for ports E0-E7, G5 should not exceed 100 mA. 5.)The sum of all IOL, for ports F0-F7, K0-K7 should not exceed 100 mA.

If IOL exceeds the test condition, VOL may exceed the related specification. Pins are not guaranteed to sink current greater than the listed test condition.

1. Although each I/O port can source more than the test conditions (20mA at VCC = 5V, 10mA at VCC = 3V) under steady state conditions (non-transient), the following must be observed:

ATmega640/1280/2560: 1)The sum of all IOH, for ports J0-J7, G2, A0-A7 should not exceed 200 mA. 2)The sum of all IOH, for ports C0-C7, G0-G1, D0-D7, L0-L7 should not exceed 200 mA. 3)The sum of all IOH, for ports G3-G4, B0-B7, H0-H7 should not exceed 200 mA. 4)The sum of all IOH, for ports E0-E7, G5 should not exceed 100 mA. 5)The sum of all IOH, for ports F0-F7, K0-K7 should not exceed 100 mA.

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."

Bio1000: If i am reading this correctly does the author suggest tying all 4 x ground pins together and all 4 x 5v power pins together i.e. making a connection between them to allow me to draw up to 800mA max in my project?

All 4 GND/Vcc pins of what?

Bio1000: i.e. making a connection between them to allow me to draw up to 800mA max in my project?

800mA is the maximum current the voltage regulators on Arduinos can supply, but regulators also have a limit of Watts.

eg. If you put 12V into one it has to turn 7V of that into heat. It will overheat long before it ever reaches 800mA.

fungus:

Bio1000: If i am reading this correctly does the author suggest tying all 4 x ground pins together and all 4 x 5v power pins together i.e. making a connection between them to allow me to draw up to 800mA max in my project?

All 4 GND/Vcc pins of what?

Thanks for the reply Fungus, I was interpreting the following statement from the quote I posted to mean connecting the ground pins together and Vcc pins together on the mega2560 in the circuit to allow me to draw and sink the max current and am asking if this is correct or if I should split the circuit into sections and Vcc/ground them seperately to different pins based on their port grouping? The quote was this one:

Make sure that all Vcc, AVcc, and Gnd pins are connected. The device can handle 800mA that way.

I think it means "don't leave any of them unconnected".

fungus: I think it means "don't leave any of them unconnected".

Perfect, thanks for the clarification and apologies if the original question was unclear.

**edit, actually both scenarios I mentioned involved connecting all of them in one of two configurations. Which (if either) is correct or does it not make a difference to the circuit?

All VCC pins MUST connect to 5V, and all Gnd pins MUST connect to Gnd if you want the chip to be able to switch 800mA thru its IO pins. How you route VCC and GND on your board is up to you. Have a 0.1uF cap for each VCC pin, and AVcc pin, and Aref pin. Ideally you would have a GND plane that all pins connect to, and a fairly hefty trace connecting all the VCC/Avcc pins, unless you are adding extra filtering to the Avcc pin (i.e. a series inductor).

You need to connect all of the power/ground pins anyway, or the chip isn't guaranteed to work, since they all require proper decoupling right next to the pins. This is generally true of all logic chips where multiple power / ground pins are there to provide a low-inductance path the the PCB and provide signal return paths for nearby digital pins.