Opens in a new tab

ATMEGA328-PU

8-bit AVR MCU, 32KB Flash, 2KB SRAM, 28-PDIP, 20MHz, non-picoPower version

2654

Effective Inventory

Image for reference only

Manufacturer Part:

ATMEGA328-PU

Package:

28-PDIP (34.54 x 7.62 mm, through-hole, 2.54mm pitch, PU package)

Brand:

Quality Commitment

Shipping & Payment

Service & Packaging

Product Manual

Description

Product Overview

The ATMEGA328-PU from Microchip is an 8-bit AVR RISC microcontroller with 32KB Flash, 2KB SRAM, 1KB EEPROM in a 28-pin PDIP through-hole package, operating at up to 20MHz. This is the non-picoPower version of the popular ATMEGA328P-PU used in Arduino Uno.

Key Specifications

Core 8-bit AVR RISC
Max Frequency 20 MHz
Flash Memory 32 KB (2KB for bootloader)
SRAM 2 KB
EEPROM 1 KB
I/O Pins 23
ADC 10-bit, 6 channels (PDIP)
Communication 1x USART, 2x SPI, 1x I2C (TWI)
PWM Channels 6
Timers 2x 8-bit, 1x 16-bit
Supply Voltage 1.8V to 5.5V
Package 28-PDIP (through-hole)
Operating Temperature -40 to +85 C
Lifecycle NRND (Not Recommended for New Designs)

Features

  • 32KB Flash with 10,000 erase/write cycle endurance
  • 23 programmable I/O lines with individual pull-up resistors
  • 6-channel 10-bit ADC with 15 kSPS conversion rate
  • 5 software-selectable power saving modes
  • In-system programmable via SPI
  • On-chip debug via debugWIRE interface

Applications

  • Arduino Uno compatible MCU
  • Embedded prototyping and hobby projects
  • Sensor interface and data acquisition
  • Low-cost motor control
  • IoT endpoint devices
Product Introduction: ATMEGA328-PU Product Introduction

The ATMEGA328-PU from Microchip (formerly Atmel) is the non-picoPower variant of the ATMEGA328P-PU, the iconic 8-bit AVR microcontroller that serves as the heart of the Arduino Uno development board. The key difference from the ATMEGA328P-PU is the absence of the picoPower technology, which provides ultra-low power consumption in power-save modes on the P-version. For most applications operating at 5V with active power modes, the performance and functionality are identical. The 32KB Flash provides ample code space for moderate-complexity applications including RTOS-based systems, communication protocol stacks, and data logging. The 2KB SRAM supports data buffering for UART and sensor interfaces, while the 1KB EEPROM provides non-volatile storage for calibration data and configuration parameters. The 28-pin PDIP through-hole package makes it ideal for prototyping, breadboarding, and educational applications. The device supports in-system programming (ISP) via SPI, allowing firmware updates without removing the chip from the circuit. The 23 I/O pins with individually selectable pull-up resistors provide flexible pin assignment for various application needs. The 10-bit ADC with 6 channels supports a wide range of analog sensor interfaces. The ATMEGA328-PU is designated NRND (Not Recommended for New Designs); Microchip recommends the ATMEGA328P-PU for new designs requiring lower power consumption.

Working Principle: ATMEGA328-PU Working Principle

The ATMEGA328-PU operates as an 8-bit AVR RISC microcontroller. Key subsystems include: (1) AVR Core – a modified Harvard architecture 8-bit RISC processor with 32 x 8-bit general-purpose registers; most instructions execute in a single clock cycle at 20MHz (up to 20 MIPS throughput); the 2-stage pipeline (fetch + execute) enables single-cycle execution for most instructions; the instruction set includes 131 instructions with 32×8 hardware multiply; (2) Memory – 32KB Flash organized as 16K x 16-bit words; 2KB SRAM accessed in 2 clock cycles; 1KB EEPROM with 100,000 erase/write cycle endurance; (3) I/O Ports – 23 I/O pins organized into 3 ports (PORTB, PORTC, PORTD); each pin has a data register (PORTx), direction register (DDRx), and input register (PINx); individual pull-up resistors can be enabled per pin; (4) ADC – a 10-bit successive-approximation ADC with 6 channels in PDIP package; 13-260us conversion time; auto-trigger capability from timer compare match; free-running mode for continuous conversion; (5) Debug – debugWIRE interface provides on-chip debug capability using a single-wire bidirectional connection on the RESET pin; supports breakpoints, single-step, and register/memory access without using any on-chip resources.

