Skip to main content

Board pinout

Arduino Mega 2560 Pinout

Massive I/O for projects that outgrow the Uno: LED walls, CNC, and lots of sensors at once. It runs at 5V logic with 70 usable GPIO pins. Every value below is verified against the pin map Banana Board uses to check real designs.

MCU
AVR
Logic
5V
GPIO
70
PWM
15
Analog
17
Ground pins
5

Interfaces

PWM pins15 pins
Analog inputs17 pins

Watch out for

Input-only: RESET. These read signals but cannot drive an output and have no internal pull-up.

5V logic: safe with 5V sensors and modules, but level-shift when talking to 3.3V-only parts.

Pins by capability

A quick map of which pins do what. Colours match the pin table below.

Power
VIN5V5V5V3V3IOREF
Ground
GNDGNDGNDGNDGND
PWM
D2D3D4D5D6D7D8D9D10D11D12D13D44D45D46
Analog / ADC
AREFA0A1A2A3A4A5A6A7A8A9A10A11A12A13A14A15
Input-only
RESET

Starter circuits to learn with

Beginner projects for the Arduino Mega 2560. The pins below come straight from its real pin map, so they are safe to wire as shown.

Blink an LED

D0

Drive an LED (through a ~220Ω resistor) from D0 and toggle it in loop(). The classic first sketch.

digitalWrite()

Fade an LED (PWM)

D2

Use D2 with analogWrite() to smoothly ramp an LED from off to full brightness.

analogWrite()

Read a potentiometer

AREF

Wire a potentiometer's wiper to AREF and read its position with analogRead().

analogRead()

Read a button

D1

Connect a push button between D1 and GND, set the pin to INPUT_PULLUP, and skip the external resistor.

digitalRead() + INPUT_PULLUP

Try it without the hardware

Describe one of these circuits in the Studio and the Arduino Mega 2560 runs a true in-browser simulation (avr8js): watch your loop() drive the LED or read the input before you touch a breadboard.

Build & simulate in the Studio

Full Arduino Mega 2560 pin map

PinGPIOCapabilitiesVoltageNotes
VINPowerUnregulated external supply input (7-12V recommended).
5VPower5VRegulated 5V rail (power header).
5VPower5VRegulated 5V rail (digital header).
5VPower5VRegulated 5V rail (digital header).
3V33.3VPower3.3V3.3V output from onboard regulator (~50mA max).
IOREFPower5VI/O reference voltage output (5V); shields read this to detect logic level.
GNDGND
GNDGND
GNDGND
GNDGND
GNDGND
RESETRSTinput-onlyDigital inActive-LOW reset input; pull to GND to reset the ATmega2560.
AREFAnalogExternal analog reference voltage for the ADC.
D00 RX00serial0-rxDigitalSerial0 RX (shared with USB)
D11 TX01serial0-txDigitalSerial0 TX (shared with USB)
D222DigitalPWM
D333DigitalPWM
D444DigitalPWM
D555DigitalPWM
D666DigitalPWM
D777DigitalPWM
D888DigitalPWM
D999DigitalPWM
D101010DigitalPWM
D111111DigitalPWM
D121212DigitalPWM
D1313 LED_BUILTIN13DigitalPWMBuilt-in LED
D1414 TX314serial3-txDigitalSerial3 TX
D1515 RX315serial3-rxDigitalSerial3 RX
D1616 TX216serial2-txDigitalSerial2 TX
D1717 RX217serial2-rxDigitalSerial2 RX
D1818 TX118serial1-txDigitalSerial1 TX
D1919 RX119serial1-rxDigitalSerial1 RX
D2020 SDA20sdaDigitalHardware I2C SDA (default Wire)
D2121 SCL21sclDigitalHardware I2C SCL (default Wire)
D222222Digital
D232323Digital
D242424Digital
D252525Digital
D262626Digital
D272727Digital
D282828Digital
D292929Digital
D303030Digital
D313131Digital
D323232Digital
D333333Digital
D343434Digital
D353535Digital
D363636Digital
D373737Digital
D383838Digital
D393939Digital
D404040Digital
D414141Digital
D424242Digital
D434343Digital
D444444DigitalPWM
D454545DigitalPWM
D464646DigitalPWM
D474747Digital
D484848Digital
D494949Digital
D5050 MISO50misoDigitalHardware SPI MISO
D5151 MOSI51mosiDigitalHardware SPI MOSI
D5252 SCK52sckDigitalHardware SPI SCK
D5353 SS53csDigitalHardware SPI SS/CS
A054 D5454ADCDigitalADC0
A155 D5555ADCDigitalADC1
A256 D5656ADCDigitalADC2
A357 D5757ADCDigitalADC3
A458 D5858ADCDigitalADC4
A559 D5959ADCDigitalADC5
A660 D6060ADCDigitalADC6
A761 D6161ADCDigitalADC7
A862 D6262ADCDigitalADC8
A963 D6363ADCDigitalADC9
A1064 D6464ADCDigitalADC10
A1165 D6565ADCDigitalADC11
A1266 D6666ADCDigitalADC12
A1367 D6767ADCDigitalADC13
A1468 D6868ADCDigitalADC14
A1569 D6969ADCDigitalADC15

83 of 83 pins shown. Data verified against the board pin map Banana Board uses to check every design.

AI PCB designer

Design an Arduino Mega 2560 PCB from a sentence

Describe your Arduino Mega 2560 project and Banana Board wires it to these exact pins, validates it, then places and routes a fab-ready 2-layer board.

Start vibe PCB designing

Frequently asked questions

Is the Arduino Mega 2560 3.3V or 5V logic?

The Arduino Mega 2560 runs at 5V logic. Its I/O pins output and tolerate 5V, so it interfaces directly with 5V sensors and modules, but you must level-shift when talking to 3.3V-only parts.

How many GPIO pins does the Arduino Mega 2560 have?

The Arduino Mega 2560 exposes 70 usable GPIO pins, plus 6 power and 5 ground pins.

Which pins are PWM-capable on the Arduino Mega 2560?

Most GPIO pins on the Arduino Mega 2560 can output PWM (15 pins in total).

How many analog (ADC) inputs does the Arduino Mega 2560 have?

The Arduino Mega 2560 has 17 ADC-capable pins: 17 pins (AREF, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, and more).

Which pins on the Arduino Mega 2560 are input-only?

RESET are input-only. They can read digital or analog signals but cannot drive an output and have no internal pull-up or pull-down.

Build it, do not just look it up

Describe your circuit in one sentence and Banana Board wires it to these exact pins, validates it, and lays out a fab-ready PCB.

Start building free