Fixed pins for every bus
The ATmega328P has no pin matrix: each peripheral sits on specific pins. I²C is on A4 (SDA) and A5 (SCL), SPI on D10 (SS), D11 (MOSI), D12 (MISO) and D13 (SCK), and the hardware serial port on D0 (RX) and D1 (TX), shared with the USB chip. attachInterrupt() works only on D2 and D3; the other pins need pin-change interrupts.
PWM is on D3, D5, D6, D9, D10 and D11, marked with ~. Pins 5 and 6 run at about 980 Hz (976.6 Hz), the others at 490 Hz. The Servo library takes over the timer of pins 9 and 10, and tone() the one of pins 3 and 11, so PWM on those pins stops while they are in use.
A6 and A7: analog only
The Nano adds A6 and A7, which the UNO doesn’t have. They connect only to the ADC: digitalRead(), digitalWrite() and INPUT_PULLUP don’t work on them. A0 to A5 work both as analog inputs and as digital pins 14 to 19.
Current and power
The ATmega328P is specified at 20 mA per pin; 40 mA is its absolute maximum, and the whole chip must stay under 200 mA through its supply pins. Pins also share limits by group: at most 150 mA sourced by D0–D4 and A0–A5 together and 150 mA by D5–D13, and at most 100 mA sunk by each of A0–A5, D0–D4 and D5–D13. Use a transistor for relays, motors and LED strips. On the original Nano the 3V3 pin comes from the USB-serial chip, so it works only with USB connected and is meant for small loads; clones may differ.
Full Arduino Nano pin table
| Pin | Port | Status | Analog | Functions | Notes |
|---|---|---|---|---|---|
| D0 | PD0 | Use with care | No | RXD | USB serial, UART RX |
| D1 | PD1 | Use with care | No | TXD | USB serial, UART TX |
| D2 | PD2 | Free to use | No | INT0 | No restrictions |
| D3 | PD3 | Free to use | No | PWM, INT1, OC2B | tone() timer |
| D4 | PD4 | Free to use | No | No | No restrictions |
| D5 | PD5 | Free to use | No | PWM, OC0B | PWM at about 980 Hz |
| D6 | PD6 | Free to use | No | PWM, OC0A | PWM at about 980 Hz |
| D7 | PD7 | Free to use | No | No | No restrictions |
| D8 | PB0 | Free to use | No | No | No restrictions |
| D9 | PB1 | Free to use | No | PWM, OC1A | Servo timer |
| D10 | PB2 | Free to use | No | PWM, OC1B, SS | Servo timer, SPI CS |
| D11 | PB3 | Free to use | No | PWM, OC2A, MOSI | tone() timer, SPI MOSI (TX) |
| D12 | PB4 | Free to use | No | MISO | SPI MISO (RX) |
| D13 | PB5 | Free to use | No | SCK | LED, SPI SCK |
| A0 | PC0 | Free to use | ADC0 | No | No restrictions |
| A1 | PC1 | Free to use | ADC1 | No | No restrictions |
| A2 | PC2 | Free to use | ADC2 | No | No restrictions |
| A3 | PC3 | Free to use | ADC3 | No | No restrictions |
| A4 | PC4 | Free to use | ADC4 | SDA | I²C SDA |
| A5 | PC5 | Free to use | ADC5 | SCL | I²C SCL |
| A6 | ADC6 | Input only | ADC6 | No | analog only |
| A7 | ADC7 | Input only | ADC7 | No | analog only |
Physical pins: 1 is TX (D1), 15 is D12, 16 is D13 and 30 is VIN. VIN accepts 6 to 20 V, 7 to 12 V recommended; 5V is the regulated rail.
Frequently asked questions
Can I use A6 and A7 as digital pins on the Nano?
No. A6 and A7 connect only to the ADC of the ATmega328P, so they have no digital input, output or pull-up. To read a button on them, use analogRead() and an external resistor.
Which Arduino Nano pins support PWM?
D3, D5, D6, D9, D10 and D11. D5 and D6 run at about 980 Hz (976.6 Hz), the others at 490 Hz.
Which pins are I2C and SPI on the Nano?
I²C uses A4 (SDA) and A5 (SCL). SPI uses D11 (MOSI), D12 (MISO) and D13 (SCK), with D10 as SS. These pins are fixed in hardware.
How much current can an Arduino Nano pin supply?
The ATmega328P is specified at 20 mA per pin, with 40 mA as the absolute maximum and 200 mA in total through its supply pins. Pins also share limits by group: at most 150 mA sourced by D0–D4 and A0–A5 together and 150 mA by D5–D13, and at most 100 mA sunk by each of A0–A5, D0–D4 and D5–D13. Drive anything bigger than an LED through a transistor or a MOSFET.
Which Nano pins can trigger interrupts?
attachInterrupt() works on D2 and D3. Every other pin can raise a pin-change interrupt, through the PCINT registers or a library.