Arduino Uno (ATmega328P)

The Arduino Uno is the industry-standard educational microcontroller board.

Arduino UNO

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 UNO. 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 Uno is the industry-standard educational microcontroller board. Built around Microchip's 8-bit ATmega328P AVR microcontroller, it is the default choice for introductory electronics, basic robotics, and sensor integration.


1. Hardware Specifications

  • Processor: 8-bit AVR RISC microcontroller running at a fixed clock speed of 16 MHz.
  • Logic Level: 5.0V. All logic high signals output 5V; input pins expect 5V signals.
  • Memory Limits:
    • Flash Memory: 32 KB (with 0.5 KB allocated for the bootloader).
    • SRAM: 2 KB (used for variable and execution stack storage).
    • EEPROM: 1 KB (non-volatile memory for storing data values across power cycles) — real chip hardware, but OMS currently has no Blockly block or library exposing it; using it requires hand-written #include <EEPROM.h> code in an ejected/C++-only project.

2. Detailed Pinout & GPIO Map

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

Pins of this board
PinKindFeaturesAlternate functionsNotes
RXGPIOD0, UART0Do not connect sensors during code upload (shares USB connection).
TXGPIOD1, UART0Do not connect sensors during code upload (shares USB connection).
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 Bus Slave Select channel.
D11GPIOPWMPWM, MOSI, SPISPI Master Out Slave In channel.
D12GPIOMISO, SPISPI Master In Slave Out channel.
D13GPIOSCK, SPISPI Serial Clock channel; connected to built-in diagnostic LED.
GNDGround
AREFSpecial
SDAGPIOI2C
SCLGPIOI2C
IOREFSpecial
RESETSpecial
3V3Power3.3V
5VPower
GNDGround
GNDGround
VINPower7-20V
A0AnalogADCADC010-bit ADC channel (value 0–1023).
A1AnalogADCADC110-bit ADC channel (value 0–1023).
A2AnalogADCADC210-bit ADC channel (value 0–1023).
A3AnalogADCADC310-bit ADC channel (value 0–1023).
A4AnalogADCADC4, SDA, I2C10-bit ADC channel; I2C Serial Data channel.
A5AnalogADCADC5, SCL, I2C10-bit ADC channel; I2C Serial Clock channel.
ICSP MISOSpecialReservedMISO, SPI
ICSP 5VPowerReserved5V
ICSP SCKSpecialReservedSCK, SPI
ICSP MOSISpecialReservedMOSI, SPI
ICSP RSTSpecialReservedRESET
ICSP GNDGroundReservedGND

3. Power Architecture

  • Input Voltage (VIN / DC Jack): Recommended input range is 7V to 12V. Onboard regulators step this down to a stable 5V.
  • 5V Output Pin: Supplies up to 800mA (external power supply) or 500mA (USB power) to external modules.
  • 3.3V Output Pin: Max current draw capacity is 50mA. Connecting high-load modules (like Wi-Fi chips) will brownout the processor.

4. Compiler Settings & IDE Properties

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

  • FQBN: arduino:avr:uno
  • Default Flashing Baud Rate: 115200
  • Flash Mode / File Type: hex (Intel HEX binary file format)
  • Flash Memory Offsets: { bootloader: 0x0000, partitions: 0x0000, app: 0x0000 } (monolithic binary upload)
  • Programming Runtime: C++ (Arduino framework) only. Python environments are disabled in the project creation modal due to memory limitations.

5. Supported Blockly Board Blocks

Drawing the blocks…

6. Simulator and Flashing Diagnostics

  • Simulator: Powered by a background avr8js worker. Emulates the core ATmega328P instruction set, register flags, ADC conversions, and interrupt states.
  • Flashing Guide: Connect the board over USB. Click Connect Serial. Select the COM port corresponding to your Uno (often labeled Arduino Uno or USB Serial). Click Flash. The IDE resets the chip over DTR serial flow, triggers the Optiboot bootloader, and uploads the HEX file in under 3 seconds. Ensure no serial feedback devices (like Bluetooth or GPS serial adapters) are connected to pins D0/D1 during uploads.

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)6 channels (A0–A5), 10-bit resolution (0–1023), no hardware DAC.
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, though 7–12V is the recommended safe range (Section 3 above) for reliable regulation without excess regulator heat.


8. Further Reading


Arduino Uno (ATmega328P) — OMS Parts