ATMEGA328P-PU - 8-bit AVR MCU 32KB Flash 28-PDIP | Microchip
MPN: ATMEGA328P-PU β Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $0 | $0.00 |
| 10 | $0 | $0.00 |
| 100 | $0 | $0.00 |
| 500 | $0 | $0.00 |
| 1,000 | $0 | $0.00 |
ATMEGA328P-PU Overview
An 8-bit microcontroller (MCU) is a single-chip computer that integrates a processor core, program memory, data memory, and peripherals such as timers, UART, SPI, and I2C on one die. Within the power-management hierarchy of embedded systems, an MCU sits between discrete logic and full application processors, executing control and sensing tasks in cost-sensitive designs. The AVR family, originally developed by Atmel and now part of Microchip Technology, popularized single-cycle RISC execution for 8-bit control.
The ATMEGA328P-PU executes 131 powerful instructions, most in a single clock cycle, through its AVR advanced RISC architecture with 32 general-purpose working registers. The P suffix denotes picoPower technology, delivering low power consumption with multiple sleep modes for battery-operated designs. Program memory supports In-System Programming (ISP) with read-while-write capability, enabling firmware updates over the Arduino bootloader or an ISP programmer such as the USBasp or AVRISP mkII.
The architecture pairs a Harvard-memory AVR core with a 10-bit ADC, three flexible timers (two 8-bit and one 16-bit), a full-duplex USART, and hardware SPI and TWI (I2C) interfaces. Operating voltage for the -PU grade is 4.5 V to 5.5 V, which supports direct 5 V logic interfacing without level shifting.
Typical applications include Arduino-compatible educational and maker boards, home automation and IoT sensor nodes, industrial control panels, and legacy equipment service replacements where a socketed DIP part simplifies field repair.
Design tip: keep the clock at 16 MHz for full 5 V Arduino compatibility; the -PU grade is rated for 20 MHz max clock in the 4.5 V to 5.5 V supply window per DigiKey listing. Always decouple VCC and AVCC with 100 nF capacitors.
This page synthesizes drop-in alternatives, package comparison data, and practical design notes not found in the manufacturer datasheet, with pricing as of 2026-09-17.
Drop-in alternatives for ATMEGA328P-PU β same package, pin-to-pin compatible. Different-package parts requiring PCB rework are excluded.
Variants in this series
Same-series models that are drop-in compatible with ATMEGA328P-PU (same form factor and footprint) β differing in Package, Communication Interfaces, RoHS Status, Supply Voltage Range, ADC.
Quick Comparison Tool β Select alternative parts for side-by-side comparison:
ATMEGA328-PU
β Drop-In β οΈ εζ°εΎ ιͺθ―π Reference alternative (not in catalog)
ATMEGA168PA-PU
β Drop-In β οΈ εζ°εΎ ιͺθ―β In Stock
$1.86 / Unit
View Datasheet βATMEGA168V-10PU
β Drop-Inβ In Stock
$2.01 / Unit
View Datasheet βATMEGA88PA-PU
β Drop-Inπ Reference alternative (not in catalog)
ATMEGA48PA-PU
β Drop-Inπ Reference alternative (not in catalog)
ATMEGA8-16PU
β Drop-Inπ Reference alternative (not in catalog)
ATMEGA328P-PU Maximum Ratings & Electrical Characteristics
| Core Architecture | 8-bit AVR RISC |
| Flash Program Memory | 32 KB (16K x 16) |
| EEPROM | 1 KB |
| SRAM | 2 KB |
| Maximum Clock Frequency | 20 MHz |
| Typical Arduino Clock Frequency | 16 MHz |
| Supply Voltage Range | 4.5 V to 5.5 V |
| General Purpose I/O Lines | 23 |
| Working Registers | 32 general purpose |
| Instructions | 131 instructions, most single-cycle |
| Package | 28-PDIP |
| Mounting Type | Through Hole |
| In-System Programming | Yes (ISP, read-while-write) |
| ADC | 10-bit |
| Product Series | AVR ATmega |
| Interface Peripherals | USART, SPI, TWI (I2C) |
ATMEGA328P-PU Pin Configuration
| Pin 1 | PC6 / RESET β Reset input (active low); digital I/O if RSTDISBL fuse programmed |
| Pin 2 | PD0 / RXD β Port D bit 0; USART receive |
| Pin 3 | PD1 / TXD β Port D bit 1; USART transmit |
| Pin 4 | PD2 / INT0 β Port D bit 2; external interrupt 0 |
| Pin 5 | PD3 / INT1 / OC2B β Port D bit 3; external interrupt 1; Timer2 PWM output B |
| Pin 6 | PD4 / T0 / XCK β Port D bit 4; Timer0 external clock; USART external clock |
| Pin 7 | VCC β Digital supply voltage (4.5 V to 5.5 V) |
| Pin 8 | GND β Ground |
| Pin 9 | PB6 / XTAL1 / TOSC1 β Port B bit 6; crystal oscillator input / RTC oscillator |
| Pin 10 | PB7 / XTAL2 / TOSC2 β Port B bit 7; crystal oscillator output / RTC oscillator |
| Pin 11 | PD5 / T1 / OC0B β Port D bit 5; Timer1 external clock; Timer0 PWM output B |
| Pin 12 | PD6 / AIN0 / OC0A β Port D bit 6; analog comparator positive input; Timer0 PWM output A |
| Pin 13 | PD7 / AIN1 β Port D bit 7; analog comparator negative input |
| Pin 14 | PB0 / ICP1 / CLK0 β Port B bit 0; Timer1 input capture; divisible system clock output |
| Pin 15 | PB1 / OC1A β Port B bit 1; Timer1 PWM output A |
| Pin 16 | PB2 / SS / OC1B β Port B bit 2; SPI slave select; Timer1 PWM output B |
| Pin 17 | PB3 / MOSI / OC2A β Port B bit 3; SPI master output; Timer2 PWM output A |
| Pin 18 | PB4 / MISO β Port B bit 4; SPI master input |
| Pin 19 | PB5 / SCK β Port B bit 5; SPI serial clock |
| Pin 20 | AVCC β ADC supply voltage; connect to VCC through low-pass filter |
| Pin 21 | AREF β ADC analog reference; decouple to GND with 100 nF when using internal reference |
| Pin 22 | GND β Ground |
| Pin 23 | PC0 / ADC0 β Port C bit 0; ADC channel 0 |
| Pin 24 | PC1 / ADC1 β Port C bit 1; ADC channel 1 |
| Pin 25 | PC2 / ADC2 β Port C bit 2; ADC channel 2 |
| Pin 26 | PC3 / ADC3 β Port C bit 3; ADC channel 3 |
| Pin 27 | PC4 / ADC4 / SDA β Port C bit 4; ADC channel 4; TWI data |
| Pin 28 | PC5 / ADC5 / SCL β Port C bit 5; ADC channel 5; TWI clock |
Typical Applications
ATMEGA328P-PU is suitable for 6 applications: Arduino Uno R3 Compatible Boards, Home Automation and IoT Sensor Nodes, Industrial Control and Legacy Equipment Repair, Education and STEM Training Platforms, Consumer Appliances and Toys, Prototyping and Custom Embedded Development.
Arduino Uno R3 Compatible Boards
The ATMEGA328P-PU is the stock microcontroller of the Arduino Uno R3, running at 16 MHz from a 5 V rail with the standard Uno bootloader and fuse configuration. Its 32 KB Flash hosts sketches plus the 0.5 KB bootloader, while 2 KB SRAM and 1 KB EEPROM support typical maker projects. The DIP-28 package is a strategic advantage here: it is socketed, so failed chips can be swapped in seconds and pre-bootloaded chips (like replacement packs sold on Amazon) can be distributed to education labs. Use a 16 MHz crystal, 22 pF load capacitors, 10 kohm reset pull-up, and 100 nF decoupling on VCC and AVCC to match the official Uno reference design exactly.
Recommended
Home Automation and IoT Sensor Nodes
For 5 V sensor nodes reporting temperature, humidity, or occupancy, the ATMEGA328P-PU combines picoPower sleep modes with the peripherals hobbyist and commercial designs already use: PC4/PC5 SDA/SCL for I2C sensors (BME280-class), PD0/PD1 USART for external radio modules, and PB3-PB5 SPI for SD logging. In sleep-down states the ATmega328P draws microamp-level current, enabling months of battery life from 3x AA cells with a 5 V boost regulator feeding the -PU grade's 4.5-5.5 V window. The 10-bit ADC reads analog sensors directly at AVCC reference. The DIP package suits hand-assembled prototype nodes; migrate to ATMEGA328PB-AU (TQFP) for volume production and lower unit cost.
Recommended
Industrial Control and Legacy Equipment Repair
The ATMEGA328P-PU's DIP-28 socket footprint is why it persists in industrial service: legacy control boards from PLC peripherals to motor-start sequencers use socketed ATmegas specifically so field technicians can replace them without desoldering. The 5 V I/O tolerates industrial logic levels, the watchdog timer adds fault recovery, and the USART/SPI links to HMI displays or RS-485 transceivers. With a 20 MHz maximum clock rating at 4.5-5.5 V, timing headroom exists beyond the common 16 MHz. For long-life industrial designs, source from authorized channels (DigiKey, Rochester Electronics on DigiKey Marketplace) to avoid counterfeit clones, which are prevalent for this high-demand part number.
Recommended
Education and STEM Training Platforms
Educational platforms standardize on the ATMEGA328P-PU because the AVR core is simple enough to teach bare-metal concepts (registers, timers, interrupts) while remaining fully Arduino IDE compatible. The 131-instruction RISC set and 32 working registers map cleanly onto assembly-language coursework, and In-System Programming lets students burn bootloaders themselves with a USBasp. DIP packaging means students wire the crystal, reset circuit, and ISP header themselves on breadboards - a formative exercise impossible with QFN parts. At 16 MHz and 5 V, timing labs, PWM motor control, and ADC sampling exercises behave identically to the Uno, keeping curriculum and hardware aligned across academic generations.
Recommended
Consumer Appliances and Toys
Cost-sensitive consumer products - toy controllers, small appliance timers, LED novelty products - use the ATMEGA328P-PU when code size fits 32 KB and 5 V logic simplifies the BOM. The integrated 10-bit ADC reads potentiometers and NTC thermistors, three timers generate PWM for motors and LED dimming, and the internal 8 MHz RC oscillator can eliminate the external crystal in non-timing-critical toys, cutting two components. picoPower sleep modes matter for battery toys with standby functions. For high-volume consumer builds, ATMEGA328PB variants offer equivalent performance at roughly one-third the price with better supply stability per Seeed Studio reporting, making them the recommended production migration.
Recommended
Prototyping and Custom Embedded Development
Engineers prototyping a new product frequently begin with a solderless-breadboard ATMEGA328P-PU before committing to a custom PCB, because the DIP form factor, ubiquitous Arduino toolchain, and enormous community libraries (Servo, Ethernet, Adafruit sensors) compress development time. The part's ISP support allows fuse-level control of clock source (external 16 MHz crystal or internal 8/1 MHz RC), brown-out detection, and boot-size configuration. Once the firmware and schematic stabilize, the identical die is available as ATMEGA328P-AU (TQFP-32) or ATMEGA328P-MU (VQFN-32) for the production PCB, so firmware ports without modification. Keep AVCC tied to VCC through an LC filter for clean ADC results during development.
Recommended
Recommended Products Summary
Engineering reference data for ATMEGA328P-PU β comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | ATMEGA328-PU | ATMEGA168PA-PU | ATMEGA88PA-PU | ATMEGA48PA-PU | ATMEGA8-16PU |
|---|---|---|---|---|---|---|
| Package | 28-PDIP (through hole) | 28-PDIP - same | 28-PDIP - same | 28-PDIP - same | 28-PDIP - same | 28-PDIP - same |
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Flash Memory | 32 KB | 32 KB | 16 KB | 8 KB | 4 KB | 8 KB |
| SRAM | 2 KB | 2 KB | 1 KB | 1 KB | 0.5 KB | 1 KB |
| EEPROM | 1 KB | 1 KB | 512 B | 512 B | 256 B | 512 B |
| Supply Voltage | 4.5 V to 5.5 V | 4.5 V to 5.5 V | 1.8 V to 5.5 V (PA grade) | 1.8 V to 5.5 V (PA grade) | 1.8 V to 5.5 V (PA grade) | 4.5 V to 5.5 V |
| Max Clock Frequency | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 16 MHz |
| Arduino Ecosystem Compatibility | Uno R3 native | Uno-compatible (non-P die) | Arduino NG/older board profile | Third-party (MightyCore) | Third-party (MightyCore) | Third-party (MightyCore) |
| picoPower Technology | Yes | No | Yes | Yes | Yes | No |
Key Differentiators
- Largest Flash in the DIP-28 ATmega family (vs ATMEGA168PA-PU)
- Full Arduino Uno R3 native support (vs ATMEGA88PA-PU)
- Socketable DIP for field service (vs ATMEGA328P-AU)
- Trade-off: higher operating voltage floor than PA variants (vs ATMEGA168PA-PU)
Design Notes
On a breadboard or DIP socket, wire VCC (pin 7) and AVCC (pin 20) together through a 10 uH inductor or 10-ohm resistor with 100 nF to GND at each pin - AVCC must never float, even if the ADC is unused, or ADC readings are erratic. Add 100 nF ceramic decoupling directly across VCC/GND (pins 7/8) and keep the path to the regulator under 5 cm. The 16 MHz crystal needs 22 pF load capacitors within 10 mm of pins 9/10; long crystal traces cause intermittent start-up, a leading cause of 'dead Arduino' returns.
Factory-fresh ATMEGA328P-PU chips ship with fuse settings for a 1 MHz internal RC oscillator and no bootloader - they will not run Arduino sketches until the Uno bootloader is burned via ISP (Arduino as ISP sketch or USBasp) and fuses are set to the Uno configuration (external 16 MHz crystal). Also beware counterfeits: this part number is heavily cloned; devices with mismatched signatures or failed flash verify are common on grey-market channels. Buy from DigiKey, Mouser, or Rochester Electronics (authorized secondary) for traceable units.
The -PU grade requires 4.5 V to 5.5 V per DigChip specification data; do not feed it from a 3.3 V rail - code may run but is out of specification and flash writes (EEPROM/bootloader) become unreliable below 4.5 V at 16 MHz. Budget roughly 5 V x active current plus peripheral loads when sizing a linear regulator; estimated: with a typical 16 MHz active current in the tens of mA range, a TO-220 7805 with a 12 V input dissipates on the order of a few hundred mW at light loads, acceptable without a heatsink, but verify against the current datasheet figure for your exact conditions.
Keep the SPI bus (PB3-PB5) and the ISP header wired in a daisy-chain topology so programming does not conflict with peripheral devices: series 1 kohm resistors on MOSI, MISO, and SCK isolate attached slaves during flashing. Ensure RESET (pin 1) has a 10 kohm pull-up to VCC and an optional 100 nF cap to the DTR line of USB-serial adapters for auto-reset bootloader entry. Unpulled reset lines are the most common cause of chips entering random reset states near switching loads such as relays.
Compliance Information
Compliance data not present in the verified web data for this fetch. Most current Microchip ATmega production parts are RoHS-compliant, but this must be confirmed via the Microchip product page or distributor compliance certificate before specification.