Comparison

Arduino Uno R3 vs Arduino Mega 2560 R3

Same shield header layout, but on the Mega I2C and SPI sit on different pins.

The Arduino Uno R3 uses the ATmega328P, the Mega 2560 the ATmega2560. Both run at 16 MHz with 5 V logic, but the Mega has much more of everything: 256 KB instead of 32 KB of flash, 8 KB instead of 2 KB of SRAM, 54 instead of 14 digital pins (15 instead of 6 with PWM), 16 instead of 6 analog inputs and four hardware UARTs instead of one. The front part of its headers matches the Uno, so many shields fit both boards mechanically.

Electrically there are two classic pitfalls. On the Uno I2C is on A4 (SDA) and A5 (SCL), on the Mega on D20 (SDA) and D21 (SCL). Shields that take I2C from A4/A5 only work on the Mega if they use the separate SDA/SCL pins next to AREF. SPI is on D10 to D13 on the Uno and on D50 (MISO), D51 (MOSI), D52 (SCK) and D53 (SS) on the Mega. Shields that take SPI from the 6-pin ICSP header work on both boards. External interrupts are on D2 and D3 on the Uno, the Mega adds D18 to D21.

The tables below match the pins of both boards by signal and show where each interface is broken out.

Not pin-compatible

The pinouts differ. Use the tables below to rewire the signals.

Overview from the pinout data

PropertyArduino Uno R3Arduino Mega 2560 R3
ManufacturerArduinoArduino
TypeBoardBoard
Compared pinoutArduino Uno R3 Board Pinout (Digital, Analog & Power)x1 Stiftleisten Links & Rechts (Power, Analog & Digital)
Pins3250
Supply pinsIOREF, 3V3, 5V, VINIOREF, 3V3, 5V, VIN
Ground pins33
InterfacesADC, I2C, PWM, SPI, UARTADC, I2C, JTAG, PWM, SPI, UART

Interface pins

I2CArduino Uno R3Arduino Mega 2560 R3
SDA13 · A431 · SDA26 · D20 / SDA49 · D20 / SDA
SCL14 · A532 · SCL25 · D21 / SCL50 · D21 / SCL
SPIArduino Uno R3Arduino Mega 2560 R3
MOSI / COPI26 · D11~4 · COPI32 · D514 · COPI
MISO / CIPO27 · D121 · CIPO31 · D501 · CIPO
SCK28 · D133 · SCK33 · D523 · SCK
CS / SS25 · D10~34 · D53
UARTArduino Uno R3Arduino Mega 2560 R3
TX16 · D141 · ~D1 / TX043 · D14 / TX345 · D16 / TX2+1
RX15 · D042 · ~D0 / RX044 · D15 / RX346 · D17 / RX2+1
RTS––
CTS––

Pin number · pin name. "+n" = further pins with the same function.

Pin by pin

The pins are numbered differently, so they are matched by signal: 31 signals exist on both.

SignalArduino Uno R3Arduino Mega 2560 R3
IOREF2 · IOREF2 · IOREF
RESET3 · RESET3 · RESET
3V34 · 3V34 · 3V3
5V5 · 5V5 · 5V
GND6 · GND6 · GND
GND7 · GND7 · GND
VIN8 · VIN8 · VIN
A09 · A09 · A0
A110 · A110 · A1
A211 · A211 · A2
A312 · A312 · A3
A413 · A413 · A4
A514 · A514 · A5
D015 · D042 · ~D0 / RX0
D116 · D141 · ~D1 / TX0
D217 · D240 · ~D2
D3~18 · D3~39 · ~D3
D419 · D438 · ~D4
D5~20 · D5~37 · ~D5
D6~21 · D6~36 · ~D6
D722 · D735 · ~D7
D823 · D834 · ~D8
D9~24 · D9~33 · ~D9
D10~25 · D10~32 · ~D10
D11~26 · D11~31 · ~D11
D1227 · D1230 · ~D12
D1328 · D1329 · ~D13
GND29 · GND28 · GND
AREF30 · AREF27 · AREF
SDA31 · SDA26 · D20 / SDA
SCL32 · SCL25 · D21 / SCL

Only on Arduino Mega 2560 R3

15 · A616 · A717 · A818 · A919 · A1020 · A1121 · A1222 · A1323 · A1424 · A1543 · D14 / TX344 · D15 / RX345 · D16 / TX246 · D17 / RX247 · D18 / TX148 · D19 / RX149 · D20 / SDA50 · D21 / SCL

Further connectors

Arduino Uno R3

  • ATmega328P ICSP Programming Header (2x3 Header)
  • ATmega16U2 USB-Bridge ICSP Header (2x3 Header)

Arduino Mega 2560 R3

  • x2 Stiftleiste Unten (D22 - D53, 5V, GND)
  • ICSP1 Header (ATmega16U2 USB Controller)
  • ICSP Header (ATmega2560 Main MCU)

Verdict

The Uno is enough for most projects. The Mega pays off with many inputs and outputs, several serial devices such as GPS and a radio module at the same time, or large sketches, for example in 3D printers and displays.