ATMEGA328P-AUR - 8-bit AVR MCU, 32KB Flash, 20MHz, TQFP-32 | Microchip
MPN: ATMEGA328P-AUR ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $3.42 | $3.42 |
| 10 | $3.05 | $30.50 |
| 100 | $2.61 | $261.00 |
| 500 | $2.34 | $1,170.00 |
| 1,000 | $2.18 | $2,180.00 |
ATMEGA328P-AUR Overview
An 8-bit AVR microcontroller is a single-chip computer based on the Harvard-architecture AVR enhanced RISC core that executes most instructions in a single clock cycle, providing deterministic throughput close to 1 MIPS per MHz. Within the broader hierarchy, the AVR belongs to the microcontroller family, which sits under embedded processors, semiconductors, and finally integrated circuits. The ATmega328P is the highest-memory variant in the ATmega48/88/168/328P family, making it the de-facto choice for hobbyist platforms such as the Arduino Uno and for cost-sensitive industrial control nodes.
Key features include 23 programmable I/O lines, two 8-bit timers plus one 16-bit timer, a 10-bit ADC with up to 8 channels, six PWM channels, an analog comparator, and a full-duplex USART. Peripherals also include SPI, I2C (TWI), an internal calibrated oscillator, and six software-selectable power-saving modes that allow the MCU to drop below 1 uA in power-down. The RISC core provides 131 powerful instructions and up to 32 x 8 general-purpose working registers, enabling C-compiled firmware to execute efficiently within the tight 2 KB SRAM.
The architecture uses a two-stage pipeline with multi-cycle hardware multipliers and a separate instruction and data bus, which is what makes single-cycle instruction execution possible. The on-chip boot loader support, combined with in-system programming via SPI, lets firmware be updated in the field without removing the part. The integrated power-on reset and brown-out detector plus a watchdog timer with a separate on-chip oscillator harden unattended designs against supply glitches.
Typical applications include Arduino-compatible boards, sensor interface nodes, consumer appliances, small motor control, industrial telemetry, USB-to-UART bridges, and educational kits. The combination of low BOM cost, broad toolchain support (AVR-GCC, Microchip Studio, Arduino IDE), and decades of design heritage makes the ATmega328P-AUR a default choice for both prototype and production designs.
When designing with this part, note that the -AU/-AUR suffix designates the 32-pin TQFP package, so PCB layout and pinout diagrams from the ATmega328P datasheet family apply directly. Ensure decoupling of VCC/AVCC with 100 nF plus 10 uF bulk capacitance placed close to the pins, and route the RESET line away from switching nodes to avoid spurious resets in noisy environments.
This page synthesizes distributor pricing, drop-in alternatives within the AVR family, and practical design notes not found in the manufacturer datasheet, giving the engineer a single reference for sourcing and design decisions.
Drop-in alternatives for ATMEGA328P-AUR — 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-AUR (same form factor and footprint) — differing in Package, Communication Interfaces, Operating Temperature, ADC, Supply Voltage Range.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
ATMEGA328P-AU
✅ Drop-In✓ In Stock
$1.74 / Unit
View Datasheet →ATMEGA328PB-AUR
✅ Drop-In✓ In Stock
$1.31 / Unit
View Datasheet →ATMEGA168PA-AUR
✅ Drop-In✓ In Stock
$1.85 / Unit
View Datasheet →ATMEGA88PA-AUR
✅ Drop-In✓ In Stock
$0.82 / Unit
View Datasheet →ATMEGA164A-AU
✅ Drop-In✓ In Stock
$2.65 / Unit
View Datasheet →ATMEGA324PV-10AU
✅ Drop-In✓ In Stock
$4.3 / Unit
View Datasheet →LGT8F328P
✅ Drop-In📋 Reference alternative (not in catalog)
ATMEGA328P-AUR Maximum Ratings & Electrical Characteristics
| Core Architecture | AVR 8-bit RISC |
| Program Memory (Flash) | 32 KB |
| SRAM | 2 KB |
| EEPROM | 1 KB |
| Maximum Clock Frequency | 20 MHz |
| Supply Voltage Range | 1.8 V to 5.5 V |
| Operating Temperature Range | -40 C to +85 C (Industrial) |
| I/O Pins | 23 programmable |
| ADC | 10-bit, up to 8 channels |
| PWM Channels | 6 |
| Timers | 2 x 8-bit, 1 x 16-bit |
| Communication Interfaces | USART, SPI, I2C (TWI) |
| Package | 32-pin TQFP, 7x7 mm, 0.8 mm pitch |
| Mounting Type | Surface Mount |
| Instruction Set | 131 instructions, mostly single-cycle |
| Working Registers | 32 x 8-bit |
| Watchdog Timer | Yes, with separate on-chip oscillator |
| Brown-out Detection | Yes |
| Power-Saving Modes | 6 software-selectable |
| MSL Level | 3 (168 hours) |
| RoHS Status | Compliant |
| Throughput | 20 MIPS at 20 MHz |
ATMEGA328P-AUR Pin Configuration
| Pin 1 | PC6/RESET — Reset input, active low. Internal pull-up enabled by default. |
| Pin 2 | PD0/RXD — Digital I/O pin 0 / USART RX input. |
| Pin 3 | PD1/TXD — Digital I/O pin 1 / USART TX output. |
| Pin 4 | PD2/INT0 — Digital I/O pin 2 / External interrupt 0. |
| Pin 5 | PD3/INT1 — Digital I/O pin 3 / External interrupt 1 / OC2B PWM. |
| Pin 6 | PD4/T0 — Digital I/O pin 4 / Timer0 clock input. |
| Pin 7 | VCC — Digital supply voltage (1.8 V to 5.5 V). |
| Pin 8 | GND — Digital ground. |
| Pin 9 | PB6/XTAL1 — Digital I/O pin 6 / External crystal oscillator input. |
| Pin 10 | PB7/XTAL2 — Digital I/O pin 7 / External crystal oscillator output. |
| Pin 11 | PD5/T1 — Digital I/O pin 5 / Timer1 clock input / OC0B PWM. |
| Pin 12 | PD6/AIN0 — Digital I/O pin 6 / Analog comparator positive input / OC0A PWM. |
| Pin 13 | PD7/AIN1 — Digital I/O pin 7 / Analog comparator negative input. |
| Pin 14 | PB0/ICP1 — Digital I/O pin 8 / Timer1 input capture. |
| Pin 15 | PB1/OC1A — Digital I/O pin 9 / Timer1 PWM channel A. |
| Pin 16 | PB2/SS/OC1B — Digital I/O pin 10 / SPI slave select / OC1B PWM. |
| Pin 17 | PB3/MOSI/OC2A — Digital I/O pin 11 / SPI MOSI / OC2A PWM. |
| Pin 18 | PB4/MISO — Digital I/O pin 12 / SPI MISO. |
| Pin 19 | PB5/SCK — Digital I/O pin 13 / SPI clock / LED pin on Arduino. |
| Pin 20 | AVCC — Analog supply voltage; tie to VCC through a low-pass filter. |
| Pin 21 | AREF — ADC reference voltage input; decouple to AGND. |
| Pin 22 | GND — Analog ground. |
| Pin 23 | PC0/ADC0 — Digital I/O / ADC input channel 0. |
| Pin 24 | PC1/ADC1 — Digital I/O / ADC input channel 1. |
| Pin 25 | PC2/ADC2 — Digital I/O / ADC input channel 2. |
| Pin 26 | PC3/ADC3 — Digital I/O / ADC input channel 3. |
| Pin 27 | PC4/ADC4/SDA — Digital I/O / ADC channel 4 / I2C data. |
| Pin 28 | PC5/ADC5/SCL — Digital I/O / ADC channel 5 / I2C clock. |
| Pin 29 | PC6/RESET — (See pin 1 - mirrored) Reset input, active low. |
| Pin 30 | PD0/RXD — (See pin 2 - mirrored) USART RX input. |
| Pin 31 | PD1/TXD — (See pin 3 - mirrored) USART TX output. |
| Pin 32 | PD2/INT0 — (See pin 4 - mirrored) External interrupt 0. |
Typical Applications
ATMEGA328P-AUR is suitable for 7 applications: Arduino-Compatible Boards, Sensor Interface Nodes, Consumer Appliance Control, USB-to-UART Bridges and HID Devices, Motor and Lighting Control, Educational Platforms and Prototyping, Battery-Powered Remote Telemetry.
Arduino-Compatible Boards
The ATMEGA328P-AUR is the de-facto 8-bit MCU inside the Arduino Uno and compatible derivatives, where its 32 KB Flash holds the Optiboot boot loader plus user sketches and its 2 KB SRAM supports libraries such as Wire, SPI, and Servo. The 5 V-tolerant GPIO and on-chip ADC let students and engineers read potentiometers, drive LEDs, and bit-bang protocols without external level shifters. The integrated USART plus TWI peripherals mean the same board can host shields for SD cards, RTCs, and LCDs with no extra silicon. For board designers, the TQFP-32 footprint is easy to hand-solder with hot air and reflows cleanly on a 7x7 mm land pattern. The Microchip ATmega328P family guarantees long-term firmware and toolchain stability for both education and production designs.
Recommended
Sensor Interface Nodes
The ATMEGA328P-AUR is widely used as a low-cost sensor aggregator node, reading I2C sensors (temperature, humidity, pressure) and serial sensors over USART or SPI, then forwarding results through a wired interface. The 10-bit ADC and internal 1.1 V bandgap reference enable accurate ratiometric measurements from thermistors and bridges at 5 V supply. With six power-saving modes plus a watchdog timer, battery-powered nodes can achieve weeks of operation from a 9 V cell. The 2 KB SRAM comfortably buffers a few hundred samples before forwarding, and the 32 KB Flash fits simple protocol stacks (Modbus RTU, MQTT-SN gateways). Industrial designers favor this part for its deterministic 20 MIPS AVR core that meets real-time loop deadlines without an RTOS.
Recommended
Consumer Appliance Control
Small kitchen appliances, white goods sub-modules, and HVAC controllers rely on the ATMEGA328P-AUR for keypad input, LED or 7-segment display driving, and PWM control of fans or heaters. Six PWM channels drive MOSFET gates or opto-triacs at low duty cycles for proportional control. The 23 GPIO lines are sufficient for matrix keypads (4x4) plus relay outputs without external expanders. The 5 V supply rail is friendly to white-goods power architectures and lets the MCU directly drive logic-level inputs. Industrial temperature rating (-40 C to +85 C) supports under-counter appliance environments. Microchip's long-term product support keeps these designs in production for 10-plus years.
Recommended
USB-to-UART Bridges and HID Devices
Paired with a USB-serial converter IC, the ATMEGA328P-AUR acts as a programmable bridge between USB and RS-232/RS-485 networks, or emulates HID keyboards, mice, and gamepads. The full-duplex USART supports high baud rates, while the ATmega's two hardware timers handle debouncing and periodic HID reports. The on-chip 8 MHz calibrated RC oscillator can be re-caled against the USB SOF for accurate timing without an external crystal. In HID applications the 32 KB Flash fits the USB descriptor table plus custom HID reports. The internal pull-up resistors on the I2C and USART lines minimize external BOM cost.
Recommended
Motor and Lighting Control
The ATMEGA328P-AUR drives small DC motors, stepper drivers, and LED strings via its six PWM channels and 23 GPIO. PWM frequencies up to 62.5 kHz at 8-bit resolution are easily programmed through the AVR timers, suitable for both brushed DC and BLDC commutation via external FET drivers. The integrated 10-bit ADC reads back current-sense amplifiers and potentiometers for closed-loop control. With 5 V-tolerant inputs and outputs, the MCU interfaces directly to logic-level gate drivers and opto-isolators. Designers use the ATmega328PB-AUR upgrade when they need the second USART for sensor feedback on a BLDC controller.
Recommended
Educational Platforms and Prototyping
Universities and makers use the ATMEGA328P-AUR as the workhorse teaching microcontroller because of the Arduino IDE's low learning curve and the breadth of community libraries. Students learn register-level AVR programming with the same chip they prototype with, easing the transition to bare-metal Atmel Studio or Microchip Studio projects. The 32 KB Flash is enough for textbook exercises on RTOS-lite, TCP/IP, or USB stacks, while the 2 KB SRAM handles meaningful data structures. TQFP-32 breakout boards from Adafruit, SparkFun, and clones expose every pin to a breadboard, accelerating lab cycles.
Recommended
Battery-Powered Remote Telemetry
With six software-selectable power-saving modes and a brown-out detector, the ATMEGA328P-AUR fits battery-powered telemetry nodes that wake periodically to read sensors and transmit via UART radio. Power-down mode drops consumption below 1 uA, preserving coin-cell life for months. The 32 KB Flash accommodates simple MAC-layer protocols and rolling-code transmitters, while 2 KB SRAM buffers radio packets before transmission. The internal 8 MHz oscillator eliminates the need for an external crystal in cost-driven designs, and the calibrated 128 kHz watchdog timer serves as a low-power wake source. Industrial designers rate this part for unattended data loggers in remote sites.
Recommended
Recommended Products Summary
Engineering reference data for ATMEGA328P-AUR — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | ATMEGA328P-AU | ATMEGA328PB-AUR | ATMEGA168PA-AUR | ATMEGA164A-AU | LGT8F328P |
|---|---|---|---|---|---|---|
| Package | TQFP-32 (7x7 mm) | TQFP-32 (7x7 mm) - same | TQFP-32 (7x7 mm) - same | TQFP-32 (7x7 mm) - same | TQFP-32 (7x7 mm) - same | TQFP-32 - same |
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Logic Green |
| Flash Memory | 32 KB | 32 KB | 32 KB | 16 KB | 16 KB | 32 KB |
| SRAM | 2 KB | 2 KB | 2 KB | 1 KB | 1 KB | 2 KB |
| EEPROM | 1 KB | 1 KB | 1 KB | 512 B | 512 B | 1 KB (emulated) |
| Maximum Clock | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 32 MHz |
| Supply Voltage | 1.8 V to 5.5 V | 1.8 V to 5.5 V | 1.8 V to 5.5 V | 1.8 V to 5.5 V | 1.8 V to 5.5 V | 1.8 V to 5.5 V |
| I/O Pins | 23 | 23 | 27 (with 2nd I2C/USART exposed) | 23 | 32 | 23 |
| Automotive (AEC-Q100) | No | No | No | No | No | No |
| Approx. Unit Price @ 1000 | USD 2.18 | USD 2.18 | USD 2.40 | USD 2.05 | USD 2.95 | USD 1.20 |
Key Differentiators
- Largest Flash in ATmega48/88/168/328P family (vs ATMEGA168PA-AUR)
- Backwards-compatible upgrade with extra peripherals (vs ATMEGA328PB-AUR)
- Genuine Microchip long-life supply vs clone sourcing (vs LGT8F328P)
- Higher I/O count for expansion (vs ATMEGA164A-AU)
Design Notes
Decouple VCC (pin 7) and AVCC (pin 20) with a 100 nF X7R ceramic capacitor each, placed within 5 mm of the pins, plus a shared 10 uF bulk capacitor at the supply entry. Per the Microchip ATmega328P datasheet, AVCC must not differ from VCC by more than 0.3 V; a 10 ohm + 10 nF LC filter on AVCC and a separate analog ground tied to digital ground at one point prevents ADC offset. For battery designs, switch the regulator to MCU-controlled shutdown using the BOD-disabled modes for < 1 uA standby.
Route the crystal traces (XTAL1 pin 9, XTAL2 pin 10) with short, symmetric traces under 5 mm and guard with a ground pour; keep them away from switching signals and the exposed pad. The RESET line (pin 1) should pull up through 10 kohm and include a 100 nF to ground for noise immunity; long RESET traces pick up capacitive coupling and cause spurious resets in motor-drive designs. Keep the SPI bus traces matched within 1 mm and series-terminate when crossing between ground islands.
Do not exceed 5.5 V on any pin - the ATmega328P is not 5 V tolerant on analog pins above AVCC. When using the internal 8 MHz oscillator, calibrate against the application UART baud rate or external reference; the factory RC trim drifts up to +/- 10% over temperature. Avoid leaving unused pins floating - either configure them as outputs low or enable internal pull-ups to prevent shoot-through current during transitions. Finally, do not lock the device with LOCK1/LOCK2 set until you have verified the boot loader still works through SPI programming.
Estimated: At 20 MHz and 5 V supply, the ATMEGA328P-AUR draws approximately 10 mA active (3.3 V: ~5 mA), dissipating up to 50 mW. The TQFP-32 with a moderate copper pour has theta_JA near 50 C/W, giving a junction rise of only 2.5 C above ambient - thermal management is rarely a concern. However, in power-down modes the self-heating is negligible, so the design is thermally limited only by surrounding components such as LDO regulators.
Compliance Information
RoHS and REACH compliant per Microchip product declaration; lead-free reflow profile J-STD-020. AEC-Q100 not qualified - choose ATMEGA328P-AU-Automotive for chassis-grade designs. Halogen-free per Microchip material declaration.