Opens in a new tab

ATmega328P-PU

8-bit AVR MCU, 32KB Flash, 20MHz, 28-PDIP, Arduino Uno core

8500

Effective Inventory

Image for reference only

Manufacturer Part:

ATmega328P-PU

Package:

28-PDIP (0.300″, 7.62mm)

Brand:

Quality Commitment

Shipping & Payment

Service & Packaging

Product Manual

Other recommendations you may be interested in.

Description

Product Overview

The ATmega328P-PU from Microchip Technology (formerly Atmel) is a high-performance, low-power 8-bit AVR RISC microcontroller with 32KB ISP Flash, 2KB SRAM, 1KB EEPROM, 23 I/O lines, 10-bit ADC, and 6 PWM channels in a 28-pin PDIP through-hole package. It is the MCU at the heart of the Arduino Uno and Nano boards.

Key Specifications

  • Core: 8-bit AVR RISC, 131 instructions, most single-cycle
  • Max Speed: 20MHz (at 4.5-5.5V)
  • Flash: 32KB (in-system programmable, read-while-write)
  • SRAM: 2KB
  • EEPROM: 1KB (100,000 write/erase cycles)
  • Supply Voltage: 1.8V ~ 5.5V
  • I/O Pins: 23
  • ADC: 6-channel 10-bit (PDIP) / 8-channel (TQFP/QFN)
  • PWM: 6 channels
  • Timers: 2× 8-bit + 1× 16-bit with capture/compare
  • Communication: USART, SPI (master/slave), I2C (TWI)
  • Watchdog Timer: With independent on-chip oscillator
  • Analog Comparator: 1
  • Operating Temperature: -40°C ~ 85°C
  • Package: 28-PDIP (0.300″, 7.62mm)
  • Power (1MHz, 1.8V): Active 0.2mA, Power-down 0.1µA, Power-save 0.75µA
  • Self-Programming: Boot loader support via USART or SPI

Features

  • picoPower technology for ultra-low power consumption
  • 6 software-selectable sleep modes
  • 32×8 general-purpose working registers
  • On-chip 2-cycle multiplier
  • 20-year data retention at 85°C
  • QTouch library support for capacitive sensing
  • Internal calibrated RC oscillator (8MHz)
  • Programmable brown-out detection (BOD)
  • Through-hole PDIP package ideal for prototyping

Applications

  • Arduino Uno / Nano boards
  • Sensor interface and data acquisition
  • Battery-powered instruments
  • Home automation controllers
  • LED lighting and display control
Product Introduction: ATmega328P-PU Product Introduction

The ATmega328P-PU from Microchip Technology is the iconic 8-bit AVR microcontroller that powers the Arduino Uno, the world’s most popular development board. Its 32KB Flash provides ample program space for Arduino sketches, while the 2KB SRAM and 1KB EEPROM handle runtime variables and persistent settings. The 28-pin PDIP package makes it ideal for breadboard prototyping and through-hole assembly. The AVR RISC architecture executes most instructions in a single clock cycle, achieving near 1 MIPS per MHz throughput. The ATmega328P-PU supports in-system programming via SPI and self-programming through a boot loader, enabling firmware updates without a dedicated programmer. The -PU suffix indicates PDIP-28 package with industrial temperature range and tube packaging.

Working Principle: ATmega328P-PU Working Principle

The ATmega328P-PU uses the AVR enhanced RISC architecture with a 2-stage pipeline: while one instruction is being executed, the next is being fetched from Flash. The 32×8 general-purpose working registers are directly connected to the ALU, allowing two registers to be accessed in a single clock cycle — a key factor in the 1 MIPS/MHz throughput. The Harvard architecture separates 32KB Flash (program) from 2KB SRAM (data) address spaces, with the 1KB EEPROM accessed through dedicated I/O registers. The I/O memory-mapped peripheral registers control timers, USART, SPI, TWI, ADC, and pin functions. The 10-bit ADC uses a successive approximation register (SAR) with a conversion time of 13-260µs depending on clock prescaler. The 6 PWM channels are generated by the timer/counter modules in Fast PWM or Phase-Correct PWM modes. Sleep modes (Idle, ADC Noise Reduction, Power-save, Power-down, Standby, Extended Standby) shut down unused clock domains and peripherals to reduce power consumption down to 0.1µA in Power-down mode.