Pin Description: ATMEGA328-PU Pin Definition and Functions
Pin Name Function
1 PC6 (RESET) I/O, Reset (active low)
2 PD0 (RXD) I/O, USART Receive
3 PD1 (TXD) I/O, USART Transmit
4 PD2 (INT0) I/O, External Interrupt 0
5 PD3 (INT1/OC2B) I/O, External Interrupt 1, PWM
6 PD4 I/O, T0 timer clock
7 VCC Supply (1.8V to 5.5V)
8 GND Ground
9 PB6 (XTAL1/TOSC1) I/O, Crystal oscillator input
10 PB7 (XTAL2/TOSC2) I/O, Crystal oscillator output
11-17 PD5-PD7, PB0-PB3 I/O, Timer/PWM/SPI functions
18-28 PB4-PB5, PC0-PC6 I/O, ADC/I2C/Reset functions
Application Scenarios: In which products and applications is ATMEGA328-PU used
  • Arduino Uno: direct drop-in replacement for ATMEGA328P-PU in Arduino Uno boards, same pinout and electrical specs (without picoPower)
  • Sensor logger: 6-channel ADC reads multiple sensors, 2KB SRAM buffers data, SPI drives SD card, UART sends data to host
  • Motor controller: 6 PWM channels drive H-bridge, ADC reads current shunt, USART receives commands from host MCU
Alternative Models: What chips are recommended as replacements for ATMEGA328-PU
Manufacturer Part Number Package Notes
Microchip ATMEGA328P-PU 28-PDIP picoPower version, lower sleep current, recommended for new designs
Microchip ATMEGA328PB-AU TQFP-32 Enhanced version with 2x USART, SMD package
ST STM32F103C8T6 LQFP-48 32-bit Cortex-M3 upgrade path, 72MHz

Recommend Parts

TMP275AIDR

0.5C I2C temp sensor, 12-bit, 2.7-5.5V, alert output, 8-SOIC

Brand: TI

Package: 8-SOIC (4.90 x 3.91 x 1.50 mm)

IN STOCK: 3681pcs

Cargo cycle: 3-7 Days

The minimum order is 1

IL485E

NVE IL485E IsoLoop isolated RS-485 transceiver, 2.5kVrms isolation, 35Mbps, 16-SOIC WB

Brand: nve

Package: SOIC-16 WB

IN STOCK: 5280pcs

Cargo cycle: 3-7 Days

The minimum order is 1

IRFS4227TRLPBF

IRFS4227TRLPBF – 200V N-Channel HEXFET PDP Switch Power MOSFET, 26 mΩ RDS(on), D2PAK (TO-263)

Brand: infineon

Package: D2PAK (TO-263)

IN STOCK: 4334pcs

Cargo cycle: 3-7 Days

The minimum order is 1

CD4070BM96

Quad 2-input XOR gate, 3-18V CMOS, 65ns at 10V, SOIC-14

Brand: TI

Package: SOIC-14 (8.75 x 3.9 x 1.5mm)

IN STOCK: 4245pcs

Cargo cycle: 3-7 Days

The minimum order is 1

AB1526

Bluetooth 5.0 Dual Mode Audio SoC, TWS, AAC, Dual-mic ENC, Integrated Charger, BGA

Brand: airoha

Package: BGA

IN STOCK: 25000pcs

Cargo cycle: 3-7 Days

The minimum order is 1

LP2980IM5-5.0

50mA micropower ultra-low-dropout regulator, 5V, SOT-23-5

Brand: TI

Package: SOT-23-5 (2.9 x 1.6 x 1.1 mm)

IN STOCK: 2557pcs

Cargo cycle: 3-7 Days

The minimum order is 1