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.
Interfaces
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.
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
D0Drive an LED (through a ~220Ω resistor) from D0 and toggle it in loop(). The classic first sketch.
digitalWrite()
Fade an LED (PWM)
D2Use D2 with analogWrite() to smoothly ramp an LED from off to full brightness.
analogWrite()
Read a potentiometer
AREFWire a potentiometer's wiper to AREF and read its position with analogRead().
analogRead()
Read a button
D1Connect 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.
Full Arduino Mega 2560 pin map
| Pin | GPIO | Capabilities | Voltage | Notes |
|---|---|---|---|---|
| VIN | — | Power | — | Unregulated external supply input (7-12V recommended). |
| 5V | — | Power | 5V | Regulated 5V rail (power header). |
| 5V | — | Power | 5V | Regulated 5V rail (digital header). |
| 5V | — | Power | 5V | Regulated 5V rail (digital header). |
| 3V33.3V | — | Power | 3.3V | 3.3V output from onboard regulator (~50mA max). |
| IOREF | — | Power | 5V | I/O reference voltage output (5V); shields read this to detect logic level. |
| GND | — | GND | — | — |
| GND | — | GND | — | — |
| GND | — | GND | — | — |
| GND | — | GND | — | — |
| GND | — | GND | — | — |
| RESETRSTinput-only | — | Digital in | — | Active-LOW reset input; pull to GND to reset the ATmega2560. |
| AREF | — | Analog | — | External analog reference voltage for the ADC. |
| D00 RX0 | 0 | serial0-rxDigital | — | Serial0 RX (shared with USB) |
| D11 TX0 | 1 | serial0-txDigital | — | Serial0 TX (shared with USB) |
| D22 | 2 | DigitalPWM | — | — |
| D33 | 3 | DigitalPWM | — | — |
| D44 | 4 | DigitalPWM | — | — |
| D55 | 5 | DigitalPWM | — | — |
| D66 | 6 | DigitalPWM | — | — |
| D77 | 7 | DigitalPWM | — | — |
| D88 | 8 | DigitalPWM | — | — |
| D99 | 9 | DigitalPWM | — | — |
| D1010 | 10 | DigitalPWM | — | — |
| D1111 | 11 | DigitalPWM | — | — |
| D1212 | 12 | DigitalPWM | — | — |
| D1313 LED_BUILTIN | 13 | DigitalPWM | — | Built-in LED |
| D1414 TX3 | 14 | serial3-txDigital | — | Serial3 TX |
| D1515 RX3 | 15 | serial3-rxDigital | — | Serial3 RX |
| D1616 TX2 | 16 | serial2-txDigital | — | Serial2 TX |
| D1717 RX2 | 17 | serial2-rxDigital | — | Serial2 RX |
| D1818 TX1 | 18 | serial1-txDigital | — | Serial1 TX |
| D1919 RX1 | 19 | serial1-rxDigital | — | Serial1 RX |
| D2020 SDA | 20 | sdaDigital | — | Hardware I2C SDA (default Wire) |
| D2121 SCL | 21 | sclDigital | — | Hardware I2C SCL (default Wire) |
| D2222 | 22 | Digital | — | — |
| D2323 | 23 | Digital | — | — |
| D2424 | 24 | Digital | — | — |
| D2525 | 25 | Digital | — | — |
| D2626 | 26 | Digital | — | — |
| D2727 | 27 | Digital | — | — |
| D2828 | 28 | Digital | — | — |
| D2929 | 29 | Digital | — | — |
| D3030 | 30 | Digital | — | — |
| D3131 | 31 | Digital | — | — |
| D3232 | 32 | Digital | — | — |
| D3333 | 33 | Digital | — | — |
| D3434 | 34 | Digital | — | — |
| D3535 | 35 | Digital | — | — |
| D3636 | 36 | Digital | — | — |
| D3737 | 37 | Digital | — | — |
| D3838 | 38 | Digital | — | — |
| D3939 | 39 | Digital | — | — |
| D4040 | 40 | Digital | — | — |
| D4141 | 41 | Digital | — | — |
| D4242 | 42 | Digital | — | — |
| D4343 | 43 | Digital | — | — |
| D4444 | 44 | DigitalPWM | — | — |
| D4545 | 45 | DigitalPWM | — | — |
| D4646 | 46 | DigitalPWM | — | — |
| D4747 | 47 | Digital | — | — |
| D4848 | 48 | Digital | — | — |
| D4949 | 49 | Digital | — | — |
| D5050 MISO | 50 | misoDigital | — | Hardware SPI MISO |
| D5151 MOSI | 51 | mosiDigital | — | Hardware SPI MOSI |
| D5252 SCK | 52 | sckDigital | — | Hardware SPI SCK |
| D5353 SS | 53 | csDigital | — | Hardware SPI SS/CS |
| A054 D54 | 54 | ADCDigital | ADC0 | — |
| A155 D55 | 55 | ADCDigital | ADC1 | — |
| A256 D56 | 56 | ADCDigital | ADC2 | — |
| A357 D57 | 57 | ADCDigital | ADC3 | — |
| A458 D58 | 58 | ADCDigital | ADC4 | — |
| A559 D59 | 59 | ADCDigital | ADC5 | — |
| A660 D60 | 60 | ADCDigital | ADC6 | — |
| A761 D61 | 61 | ADCDigital | ADC7 | — |
| A862 D62 | 62 | ADCDigital | ADC8 | — |
| A963 D63 | 63 | ADCDigital | ADC9 | — |
| A1064 D64 | 64 | ADCDigital | ADC10 | — |
| A1165 D65 | 65 | ADCDigital | ADC11 | — |
| A1266 D66 | 66 | ADCDigital | ADC12 | — |
| A1367 D67 | 67 | ADCDigital | ADC13 | — |
| A1468 D68 | 68 | ADCDigital | ADC14 | — |
| A1569 D69 | 69 | ADCDigital | ADC15 | — |
83 of 83 pins shown. Data verified against the board pin map Banana Board uses to check every design.
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.
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.