What Is the ATmega328P? Arduino's MCU: Specs and Uses
The ATmega328P is the 8-bit AVR microcontroller at the heart of the Arduino Uno and Nano. With 32 KB flash, 2 KB SRAM, 1 KB EEPROM, 23 GPIO (6 with ADC) and UART/SPI/I2C peripherals, it runs from 1.8–5.5 V up to 16 MHz. It is one of the most common hobby-to-product MCUs for reading sensors, driving motors and communication.
The ATmega328P is the 8-bit AVR microcontroller at the heart of the Arduino Uno and Nano. With strong peripherals, huge community support and easy programming, it is one of the most common MCUs from hobby to product. For the concept, see what is a microcontroller (MCU).
What is the ATmega328P used for?
Reading sensors, driving motors/relays, communication (UART/SPI/I2C) and general embedded control. It is programmed with the Arduino IDE and runs with very few external parts (a crystal + caps, or the internal oscillator).
Highlights
| Parameter | Value |
|---|---|
| Core | 8-bit AVR |
| Flash / SRAM / EEPROM | 32 KB / 2 KB / 1 KB |
| GPIO | 23 (23 digital, 6 with 10-bit ADC) |
| Clock | up to 16 MHz (5 V), internal 8 MHz RC |
| Supply | 1.8 – 5.5 V |
| Peripherals | UART, SPI, I2C (TWI), Timers, PWM, WDT |
| Package | PDIP-28, TQFP-32, QFN-32 |
Pinout (functional — PDIP-28)
Grouped as ports: PB0-PB7, PC0-PC6 (PC6 = RESET), PD0-PD7 (PD0/PD1 = UART RX/TX). Power: VCC, GND, AVCC (ADC reference), AREF. Crystal: XTAL1/XTAL2 (PB6/PB7). See the datasheet for the full pin map.
Limitations
- 8-bit and low RAM (2 KB); for heavy processing use a 32-bit part (e.g. the STM32F103C8).
- No wireless; for WiFi/BT use the ESP32/ESP8266.
Equivalents and alternatives
- ATmega168 / ATmega88: relatives with smaller flash.
- ATtiny85: an 8-pin AVR for small projects.
- ATmega2560: the many-pin MCU of the Arduino Mega.
- STM32F103C8: a more powerful 32-bit alternative.
Find it in our catalog
Use the ATmega328P search.