Arduino pinout: Uno R3, Nano and Mega 2560, pin by pin
The Arduino Uno R3 and Nano break out the same ATmega328P, on four headers for the Uno and two 15-pin rows for the Nano; the Mega 2560 Rev3 keeps the Uno footprint and adds headers for the ATmega2560. Each table gives the Arduino label, the microcontroller port pin and its functions, from the Arduino schematics and Microchip datasheets.
By Hugues Orgitello · Updated ·
Arduino Uno R3: POWER header, 8 pins
Pin numbers from the UNO-TH_Rev3e schematic, order checked against the official pinout. The Mega 2560 Rev3 has exactly the same header.
| Pin | Signal | Dir. | Label | MCU port pin | Functions | Description |
|---|---|---|---|---|---|---|
| 1 | NC | NC | - | - | Not connected on the Uno R3 and Mega 2560 (BOOT on the Uno R4) (Not connected) | |
| 2 | IOREF | IOREF | - | - | Tells shields the board logic voltage: tied to +5 V on the schematic (Power) | |
| 3 | RESET | In | RESET | PC6 / RESET | - | Active-low reset of the ATmega328P, shared with the reset button and the USB bridge auto-reset (Configuration) |
| 4 | 3V3 | +3V3 | - | - | 3.3 V output of the LP2985-33 regulator; 50 mA maximum per the Arduino pinout (Power) | |
| 5 | 5V | +5V | - | - | Board 5 V rail: regulator output when powered from VIN or the jack, USB 5 V otherwise (Power) | |
| 6 | GND | GND | - | - | Ground (Ground) | |
| 7 | GND | GND | - | - | Ground (Ground) | |
| 8 | VIN | VIN | - | - | Input of the 5 V regulator; with the jack, carries its voltage after the protection diode. 6 to 20 V per the Arduino pinout (Power) |
Arduino Uno R3: analog header A0 to A5, 6 pins
Header AD on the schematic. A0 to A5 are also digital I/O (D14 to D19 in the Arduino core). A4 and A5 carry I2C and are the same nets as the SDA and SCL pins of the digital header: one function at a time.
| Pin | Signal | Dir. | Label | MCU port pin | Functions | Description |
|---|---|---|---|---|---|---|
| 1 | A0 | I/O | A0 / D14 | PC0 | ADC0, PCINT8 | Analog input 0, or digital I/O D14 (Signal) |
| 2 | A1 | I/O | A1 / D15 | PC1 | ADC1, PCINT9 | Analog input 1, or digital I/O D15 (Signal) |
| 3 | A2 | I/O | A2 / D16 | PC2 | ADC2, PCINT10 | Analog input 2, or digital I/O D16 (Signal) |
| 4 | A3 | I/O | A3 / D17 | PC3 | ADC3, PCINT11 | Analog input 3, or digital I/O D17 (Signal) |
| 5 | A4 | I/O | A4 / D18 | PC4 | ADC4, SDA, PCINT12 | Analog input 4, or I2C data (SDA), or digital I/O D18 (Signal) |
| 6 | A5 | I/O | A5 / D19 | PC5 | ADC5, SCL, PCINT13 | Analog input 5, or I2C clock (SCL), or digital I/O D19 (Signal) |
Arduino Uno R3: digital header D8 to D13, SDA, SCL, 10 pins
Header IOH on the schematic. The tilde (~) marks PWM outputs. SDA and SCL (pins 9 and 10) are the same signals as A4 and A5, duplicated on this header.
| Pin | Signal | Dir. | Label | MCU port pin | Functions | Description |
|---|---|---|---|---|---|---|
| 10 | SCL | I/O | D19/SCL | PC5 | SCL, ADC5 | I2C clock; same signal as A5 (Signal) |
| 9 | SDA | I/O | D18/SDA | PC4 | SDA, ADC4 | I2C data; same signal as A4 (Signal) |
| 8 | AREF | In | AREF | AREF | - | External ADC reference input, wired to the microcontroller AREF pin and decoupled by 100 nF (C4) on the board (Configuration) |
| 7 | GND | GND | - | - | Ground (Ground) | |
| 6 | D13 | I/O | D13 | PB5 | SCK, PCINT5 | Digital I/O, SPI clock; also drives the L LED (LED_BUILTIN) through a buffer (Signal) |
| 5 | D12 | I/O | D12 | PB4 | MISO (CIPO), PCINT4 | Digital I/O, SPI controller data in (Signal) |
| 4 | D11 | I/O | ~D11 | PB3 | MOSI (COPI), OC2A (PWM), PCINT3 | Digital I/O, PWM, SPI controller data out (Signal) |
| 3 | D10 | I/O | ~D10 | PB2 | SS, OC1B (PWM), PCINT2 | Digital I/O, PWM, SPI select (SS) (Signal) |
| 2 | D9 | I/O | ~D9 | PB1 | OC1A (PWM), PCINT1 | Digital I/O, PWM output (analogWrite) on pin D9 (Signal) |
| 1 | D8 | I/O | D8 | PB0 | ICP1, CLKO, PCINT0 | Digital I/O (Signal) |
Arduino Uno R3: digital header D0 to D7, 8 pins
Header IOL on the schematic. D0 and D1 connect through 1 kOhm resistors to the ATmega16U2 USB-to-serial bridge: anything wired to them interferes with uploads and the serial monitor.
| Pin | Signal | Dir. | Label | MCU port pin | Functions | Description |
|---|---|---|---|---|---|---|
| 8 | D7 | I/O | D7 | PD7 | AIN1, PCINT23 | Digital I/O (Signal) |
| 7 | D6 | I/O | ~D6 | PD6 | OC0A (PWM), AIN0, PCINT22 | Digital I/O, PWM output (analogWrite) on pin D6 (Signal) |
| 6 | D5 | I/O | ~D5 | PD5 | OC0B (PWM), T1, PCINT21 | Digital I/O, PWM output (analogWrite) on pin D5 (Signal) |
| 5 | D4 | I/O | D4 | PD4 | T0, XCK, PCINT20 | Digital I/O (Signal) |
| 4 | D3 | I/O | ~D3 | PD3 | OC2B (PWM), INT1, PCINT19 | Digital I/O, PWM, external interrupt INT1 (attachInterrupt 1) (Signal) |
| 3 | D2 | I/O | D2 | PD2 | INT0, PCINT18 | Digital I/O, external interrupt INT0 (attachInterrupt 0) (Signal) |
| 2 | D1 | I/O | D1/TX | PD1 | TXD, PCINT17 | UART transmit (Serial), wired to the USB bridge through 1 kOhm (Signal) |
| 1 | D0 | I/O | D0/RX | PD0 | RXD, PCINT16 | UART receive (Serial), wired to the USB bridge through 1 kOhm (Signal) |
Main-MCU ICSP 2x3 header (Uno R3, Nano, Mega 2560)
Same order on all three schematics (ICSP, J4, ICSP). The ICSP SPI signals are the same as the header ones: D11 to D13 on Uno and Nano, D50 to D52 on the Mega. A shield taking SPI from the ICSP therefore works on both boards. On the Uno and Mega, the second header ICSP1 programs the ATmega16U2 USB bridge, not the main microcontroller.
| Pin | Signal | Dir. | Uno R3 and Nano | Mega 2560 | Description |
|---|---|---|---|---|---|
| 1 | MISO | I/O | PB4 (D12) | PB3 (D50) | SPI data to the programmer (CIPO) (Signal) |
| 2 | 5V | +5V | +5V | Board 5 V rail (Power) | |
| 3 | SCK | I/O | PB5 (D13) | PB1 (D52) | SPI clock (Signal) |
| 4 | MOSI | I/O | PB3 (D11) | PB2 (D51) | SPI data from the programmer (COPI) (Signal) |
| 5 | RESET | In | PC6 / RESET | RESET | Microcontroller reset, pulled low while programming (Configuration) |
| 6 | GND | GND | GND | Ground (Ground) |
Arduino Nano (ATmega328P): row J2, analog side, 15 pins
Numbers from the NanoV3.3 schematic, order checked against the official pinout. A6 and A7 (ADC6, ADC7) are analog inputs only: the ATmega328P datasheet states they have no digital input buffer.
| Pin | Signal | Dir. | Label | MCU port pin | Functions | Description |
|---|---|---|---|---|---|---|
| 15 | D13 | I/O | D13 | PB5 | SCK, PCINT5 | Digital I/O, SPI clock; also drives the L LED (LED_BUILTIN) through 1 kOhm (Signal) |
| 14 | 3V3 | +3V3 | - | - | 3.3 V output (FT232RL 3V3OUT on the schematic); 50 mA maximum per the Arduino pinout (Power) | |
| 13 | AREF | In | AREF | AREF | - | External ADC reference input, wired to the microcontroller AREF pin and decoupled by 100 nF (C1) on the board (Configuration) |
| 12 | A0 | I/O | A0 / D14 | PC0 | ADC0, PCINT8 | Analog input 0, or digital I/O D14 (Signal) |
| 11 | A1 | I/O | A1 / D15 | PC1 | ADC1, PCINT9 | Analog input 1, or digital I/O D15 (Signal) |
| 10 | A2 | I/O | A2 / D16 | PC2 | ADC2, PCINT10 | Analog input 2, or digital I/O D16 (Signal) |
| 9 | A3 | I/O | A3 / D17 | PC3 | ADC3, PCINT11 | Analog input 3, or digital I/O D17 (Signal) |
| 8 | A4 | I/O | A4 / D18 | PC4 | ADC4, SDA, PCINT12 | Analog input 4, or I2C data (SDA), or digital I/O D18 (Signal) |
| 7 | A5 | I/O | A5 / D19 | PC5 | ADC5, SCL, PCINT13 | Analog input 5, or I2C clock (SCL), or digital I/O D19 (Signal) |
| 6 | A6 | In | A6 | ADC6 | ADC6 (analog only) | Analog input only: analogRead works, digitalRead and digitalWrite do not (Signal) |
| 5 | A7 | In | A7 | ADC7 | ADC7 (analog only) | Analog input only: analogRead works, digitalRead and digitalWrite do not (Signal) |
| 4 | 5V | +5V | - | - | 5 V rail: LM1117 regulator output from VIN, or USB 5 V through a diode (Power) | |
| 3 | RESET | In | RESET | PC6 / RESET | - | Active-low reset of the ATmega328P, shared with the reset button and the USB bridge auto-reset (Configuration) |
| 2 | GND | GND | - | - | Ground (Ground) | |
| 1 | VIN | VIN | - | - | Input of the 5 V regulator; 7 to 12 V per the Arduino pinout (Power) |
Arduino Nano (ATmega328P): row J1, digital side, 15 pins
Numbers from the NanoV3.3 schematic. D0 and D1 go through 1 kOhm resistors to the FT232RL USB bridge. Functions match the Uno R3: same microcontroller, same Arduino pin numbers.
| Pin | Signal | Dir. | Label | MCU port pin | Functions | Description |
|---|---|---|---|---|---|---|
| 15 | D12 | I/O | D12 | PB4 | MISO (CIPO), PCINT4 | Digital I/O, SPI controller data in (Signal) |
| 14 | D11 | I/O | ~D11 | PB3 | MOSI (COPI), OC2A (PWM), PCINT3 | Digital I/O, PWM, SPI controller data out (Signal) |
| 13 | D10 | I/O | ~D10 | PB2 | SS, OC1B (PWM), PCINT2 | Digital I/O, PWM, SPI select (SS) (Signal) |
| 12 | D9 | I/O | ~D9 | PB1 | OC1A (PWM), PCINT1 | Digital I/O, PWM output (analogWrite) on pin D9 (Signal) |
| 11 | D8 | I/O | D8 | PB0 | ICP1, CLKO, PCINT0 | Digital I/O (Signal) |
| 10 | D7 | I/O | D7 | PD7 | AIN1, PCINT23 | Digital I/O (Signal) |
| 9 | D6 | I/O | ~D6 | PD6 | OC0A (PWM), AIN0, PCINT22 | Digital I/O, PWM output (analogWrite) on pin D6 (Signal) |
| 8 | D5 | I/O | ~D5 | PD5 | OC0B (PWM), T1, PCINT21 | Digital I/O, PWM output (analogWrite) on pin D5 (Signal) |
| 7 | D4 | I/O | D4 | PD4 | T0, XCK, PCINT20 | Digital I/O (Signal) |
| 6 | D3 | I/O | ~D3 | PD3 | OC2B (PWM), INT1, PCINT19 | Digital I/O, PWM, external interrupt INT1 (attachInterrupt 1) (Signal) |
| 5 | D2 | I/O | D2 | PD2 | INT0, PCINT18 | Digital I/O, external interrupt INT0 (attachInterrupt 0) (Signal) |
| 4 | GND | GND | - | - | Ground (Ground) | |
| 3 | RESET | In | RESET | PC6 / RESET | - | Active-low reset of the ATmega328P, shared with the reset button and the USB bridge auto-reset (Configuration) |
| 2 | D0 | I/O | D0/RX | PD0 | RXD, PCINT16 | UART receive (Serial), wired to the USB bridge through 1 kOhm (Signal) |
| 1 | D1 | I/O | D1/TX | PD1 | TXD, PCINT17 | UART transmit (Serial), wired to the USB bridge through 1 kOhm (Signal) |
Arduino Mega 2560 Rev3: POWER header, 8 pins
Same header and same order as the Uno R3 (MEGA2560_Rev3e schematic). The Arduino pinout gives 6 to 20 V on VIN; the user manual recommends 7 to 12 V.
| Pin | Signal | Dir. | Label | MCU port pin | Functions | Description |
|---|---|---|---|---|---|---|
| 1 | NC | NC | - | - | Not connected on the Uno R3 and Mega 2560 (BOOT on the Uno R4) (Not connected) | |
| 2 | IOREF | IOREF | - | - | Tells shields the board logic voltage: tied to +5 V on the schematic (Power) | |
| 3 | RESET | In | RESET | RESET | - | Active-low reset of the ATmega2560, shared with the reset button and the USB bridge auto-reset (Configuration) |
| 4 | 3V3 | +3V3 | - | - | 3.3 V output of the LP2985-33 regulator; 50 mA maximum per the Arduino pinout (Power) | |
| 5 | 5V | +5V | - | - | Board 5 V rail: regulator output when powered from VIN or the jack, USB 5 V otherwise (Power) | |
| 6 | GND | GND | - | - | Ground (Ground) | |
| 7 | GND | GND | - | - | Ground (Ground) | |
| 8 | VIN | VIN | - | - | Input of the 5 V regulator; with the jack, carries its voltage after the protection diode. 6 to 20 V per the Arduino pinout (Power) |
Arduino Mega 2560 Rev3: header A0 to A7, 8 pins
A0 to A7 sit on port F and also work as digital I/O D54 to D61. A4 to A7 also carry the ATmega2560 JTAG (TCK, TMS, TDO, TDI), active only when the JTAGEN fuse is programmed.
| Pin | Signal | Dir. | Label | MCU port pin | Functions | Description |
|---|---|---|---|---|---|---|
| 1 | A0 | I/O | A0 / D54 | PF0 | ADC0 | Analog input 0, or digital I/O D54 (Signal) |
| 2 | A1 | I/O | A1 / D55 | PF1 | ADC1 | Analog input 1, or digital I/O D55 (Signal) |
| 3 | A2 | I/O | A2 / D56 | PF2 | ADC2 | Analog input 2, or digital I/O D56 (Signal) |
| 4 | A3 | I/O | A3 / D57 | PF3 | ADC3 | Analog input 3, or digital I/O D57 (Signal) |
| 5 | A4 | I/O | A4 / D58 | PF4 | ADC4, TCK | Analog input 4, or digital I/O D58 (no I2C here on the Mega) (Signal) |
| 6 | A5 | I/O | A5 / D59 | PF5 | ADC5, TMS | Analog input 5, or digital I/O D59 (no I2C here on the Mega) (Signal) |
| 7 | A6 | I/O | A6 / D60 | PF6 | ADC6, TDO | Analog input 6, or digital I/O D60 (Signal) |
| 8 | A7 | I/O | A7 / D61 | PF7 | ADC7, TDI | Analog input 7, or digital I/O D61 (Signal) |
Arduino Mega 2560 Rev3: header A8 to A15, 8 pins
Header ADCH on the schematic, on port K: analog inputs ADC8 to ADC15, also digital I/O D62 to D69 and pin-change interrupts PCINT16 to 23.
| Pin | Signal | Dir. | Label | MCU port pin | Functions | Description |
|---|---|---|---|---|---|---|
| 1 | A8 | I/O | A8 / D62 | PK0 | ADC8, PCINT16 | Analog input 8, or digital I/O D62 (Signal) |
| 2 | A9 | I/O | A9 / D63 | PK1 | ADC9, PCINT17 | Analog input 9, or digital I/O D63 (Signal) |
| 3 | A10 | I/O | A10 / D64 | PK2 | ADC10, PCINT18 | Analog input 10, or digital I/O D64 (Signal) |
| 4 | A11 | I/O | A11 / D65 | PK3 | ADC11, PCINT19 | Analog input 11, or digital I/O D65 (Signal) |
| 5 | A12 | I/O | A12 / D66 | PK4 | ADC12, PCINT20 | Analog input 12, or digital I/O D66 (Signal) |
| 6 | A13 | I/O | A13 / D67 | PK5 | ADC13, PCINT21 | Analog input 13, or digital I/O D67 (Signal) |
| 7 | A14 | I/O | A14 / D68 | PK6 | ADC14, PCINT22 | Analog input 14, or digital I/O D68 (Signal) |
| 8 | A15 | I/O | A15 / D69 | PK7 | ADC15, PCINT23 | Analog input 15, or digital I/O D69 (Signal) |
Arduino Mega 2560 Rev3: header SCL, SDA, AREF, D13 to D8, 10 pins
Header JP6 on the schematic. Note that its numbering starts at SCL (pin 1), the reverse of the Uno IOH header; the physical positions match the Uno. On the Mega, D10 to D13 do not carry SPI: it sits on D50 to D53 and on the ICSP.
| Pin | Signal | Dir. | Label | MCU port pin | Functions | Description |
|---|---|---|---|---|---|---|
| 1 | SCL | I/O | D21/SCL | PD0 | SCL, INT0 | I2C clock; same signal as D21 (Signal) |
| 2 | SDA | I/O | D20/SDA | PD1 | SDA, INT1 | I2C data; same signal as D20 (Signal) |
| 3 | AREF | In | AREF | AREF | - | External ADC reference input, wired to the microcontroller AREF pin and decoupled by 100 nF (C3) on the board (Configuration) |
| 4 | GND | GND | - | - | Ground (Ground) | |
| 5 | D13 | I/O | ~D13 | PB7 | OC0A / OC1C (PWM), PCINT7 | Digital I/O, PWM; also drives the L LED (LED_BUILTIN) (Signal) |
| 6 | D12 | I/O | ~D12 | PB6 | OC1B (PWM), PCINT6 | Digital I/O, PWM output (analogWrite) on pin D12 (Signal) |
| 7 | D11 | I/O | ~D11 | PB5 | OC1A (PWM), PCINT5 | Digital I/O, PWM output (analogWrite) on pin D11 (Signal) |
| 8 | D10 | I/O | ~D10 | PB4 | OC2A (PWM), PCINT4 | Digital I/O, PWM output (analogWrite) on pin D10 (Signal) |
| 9 | D9 | I/O | ~D9 | PH6 | OC2B (PWM) | Digital I/O, PWM output (analogWrite) on pin D9 (Signal) |
| 10 | D8 | I/O | ~D8 | PH5 | OC4C (PWM) | Digital I/O, PWM output (analogWrite) on pin D8 (Signal) |
Arduino Mega 2560 Rev3: header D7 to D0, 8 pins
The Arduino pinout and schematic mark D0 and D1 as PWM; the ATmega2560 datasheet gives PE0 and PE1 no timer output, and the Arduino core (digitalPinHasPWM) excludes them. The table follows the datasheet. D0 and D1 also go to the ATmega16U2 USB bridge through 1 kOhm.
| Pin | Signal | Dir. | Label | MCU port pin | Functions | Description |
|---|---|---|---|---|---|---|
| 8 | D7 | I/O | ~D7 | PH4 | OC4B (PWM) | Digital I/O, PWM output (analogWrite) on pin D7 (Signal) |
| 7 | D6 | I/O | ~D6 | PH3 | OC4A (PWM) | Digital I/O, PWM output (analogWrite) on pin D6 (Signal) |
| 6 | D5 | I/O | ~D5 | PE3 | OC3A (PWM), AIN1 | Digital I/O, PWM output (analogWrite) on pin D5 (Signal) |
| 5 | D4 | I/O | ~D4 | PG5 | OC0B (PWM) | Digital I/O, PWM output (analogWrite) on pin D4 (Signal) |
| 4 | D3 | I/O | ~D3 | PE5 | OC3C (PWM), INT5 | Digital I/O, PWM, external interrupt INT5 (attachInterrupt 1) (Signal) |
| 3 | D2 | I/O | ~D2 | PE4 | OC3B (PWM), INT4 | Digital I/O, PWM, external interrupt INT4 (attachInterrupt 0) (Signal) |
| 2 | D1 | I/O | D1/TX0 | PE1 | TXD0, PDO | UART0 transmit (Serial), wired to the USB bridge; no PWM per the datasheet (Signal) |
| 1 | D0 | I/O | D0/RX0 | PE0 | RXD0, PDI, PCINT8 | UART0 receive (Serial), wired to the USB bridge; no PWM per the datasheet (Signal) |
Arduino Mega 2560 Rev3: communication header D14 to D21, 8 pins
Three more UARTs (Serial1 to Serial3) and I2C, with four external interrupts. D20 and D21 are the same signals as SDA and SCL on the JP6 header.
| Pin | Signal | Dir. | Label | MCU port pin | Functions | Description |
|---|---|---|---|---|---|---|
| 8 | D14 | I/O | D14/TX3 | PJ1 | TXD3, PCINT10 | UART3 transmit (Serial3) (Signal) |
| 7 | D15 | I/O | D15/RX3 | PJ0 | RXD3, PCINT9 | UART3 receive (Serial3) (Signal) |
| 6 | D16 | I/O | D16/TX2 | PH1 | TXD2 | UART2 transmit (Serial2) (Signal) |
| 5 | D17 | I/O | D17/RX2 | PH0 | RXD2 | UART2 receive (Serial2) (Signal) |
| 4 | D18 | I/O | D18/TX1 | PD3 | TXD1, INT3 | UART1 transmit (Serial1), interrupt INT3 (attachInterrupt 5) (Signal) |
| 3 | D19 | I/O | D19/RX1 | PD2 | RXD1, INT2 | UART1 receive (Serial1), interrupt INT2 (attachInterrupt 4) (Signal) |
| 2 | D20 | I/O | D20/SDA | PD1 | SDA, INT1 | I2C data (SDA), interrupt INT1 (attachInterrupt 3) (Signal) |
| 1 | D21 | I/O | D21/SCL | PD0 | SCL, INT0 | I2C clock (SCL), interrupt INT0 (attachInterrupt 2) (Signal) |
Arduino Mega 2560 Rev3: double-row header D22 to D53 (XIO), 2 x 18 pins
Pad numbers of connector XIO on the schematic (odd: D22 to D52, even: D23 to D53). The XMEM functions (external memory bus) only apply when the memory interface is enabled. SPI sits on D50 to D53, as on the ICSP.
| Pin | Signal | Dir. | Label | MCU port pin | Functions | Description |
|---|---|---|---|---|---|---|
| 1 | 5V | +5V | - | - | Board 5 V rail (Power) | |
| 2 | 5V | +5V | - | - | Board 5 V rail (Power) | |
| 3 | D22 | I/O | D22 | PA0 | XMEM AD0 | Digital I/O (Signal) |
| 4 | D23 | I/O | D23 | PA1 | XMEM AD1 | Digital I/O (Signal) |
| 5 | D24 | I/O | D24 | PA2 | XMEM AD2 | Digital I/O (Signal) |
| 6 | D25 | I/O | D25 | PA3 | XMEM AD3 | Digital I/O (Signal) |
| 7 | D26 | I/O | D26 | PA4 | XMEM AD4 | Digital I/O (Signal) |
| 8 | D27 | I/O | D27 | PA5 | XMEM AD5 | Digital I/O (Signal) |
| 9 | D28 | I/O | D28 | PA6 | XMEM AD6 | Digital I/O (Signal) |
| 10 | D29 | I/O | D29 | PA7 | XMEM AD7 | Digital I/O (Signal) |
| 11 | D30 | I/O | D30 | PC7 | XMEM A15 | Digital I/O (Signal) |
| 12 | D31 | I/O | D31 | PC6 | XMEM A14 | Digital I/O (Signal) |
| 13 | D32 | I/O | D32 | PC5 | XMEM A13 | Digital I/O (Signal) |
| 14 | D33 | I/O | D33 | PC4 | XMEM A12 | Digital I/O (Signal) |
| 15 | D34 | I/O | D34 | PC3 | XMEM A11 | Digital I/O (Signal) |
| 16 | D35 | I/O | D35 | PC2 | XMEM A10 | Digital I/O (Signal) |
| 17 | D36 | I/O | D36 | PC1 | XMEM A9 | Digital I/O (Signal) |
| 18 | D37 | I/O | D37 | PC0 | XMEM A8 | Digital I/O (Signal) |
| 19 | D38 | I/O | D38 | PD7 | T0 | Digital I/O (Signal) |
| 20 | D39 | I/O | D39 | PG2 | XMEM ALE | Digital I/O (Signal) |
| 21 | D40 | I/O | D40 | PG1 | XMEM RD | Digital I/O (Signal) |
| 22 | D41 | I/O | D41 | PG0 | XMEM WR | Digital I/O (Signal) |
| 23 | D42 | I/O | D42 | PL7 | - | Digital I/O (Signal) |
| 24 | D43 | I/O | D43 | PL6 | - | Digital I/O (Signal) |
| 25 | D44 | I/O | D44~ | PL5 | OC5C (PWM) | Digital I/O, PWM output (analogWrite) on pin D44 (Signal) |
| 26 | D45 | I/O | ~D45 | PL4 | OC5B (PWM) | Digital I/O, PWM output (analogWrite) on pin D45 (Signal) |
| 27 | D46 | I/O | D46~ | PL3 | OC5A (PWM) | Digital I/O, PWM output (analogWrite) on pin D46 (Signal) |
| 28 | D47 | I/O | D47 | PL2 | T5 | Digital I/O (Signal) |
| 29 | D48 | I/O | D48 | PL1 | ICP5 | Digital I/O (Signal) |
| 30 | D49 | I/O | D49 | PL0 | ICP4 | Digital I/O (Signal) |
| 31 | D50 | I/O | D50 | PB3 | MISO (CIPO), PCINT3 | Digital I/O, SPI controller data in (Signal) |
| 32 | D51 | I/O | D51 | PB2 | MOSI (COPI), PCINT2 | Digital I/O, SPI controller data out (Signal) |
| 33 | D52 | I/O | D52 | PB1 | SCK, PCINT1 | Digital I/O, SPI clock (Signal) |
| 34 | D53 | I/O | D53 | PB0 | SS, PCINT0 | Digital I/O, SPI select (SS) (Signal) |
| 35 | GND | GND | - | - | Ground (Ground) | |
| 36 | GND | GND | - | - | Ground (Ground) |
An Arduino prototype to turn into a manufacturable board, or a shield to design around an ATmega or another microcontroller? We design the electronics and the firmware.
Uno R4 Minima and WiFi: same positions, different microcontroller
The Arduino manuals for the Uno R4 Minima (ABX00080) and Uno R4 WiFi (ABX00087) list the headers in the same order as the Uno R3, and the Renesas RA4M1 runs at 5 V to stay shield compatible. One position changes: the first pin of the POWER header, unconnected on the R3, becomes BOOT. A4/A5 are still the same pins as SDA/SCL.
What changes electrically: A0 carries a DAC of up to 12 bits, A1 to A3 the internal op-amp (OPAMP+, OPAMP-, output), and pin current drops to 8 mA per pin (60 mA overall per the Minima pinout), against 20 mA on the R3. On the WiFi, the ESP32-S3, its ESP header and the Qwiic connector are 3.3 V.
Nano Every, Nano 33 and Nano ESP32: same footprint, different electrics
The tables above describe the original ATmega328P Nano. Arduino describes the Nano Every (ATmega4809) as 5 V compatible and a drop-in replacement. The Nano 33 IoT and Nano 33 BLE accept 3.3 V only on their I/Os, which are not 5 V tolerant, and their 5V pin supplies nothing until a jumper connects it to USB power.
The Nano ESP32 runs at 3.3 V and has no 5V pin: only VBUS provides 5 V while the board is on USB. On these boards the microcontroller port, PWM and interrupts no longer match the table: use the pinout of the board itself. For the ESP32 itself, see our ESP32 pinout.
Mega 2560: four UARTs and shifted interrupt numbers
The Mega has four UARTs: Serial on D0/D1 (shared with USB), Serial1 on D18/D19, Serial2 on D16/D17, Serial3 on D14/D15. A serial module is best wired to Serial1 to 3 so uploads stay free. The UART rule is unchanged: board TX to module RX.
The six external interrupts do not follow the datasheet INTn numbers: for the Arduino core, D2 is interrupt 0 (INT4), D3 is 1 (INT5), D21 is 2, D20 is 3, D19 is 4 and D18 is 5. Write attachInterrupt(digitalPinToInterrupt(pin), ...) rather than a hard-coded number: the same code then works on Uno, Nano and Mega.
VIN, 5V, 3V3, IOREF and current per pin
The Arduino pinouts for the Uno R3, Nano and Mega give 20 mA maximum per I/O and 50 mA on the 3.3 V pin. The 40 mA in the ATmega328P and ATmega2560 datasheets is an absolute maximum rating, not a design current. Drive a relay or a motor through a transistor, never directly.
VIN feeds the 5 V regulator; the 5V pin ties to the 5 V rail, and feeding 5 V into it bypasses the regulator. IOREF tells shields the logic voltage (5 V on all three boards). Signals stay at 5 V: a 3.3 V sensor on I2C or SPI needs a level shifter.
FAQ
- Which Arduino Uno pins support PWM?
- On the Uno R3 and Nano, six pins marked with a tilde: D3, D5, D6, D9, D10 and D11, wired to the compare outputs of ATmega328P timers 0, 1 and 2. D5 and D6 share timer 0. On the Mega 2560, the Arduino core accepts analogWrite on D2 to D13 and D44 to D46. The Mega pinout also marks D0 and D1, but the ATmega2560 datasheet gives them no timer output.
- Which pins carry I2C and SPI on the Uno, Nano and Mega?
- On the Uno R3 and Nano: SDA on A4, SCL on A5 (duplicated next to AREF on the Uno), and SPI on D10 (SS), D11 (MOSI), D12 (MISO) and D13 (SCK). On the Mega 2560: SDA on D20, SCL on D21, and SPI on D50 (MISO), D51 (MOSI), D52 (SCK) and D53 (SS). On all three boards the ICSP header carries the same SPI, which is what shields compatible with both Uno and Mega use.
- Can the Nano A6 and A7 pins be used as digital pins?
- No. On the ATmega328P Nano, A6 and A7 are the ADC6 and ADC7 inputs of the TQFP package, which the DIP ATmega328P on the Uno does not have. The Microchip datasheet states they have no digital input buffer: analogRead works, digitalRead and digitalWrite do not. To read a button on them, add an external pull resistor and compare the analog value with a threshold.
- Is the Uno R4 pin compatible with the Uno R3?
- For positions and voltage, yes: the Arduino manuals for the Uno R4 Minima and WiFi give the same header order and 5 V logic, with the POWER header NC pin becoming BOOT. Electrically, no: the RA4M1 limits each I/O to 8 mA against 20 mA on the R3, A0 can become a DAC output, and the AVR registers are gone. A shield fits, but code that writes the ATmega ports directly must be rewritten.
- How much current can an Arduino pin supply?
- The Arduino pinouts for the Uno R3, Nano and Mega 2560 give 20 mA maximum per I/O pin and 50 mA on the 3.3 V output. The ATmega328P datasheet quotes 40 mA, but as an absolute maximum rating beyond which the chip can be damaged. On the Uno R4, the limit drops to 8 mA per pin. An LED with its resistor is fine; a relay, a motor or an LED strip needs a transistor and a separate supply.
- Arduino, UNO R3 full pinout A000066 (last update 6 Oct 2022)
- Arduino, UNO R3 schematic UNO-TH_Rev3e (headers POWER, AD, IOH, IOL, ICSP)
- Arduino, UNO R3 user manual A000066 (tables 5.1 JANALOG, 5.2 JDIGITAL)
- Arduino, Nano full pinout A000005 (last update 30/06/2021)
- Arduino, Nano schematic NanoV3.3 (J1, J2, ICSP J4)
- Arduino, Mega 2560 Rev3 full pinout A000067 (last update 16/12/2020, pages 1 to 4)
- Arduino, Mega 2560 Rev3 schematic MEGA2560_Rev3e (XIO, JP6, ADCH, power, ICSP)
- Arduino, Mega 2560 Rev3 user manual A000067 (tables 5.1, 5.2, 5.5, 5.6; ratings)
- Arduino, UNO R4 Minima user manual ABX00080 (pinout tables, DAC, pin current)
- Arduino, UNO R4 Minima full pinout ABX00080 (last update 27 Nov 2023)
- Arduino, UNO R4 WiFi user manual ABX00087 (pinout tables, DAC, pin current)
- Arduino, UNO R4 WiFi full pinout ABX00087 (last update 23 Apr 2025)
- Arduino, Nano Every user manual ABX00028 (5 V compatibility note)
- Arduino, Nano 33 IoT user manual ABX00027 (3.3 V I/O note, VUSB jumper)
- Arduino, Nano 33 BLE user manual ABX00030 (3.3 V I/O note, VUSB jumper)
- Arduino, Nano ESP32 user manual ABX00083 (3.3 V operation, no 5V pin)
- Microchip, ATmega48A/PA/88A/PA/168A/PA/328/P datasheet DS40002061B (Port B, C, D alternate functions; ADC7:6; absolute maximum ratings)
- Microchip, ATmega640/1280/1281/2560/2561 datasheet DS40002211A (Port A to L alternate functions; absolute maximum ratings)
- ArduinoCore-avr, variants/standard/pins_arduino.h (cross-check: PWM, SPI, I2C, interrupts)
- ArduinoCore-avr, variants/mega/pins_arduino.h (cross-check: pin to port map, PWM, interrupts)
Tables built from these documents and cross-checked against manufacturer datasheets. Always check the datasheet of the connector you actually use: some manufacturers number differently.
- From an Arduino prototype to a production board
- ESP32, S3, C3 and C6 pinout
- Raspberry Pi 40-pin GPIO pinout
- The I2C bus explained
- The SPI bus explained
Other pinouts
- USB-C
- USB-A, USB-B, Mini and Micro
- RJ45 Ethernet
- M12 industrial
- DB9 (DE-9)
- JTAG and SWD
- HDMI
- Raspberry Pi GPIO
- M.2 (keys M, B and E)
- SD and microSD card
- PCI Express card edge
- SATA
- DDR4 DIMM and SO-DIMM
- DDR5 DIMM and SO-DIMM
- OBD2 (OBD-II, J1962)
- ESP32, S3, C3 and C6
- Bosch ECUs EDC15P+, EDC16C34, MD1CS006
- RJ11, RJ14, RJ12 (6P6C)
- VGA (DE-15) and DVI
- RS-485 (Modbus)