ATMEGA328P-AU - 8-bit AVR MCU 32KB Flash | Microchip
MPN: ATMEGA328P-AU β Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $2.5 | $2.50 |
| 10 | $2.25 | $22.50 |
| 100 | $1.95 | $195.00 |
| 500 | $1.75 | $875.00 |
| 1,000 | $1.6 | $1,600.00 |
Drop-in alternatives for ATMEGA328P-AU β same package, pin-to-pin compatible. Different-package parts requiring PCB rework are excluded.
Quick Comparison Tool β Select alternative parts for side-by-side comparison:
ATMEGA328PB-AU
β Drop-Inπ Reference alternative (not in catalog)
ATMEGA328P-AUR
β Drop-Inπ Reference alternative (not in catalog)
ATMEGA168PA-AU
β Drop-Inπ Reference alternative (not in catalog)
LGT8F328P
β Drop-Inπ Reference alternative (not in catalog)
ATMEGA328P-AU Maximum Ratings & Electrical Characteristics
| Core Processor | AVR |
| Core Size | 8-Bit |
| Speed | 20 MHz |
| Program Memory Size | 32 KB (16K x 16) |
| Program Memory Type | FLASH |
| EEPROM Size | 1 KB |
| RAM Size | 2 KB |
| Number of I/O | 23 |
| Number of Timers/Counters | 3 |
| ADC Channels | 8 |
| ADC Resolution | 10-bit |
| Operating Voltage | 1.8V to 5.5V |
| Operating Temperature | -40Β°C to +85Β°C |
| Package | 32-TQFP (7x7 mm) |
| Mounting Type | Surface Mount |
| RoHS Status | Compliant |
ATMEGA328P-AU Pin Configuration
| Pin 1 | PD3 (PCINT19/OC2B/INT1) β Port D, bit 3 - External interrupt 1, PWM output |
| Pin 2 | PD4 (PCINT20/XCK/T0) β Port D, bit 4 - USART external clock, timer0 external counter |
| Pin 3 | GND β Ground |
| Pin 4 | VCC β Digital supply voltage |
| Pin 5 | GND β Ground |
| Pin 6 | VCC β Digital supply voltage |
| Pin 7 | XTAL1/TOSC1 β Crystal oscillator input or timer oscillator |
| Pin 8 | XTAL2/TOSC2 β Crystal oscillator output or timer oscillator |
| Pin 9 | PD5 (PCINT21/OC0B/T1) β Port D, bit 5 - PWM output, timer1 external counter |
| Pin 10 | PD6 (PCINT22/OC0A/AIN0) β Port D, bit 6 - PWM output, analog comparator positive input |
| Pin 11 | PD7 (PCINT23/AIN1) β Port D, bit 7 - Analog comparator negative input |
| Pin 12 | PB0 (PCINT0/CLKO/ICP1) β Port B, bit 0 - Clock output, timer1 input capture |
| Pin 13 | PB1 (PCINT1/OC1A) β Port B, bit 1 - PWM output |
| Pin 14 | PB2 (PCINT2/OC1B/SS) β Port B, bit 2 - PWM output, SPI slave select |
| Pin 15 | PB3 (PCINT3/OC2A/MOSI) β Port B, bit 3 - PWM output, SPI master out |
| Pin 16 | PB4 (PCINT4/MISO) β Port B, bit 4 - SPI master in |
| Pin 17 | PB5 (PCINT5/SCK) β Port B, bit 5 - SPI clock |
| Pin 18 | AVCC β Analog supply voltage |
| Pin 19 | ADC7 β ADC input channel 7 |
| Pin 20 | AREF β Analog reference |
| Pin 21 | GND β Ground |
| Pin 22 | ADC6 β ADC input channel 6 |
| Pin 23 | PC0 (PCINT8/ADC0) β Port C, bit 0 - ADC input channel 0 |
| Pin 24 | PC1 (PCINT9/ADC1) β Port C, bit 1 - ADC input channel 1 |
| Pin 25 | PC2 (PCINT10/ADC2) β Port C, bit 2 - ADC input channel 2 |
| Pin 26 | PC3 (PCINT11/ADC3) β Port C, bit 3 - ADC input channel 3 |
| Pin 27 | PC4 (PCINT12/ADC4/SDA) β Port C, bit 4 - ADC input, I2C data |
| Pin 28 | PC5 (PCINT13/ADC5/SCL) β Port C, bit 5 - ADC input, I2C clock |
| Pin 29 | PC6 (PCINT14/RESET) β Port C, bit 6 - Reset pin (active low) |
| Pin 30 | PD0 (PCINT16/RXD) β Port D, bit 0 - USART receive |
| Pin 31 | PD1 (PCINT17/TXD) β Port D, bit 1 - USART transmit |
| Pin 32 | PD2 (PCINT18/INT0) β Port D, bit 2 - External interrupt 0 |
Safe Operating Area (SOA) & Thermal Characteristics
No official SOA curve available for this digital IC. Always operate within absolute maximum ratings specified in the datasheet. Ensure adequate cooling and derate as needed.
Typical Applications
ATMEGA328P-AU is suitable for 6 applications: Arduino Development Boards, IoT Sensor Nodes, Motor Control, Wearable Devices, Educational Platforms, Home Automation.
Arduino Development Boards
The ATMEGA328P-AU is the core of Arduino Uno and Nano boards, providing a familiar platform for hobbyists and professionals. Its 32 KB flash and rich peripheral set support a wide range of projects, from LED blinkers to complex sensor networks. The 20 MHz clock and 10-bit ADC enable precise analog readings, while the USART, SPI, and I2C interfaces allow easy communication with modules. The low-power sleep modes are beneficial for battery-powered Arduino projects, extending battery life significantly. The extensive community support and libraries make development rapid and efficient.
Recommended
IoT Sensor Nodes
In IoT applications, the ATMEGA328P-AU excels as a low-power sensor node controller. Its picoPower technology allows sleep currents as low as 0.2 Β΅A, enabling years of operation on coin-cell batteries. The 8-channel 10-bit ADC can interface with various analog sensors, while the I2C and SPI interfaces connect to digital sensors like temperature, humidity, and pressure sensors. The device can wake up periodically to read sensors and transmit data via a radio module (e.g., LoRa, Zigbee) using the USART. The 32 KB flash is sufficient for sensor firmware and communication protocols. The wide operating voltage range (1.8V-5.5V) accommodates different battery chemistries.
Recommended
Motor Control
The ATMEGA328P-AU is well-suited for small motor control applications, such as drones, robots, and CNC machines. It features six PWM channels with high resolution, enabling smooth speed control of DC motors and servos. The 16-bit timer can generate precise PWM signals for servo control. The device's 20 MHz clock provides fast response for closed-loop control algorithms. The ADC can read current sensors and encoders for feedback. The 23 I/O pins allow interfacing with motor drivers, H-bridges, and quadrature encoders. The industrial temperature grade (-40Β°C to +85Β°C) ensures reliable operation in harsh environments. For more complex motor control, consider the ATmega328PB with additional timers.
Recommended
Wearable Devices
The ATMEGA328P-AU's low power consumption and small TQFP package make it ideal for wearable devices like fitness trackers and smartwatches. The device can operate at 1.8V, directly compatible with lithium-ion batteries. The power-down mode with wake-up on external interrupt or watchdog timer allows the MCU to sleep most of the time, consuming only microamps. The integrated temperature sensor and ADC can monitor body temperature and battery voltage. The I2C interface connects to accelerometers and heart-rate sensors. The 32 KB flash is enough for firmware and data logging. The 23 I/O pins support displays, buttons, and haptic drivers. The device's robustness and long-term availability make it a reliable choice for consumer wearables.
Recommended
Educational Platforms
The ATMEGA328P-AU is widely used in educational settings to teach embedded systems and programming. Its simplicity and extensive documentation make it accessible to beginners. The Arduino ecosystem provides a low-barrier entry with a user-friendly IDE and countless tutorials. The device's 32 KB flash allows students to implement moderately complex projects, such as line-following robots, weather stations, and home automation systems. The 10-bit ADC and PWM enable analog and digital experiments. The DIP and TQFP packages accommodate both breadboard and SMD soldering practice. The low cost and availability of clones make it affordable for classroom use. The community support ensures students can find help online.
Recommended
Home Automation
In home automation, the ATMEGA328P-AU serves as a cost-effective controller for smart switches, thermostats, and lighting systems. Its 23 I/O pins can interface with relays, triacs, and sensors. The device can communicate with a central hub via UART, SPI, or I2C, or directly with Wi-Fi modules like ESP8266. The low-power modes allow battery-operated devices like wireless sensors to last for months. The 10-bit ADC can read light levels and temperature for automated lighting and HVAC control. The flash memory can store configuration settings and schedules. The device's reliability and long lifecycle make it suitable for always-on applications. For more complex automation, consider the ATmega328PB with additional serial interfaces.
Recommended
Recommended Products Summary
Engineering reference data for ATMEGA328P-AU β comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | ATMEGA328PB-AU | ATMEGA328P-AUR | ATMEGA168PA-AU | ATMEGA328P-MU |
|---|---|---|---|---|---|
| Package | 32-TQFP (7x7 mm) | 32-TQFP (7x7 mm) - same | 32-TQFP (7x7 mm) - same | 32-TQFP (7x7 mm) - same | 32-QFN (5x5 mm) - different |
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Flash Memory | 32 KB | 32 KB | 32 KB | 16 KB | 32 KB |
| SRAM | 2 KB | 2 KB | 2 KB | 1 KB | 2 KB |
| EEPROM | 1 KB | 1 KB | 1 KB | 512 B | 1 KB |
| Number of I/O | 23 | 28 | 23 | 23 | 23 |
| Max Clock Speed | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz |
| Operating Voltage | 1.8V - 5.5V | 1.8V - 5.5V | 1.8V - 5.5V | 1.8V - 5.5V | 1.8V - 5.5V |
| Price (1 unit) | $2.50 | $2.80 | $2.50 | $1.80 | $2.60 |
Key Differentiators
- Industry-standard Arduino compatibility (vs PIC16F887-I/PT)
- Ultra-low power consumption (vs STM32F030C8T6)
- Wide operating voltage range (vs MSP430G2553IPW28R)
Design Notes
The ATMEGA328P-AU operates from 1.8V to 5.5V. For low-power applications, use the lowest voltage that meets the clock speed requirement. At 1.8V, the maximum clock speed is 8 MHz. Use the internal 8 MHz RC oscillator to avoid external crystal power consumption. In sleep modes, disable the ADC and analog comparator to reduce current. Use the Power-down mode with a watchdog timer for periodic wake-ups.
Place a 100 nF decoupling capacitor close to each VCC pin and a 10 Β΅F capacitor at the power entry point. For the AVCC pin, use an LC filter (10 Β΅H inductor and 100 nF capacitor) to reduce noise for ADC accuracy. Connect AREF to a stable reference voltage or use the internal 1.1V reference. Ensure the reset pin has a 10 kΞ© pull-up resistor and a 100 nF capacitor to ground for reliable reset.
When using the internal RC oscillator, note that the accuracy is Β±10% over temperature and voltage. For applications requiring precise timing, use an external crystal (e.g., 16 MHz) with two 22 pF load capacitors. Also, ensure the SPI and I2C pins are not left floating; use pull-up resistors on I2C lines (4.7 kΞ©). The ADC input impedance is high, but for accurate readings, use a low-impedance source or add a buffer amplifier.
Compliance Information
RoHS compliant per Microchip product page. Not AEC-Q100 qualified. Lead-free finish.