Pin Description: ATmega328P-PU Pin Definition and Functions
Pin Name Key Alternate Functions
1 PC6 (RESET) Reset input (active low); can be disabled by fuse
2 PD0 (RXD) USART receive, PCINT18
3 PD1 (TXD) USART transmit, PCINT19
4 PD2 (INT0) External interrupt 0, PCINT18
5 PD3 (INT1/OC2B) External interrupt 1, PWM Timer2
6 PD4 T0, XCK, PCINT20
7 VCC Power supply (1.8-5.5V)
8 GND Ground
9 PB6 (XTAL1) Crystal oscillator input / TOSC1
10 PB7 (XTAL2) Crystal oscillator output / TOSC2
11 PD5 (OC0B/T1) PWM Timer0, Timer1 clock
12 PD6 (OC0A/AIN0) PWM Timer0, comparator +
13 PD7 (AIN1) Comparator negative input
14 PB0 (ICP1/CLKO) Timer1 input capture, system clock output
15 PB1 (OC1A) PWM Timer1
16 PB2 (OC1B/SS) PWM Timer1, SPI slave select
17 PB3 (MOSI/OC2A) SPI data out, PWM Timer2
18 PB4 (MISO) SPI data in
19 PB5 (SCK) SPI clock
20 AVCC Analog power supply
21 AREF ADC reference voltage
22 GND Ground
23 PC0 (ADC0/SDA) ADC ch0, I2C data
24 PC1 (ADC1/SCL) ADC ch1, I2C clock
25 PC2 (ADC2) ADC ch2
26 PC3 (ADC3) ADC ch3
27 PC4 (ADC4/SDA) ADC ch4, I2C data (alt)
28 PC5 (ADC5/SCL) ADC ch5, I2C clock (alt)
Application Scenarios: In which products and applications is ATmega328P-PU used

The ATmega328P-PU is the heart of the Arduino Uno, where it runs the Arduino bootloader and user sketches with access to digital I/O, analog inputs, PWM outputs, and serial communication through the board’s headers. In custom sensor nodes, the low 0.2mA active current at 1MHz/1.8V and 0.1µA power-down current enable coin-cell operation for years. For LED lighting control, the 6 PWM channels provide smooth dimming with 8-bit or 10-bit resolution. The I2C interface connects to EEPROM, RTC, and sensor peripherals with minimal wiring. The through-hole PDIP package is preferred for educational and hobbyist use, while the TQFP version (ATmega328P-AU) is used in production designs requiring surface-mount assembly.

Alternative Models: What chips are recommended as replacements for ATmega328P-PU
Model Manufacturer Key Difference
ATmega328PB-AU Microchip Enhanced version, 2× USART, 2× SPI, QTouch, TQFP-32
ATmega328P-AU Microchip Same die, TQFP-32 surface-mount package
ATtiny3217 Microchip 16KB Flash, smaller 20-pin, lower cost
PIC16F18877-I/P Microchip 14KB Flash, 28-PDIP, PIC alternative

Recommend Parts

IRFS4310ZTRLPBF

IRFS4310ZTRLPBF – 100V N-Channel HEXFET Power MOSFET, 7 mΩ RDS(on), D2PAK (TO-263AB)

Brand: infineon

Package: D2PAK (TO-263AB)

IN STOCK: 11137pcs

Cargo cycle: 3-7 Days

The minimum order is 1

MSASJ105BB5475MFNA01

4.7uF 6.3V X5R MLCC, 0402, Taiyo Yuden

Brand: gigadevice

Package: 0402 (1005 Metric, 1.0 x 0.5 x 0.5 mm)

IN STOCK: 9701pcs

Cargo cycle: 3-7 Days

The minimum order is 1

IRF3415PBF

150V N-channel power MOSFET, 43A, 41mΩ RDS(on), TO-220AB package

Brand: infineon

Package: TO-220AB

IN STOCK: 2940pcs

Cargo cycle: 3-7 Days

The minimum order is 1

105017-1001

USB Type-C receptacle connector, 24-pin, SMD

Brand: Amphenol

Package: SMD (8.9 x 7.3 x 3.2 mm, right angle)

IN STOCK: 5335pcs

Cargo cycle: 3-7 Days

The minimum order is 1

IRLB3034PBF

IRLB3034PBF – 40V N-Channel StrongIRFET Power MOSFET (Logic Level), 1.7 mΩ (max) @ 10V; 2.0 mΩ @ 4.5V RDS(on), TO-220AB

Brand: infineon

Package: TO-220AB

IN STOCK: 9724pcs

Cargo cycle: 3-7 Days

The minimum order is 1

XC6SLX75-2FGG484I

Spartan-6 LX75 FPGA, 74637 logic cells, 132 DSP, 3096KB BRAM, 408 I/O, FBGA-484 23x23mm, -2 speed, industrial -40~100C, AMD Xilinx

Brand: xilinx

Package: FGG484 (484-ball fine-pitch BGA, 23x23mm body, 1.0mm ball pitch, 22×22 ball array, 6 I/O banks, lead-free)

IN STOCK: 890pcs

Cargo cycle: 3-7 Days

The minimum order is 1