# Led blinking: How to glow 30 leds simultaneously using arduino mega?

Is it possible to glow around 30 leds at the same time using arduino mega?... All the leds are of 3mm two pin leds..

Mega2560 can support up to 800mA of IO current, as long as you spread the current over the ports per the Notes in 31.1 of the datasheet:

``````3. 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 200mA.

2.)The sum of all IOL, for ports C0-C7, G0-G1, D0-D7, L0-L7 should not exceed 200mA.

3.)The sum of all IOL, for ports G3-G4, B0-B7, H0-B7 should not exceed 200mA.

4.)The sum of all IOL, for ports E0-E7, G5 should not exceed 100mA.

5.)The sum of all IOL, for ports F0-F7, K0-K7 should not exceed 100mA.

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.

4. 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 200mA.

2)The sum of all IOH, for ports C0-C7, G0-G1, D0-D7, L0-L7 should not exceed 200mA.

3)The sum of all IOH, for ports G3-G4, B0-B7, H0-H7 should not exceed 200mA.

4)The sum of all IOH, for ports E0-E7, G5 should not exceed 100mA.

5)The sum of all IOH, for ports F0-F7, K0-K7 should not exceed 100mA.
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.
``````