Arduino Nano (ATmega328P)

The Arduino Nano is a compact, breadboard-friendly board powered by the exact same ATmega328P processor core found on the larger Arduino Uno.

Arduino Nano

At a glance

Pins and properties exactly as the circuit editor and simulator define this part. The text below explains how to use them.

Board facts

Board facts
FactValue
Operating voltage5 V
FamilyArduino
Python runtimearduino
Wi-FiNo
BluetoothNo
Native USBNo

Pinout

Pinout of the Arduino Nano. Select a label to see that pin in the table below. Pins in the middle of the board are listed only in the table.

The Arduino Nano is a compact, breadboard-friendly board powered by the exact same ATmega328P processor core found on the larger Arduino Uno. It is designed for space-constrained projects and breadboard prototyping.


1. Hardware Specifications

  • Processor: 8-bit AVR RISC microcontroller running at 16 MHz.
  • Logic Level: 5.0V.
  • Memory Limits: 32 KB Flash, 2 KB SRAM, 1 KB EEPROM (identical to the Uno) — real chip hardware, but OMS has no Blockly block or library exposing the EEPROM; using it requires hand-written #include <EEPROM.h> code in an ejected/C++-only project.
  • Form Factor: 30-pin Dual Inline Package (DIP) layout that plugs directly into standard solderless breadboards.

2. Detailed Pinout & GPIO Map

Below is the complete physical-to-code mapping table for the Arduino Nano:

Pins of this board
PinKindFeaturesAlternate functionsNotes
TXGPIOD1, UART0Mapped to USB serial converter; avoid sensor connections during flashes.
RXGPIOD0, UART0Mapped to USB serial converter; avoid sensor connections during flashes.
RSTSpecialRESET
GNDGround
D2GPIOINT0Supports external hardware interrupts.
D3GPIOPWMPWM, INT18-bit PWM duty cycle output; supports external interrupts.
D4GPIOGeneral Purpose Input / Output.
D5GPIOPWMPWM8-bit PWM duty cycle output.
D6GPIOPWMPWM8-bit PWM duty cycle output.
D7GPIOGeneral Purpose Input / Output.
D8GPIOGeneral Purpose Input / Output.
D9GPIOPWMPWM8-bit PWM duty cycle output.
D10GPIOPWMPWM, CS, SPISPI Slave Select channel.
D11GPIOPWMPWM, MOSI, SPISPI Master Out Slave In.
D12GPIOMISO, SPISPI Master In Slave Out.
VINPower7-20V
GNDGround
RSTSpecialRESET
5VPower
A7AnalogADC, Input onlyADC7Analog Input Only. Cannot be used as digital write/read pins.
A6AnalogADC, Input onlyADC6Analog Input Only. Cannot be used as digital write/read pins.
A5AnalogADCADC5, SCL, I2C10-bit ADC input; I2C Serial Clock channel.
A4AnalogADCADC4, SDA, I2C10-bit ADC input; I2C Serial Data channel.
A3AnalogADCADC310-bit ADC channel (value 0–1023).
A2AnalogADCADC210-bit ADC channel (value 0–1023).
A1AnalogADCADC110-bit ADC channel (value 0–1023).
A0AnalogADCADC010-bit ADC channel (value 0–1023).
AREFSpecial
3V3Power3.3V
D13GPIOSCK, SPISPI Serial Clock; connected to built-in diagnostic LED.
ICSP MISOSpecialReservedMISO, SPI
ICSP 5VPowerReserved5V
ICSP SCKSpecialReservedSCK, SPI
ICSP MOSISpecialReservedMOSI, SPI
ICSP RSTSpecialReservedRESET
ICSP GNDGroundReservedGND

3. Differences from the Arduino Uno

  • Size & Layout: Significantly smaller footprint (18mm x 45mm). Designed with header pins pointing downwards to fit securely into breadboards.
  • Power Jacks: Lacks a DC coaxial power jack. Power must be sourced from the Mini-USB/Micro-USB port or via the raw VIN input pin (7–12V).
  • Additional Pins: Includes A6 and A7, providing 8 analog inputs instead of the Uno's 6.
  • USB Board Interface: Employs an onboard USB-to-UART converter chip (like the CH340G or FT232RL) rather than the secondary ATmega16U2 microcontroller.

4. Compiler Settings & IDE Properties

When targeting this board, the compiler utilizes the following parameters:

  • FQBN: arduino:avr:nano:cpu=atmega328 (for Old Bootloader configurations) or arduino:avr:nano:cpu=atmega328new (for Optiboot configurations).
  • Default Flashing Baud Rate: Toggles between 57600 (Old Bootloader) and 115200 (New Bootloader).
  • Flash Mode / File Type: hex
  • Programming Runtime: C++ (Arduino framework) only.

5. Supported Blockly Board Blocks

Drawing the blocks…

6. Simulator and Flashing Diagnostics

  • Simulator: Shares the same avr8js engine running inside browser web workers. Emulates core AVR register maps, timers, and A0–A7 ADC converters.
  • Flashing Guide: Connect the board over USB. Click Connect Serial. Select the COM port corresponding to your Nano. Click Flash — OMS always targets the older ATmegaBOOT bootloader protocol at 57600 baud for this board (matching most genuine and clone Nanos). Ensure no sensors are connected to pins D0/D1 during programming.

[!NOTE] Some newer Nano clones ship with an Optiboot bootloader instead (115200 baud) — OMS's compiler config has a nano-new entry for this case, but there is currently no UI control anywhere to select it; only the standard 57600 ATmegaBOOT path is reachable today.


7. Communication Buses & Electrical Capabilities

Beyond the per-pin table above, here's the board's bus-level capability summary (from its own capabilities config):

BusDetails
UART1 hardware bus — TX on D1, RX on D0. Shared with the USB programming port, so avoid other serial devices on these two pins while uploading.
I2CFixed on A4 (SDA) / A5 (SCL) — the ATmega328P has no alternate I2C pin mapping. (Datasheet calls this peripheral TWI — Two-Wire Interface; "I2C" and "2-Wire" refer to the same bus here.)
SPIMOSI D11, MISO D12, SCK D13, CS/SS D10.
1-WireNo dedicated 1-Wire hardware peripheral on this chip. Sensors that use 1-Wire-style timing (e.g. DHT11) are supported by bit-banging the protocol on any regular digital pin, not a fixed bus.
Analog (ADC)8 channels (A0–A7), 10-bit resolution (0–1023), no hardware DAC. A6/A7 are analog-input-only — they have no digital read/write function at all.
PWM6 channels, 8-bit resolution, up to ~62.5 kHz.

Electrical limits: max 40 mA per pin, max 200 mA total across all pins combined — exceeding these can damage the chip. Absolute input voltage range on VIN is 7–20V.


8. Further Reading


Arduino Nano (ATmega328P) — OMS Parts