ATMEGA328P-AU - 8-bit AVR MCU 20MHz 32KB Flash TQFP-32 | Microchip
N.º de pieza: ATMEGA328P-AU ✓ Activo| Cant. | Precio unitario | Total |
|---|---|---|
| 1 | $2.65 | $2,65 |
| 10 | $2.38 | $23,80 |
| 100 | $2.12 | $212,00 |
| 500 | $1.92 | $960,00 |
| 1.000 | $1.74 | $1.740,00 |
ATMEGA328P-AU Descripción general
An 8-bit microcontroller is a single-chip computer combining an 8-bit CPU, program memory, data memory, and peripherals on one die. Within the embedded-system hierarchy, MCUs sit at the top of the control chain, orchestrating sensors, actuators, and communication interfaces. The AVR architecture uses Harvard organization with separate program and data buses, enabling most instructions to execute in a single clock cycle for deterministic real-time behavior.
Key features include picoPower technology with six sleep modes (down to 0.2 uA typical in Power-down), a wide 1.8V to 5.5V operating voltage, two 8-bit timers plus one 16-bit timer, six PWM channels, an 8-channel 10-bit ADC, and USART, SPI, and I2C serial interfaces. The device supports In-System Programming via SPI and includes the debugWIRE on-chip debug system, reducing external debug hardware to a single wire.
Technical depth: the non-volatile memory process guarantees 10,000 FLASH write/erase cycles and 20-year data retention per the Atmel/Microchip AVR family datasheet. A programmable watchdog timer with its own oscillator, an analog comparator, and an on-chip temperature sensor round out the peripheral set. The -AU suffix denotes the industrial-grade (-40C to +85C) TQFP-32 package variant.
Typical applications include Arduino Uno and Nano compatible boards, IoT sensor nodes, motor control, consumer appliances, and educational platforms. The wide voltage range and picoPower sleep modes make it especially attractive for battery-powered sensor nodes.
Design tip: place 100 nF decoupling capacitors close to VCC and AVCC; use the internal 8 MHz RC oscillator for cost-sensitive designs or an external crystal for UART-critical accuracy.
This page synthesizes distributor pricing, drop-in alternatives, pinout data, and practical design notes not found in the manufacturer datasheet alone.
Alternativas directas para ATMEGA328P-AU — mismo encapsulado, compatible pin a pin. Se excluyen las piezas de otro encapsulado que requieren retrabajo de la PCB.
Variantes de esta serie
Modelos de la misma serie compatibles directamente con ATMEGA328P-AU (mismo factor de forma y huella) — difiere en Operating Temperature, Maximum Clock Frequency, Supply Voltage Range, Flash Memory, Instruction Set.
Herramienta de comparación rápida — seleccione piezas alternativas para compararlas lado a lado:
ATMEGA328P-AUR
✅ Sustitución directa✓ En stock
$2.18 / unidad
Ver hoja de datos →ATMEGA328PB-AU
✅ Sustitución directa✓ En stock
$1.12 / unidad
Ver hoja de datos →ATMEGA168P-AU
✅ Sustitución directa📋 Alternativa de referencia (no en el catálogo)
ATMEGA88P-AU
✅ Sustitución directa📋 Alternativa de referencia (no en el catálogo)
ATMEGA328P-AU Valores máximos y características eléctricas
| Core Architecture | AVR 8-bit RISC |
| CPU Speed | 20 MHz |
| Instruction Throughput | 20 MIPS |
| Flash Memory | 32 KB (16K x 16) |
| SRAM | 2 KB |
| EEPROM | 1 KB |
| Operating Voltage | 1.8 V to 5.5 V |
| Temperatura de funcionamiento | -40 C to +85 C |
| I/O Pins | 23 |
| Timers | 2 x 8-bit, 1 x 16-bit |
| PWM Channels | 6 |
| ADC | 8-channel 10-bit |
| Serial Interfaces | USART, SPI, I2C (TWI) |
| Encapsulado | TQFP-32 (7x7 mm, 0.8 mm pitch) |
| Tipo de montaje | Surface Mount |
| Estado RoHS | Compliant |
Configuración de pines de ATMEGA328P-AU
| Pin 1 | PC6/RESET — Reset input or GPIO PC6 |
| Pin 2 | PD0/RXD — Digital pin 0 / USART RX |
| Pin 3 | PD1/TXD — Digital pin 1 / USART TX |
| Pin 4 | PD2/INT0 — Digital pin 2 / External interrupt 0 |
| Pin 5 | PD3/INT1 — Digital pin 3 / External interrupt 1 / PWM |
| Pin 6 | PD4 — Digital pin 4 / T0 |
| Pin 7 | VCC — Digital supply voltage |
| Pin 8 | GND — Ground |
| Pin 9 | PB6/XTAL1 — Crystal oscillator pin 1 / GPIO PB6 |
| Pin 10 | PB7/XTAL2 — Crystal oscillator pin 2 / GPIO PB7 |
| Pin 11 | PD5 — Digital pin 5 / T1 / PWM / OC0B |
| Pin 12 | PD6 — Digital pin 6 / AIN0 / PWM |
| Pin 13 | PD7 — Digital pin 7 / AIN1 |
| Pin 14 | PB0 — Digital pin 8 / ICP1 / PWM |
| Pin 15 | PB1 — Digital pin 9 / OC1A / PWM |
| Pin 16 | PB2/SS — Digital pin 10 / SPI SS / OC1B / PWM |
| Pin 17 | PB3/MOSI — Digital pin 11 / SPI MOSI / OC2A / PWM |
| Pin 18 | PB4/MISO — Digital pin 12 / SPI MISO |
| Pin 19 | PB5/SCK — Digital pin 13 / SPI SCK / LED_BUILTIN |
| Pin 20 | AVCC — Analog supply voltage |
| Pin 21 | AREF — ADC reference voltage |
| Pin 22 | GND — Analog ground |
| Pin 23 | PC0/ADC0 — Analog pin A0 / ADC0 |
| Pin 24 | PC1/ADC1 — Analog pin A1 / ADC1 |
| Pin 25 | PC2/ADC2 — Analog pin A2 / ADC2 |
| Pin 26 | PC3/ADC3 — Analog pin A3 / ADC3 |
| Pin 27 | PC4/ADC4/SDA — Analog pin A4 / ADC4 / I2C SDA |
| Pin 28 | PC5/ADC5/SCL — Analog pin A5 / ADC5 / I2C SCL |
| Pin 29 | PC6/RESET — GPIO PC6 / Reset (alt position, see pin 1) |
| Pin 30 | VCC — Digital supply voltage |
| Pin 31 | GND — Ground |
| Pin 32 | ADC6 — Analog pin A6 (TQFP only, ADC6) |
Aplicaciones típicas
ATMEGA328P-AU es adecuado para 6 aplicacións: Arduino Uno / Nano Compatible Boards, Battery-Powered IoT Sensor Nodes, Motor Control and Robotics, Consumer Appliances and White Goods, Educational Platforms and Maker Projects, Industrial Control and Data Acquisition.
Arduino Uno / Nano Compatible Boards
The ATMEGA328P-AU is the canonical microcontroller on the Arduino Uno (TQFP-32 SMD variant) and Nano reference designs. Its 32 KB Flash accommodates the standard Arduino bootloader (~0.5 KB) plus sketches up to ~30 KB, while the 23 GPIO map directly to digital pins 0-13 and analog A0-A5 on the Arduino shield pinout. The 8-channel 10-bit ADC, 6 PWM channels, USART (D0/D1), SPI (D10-D13), and I2C (A4/A5) match the Arduino core libraries without modification, so existing Arduino sketches compile and run unchanged. The 20 MHz core delivers 20 MIPS - sufficient for robotics control, sensor fusion, and timing-critical libraries like Servo and Wire. Designers building Arduino-compatible boards should provide an external 16 MHz crystal for UART accuracy or use the 8 MHz internal oscillator if board area is constrained. The 1.8 V to 5.5 V supply range allows direct battery power, while the 0.2 uA Power-down sleep makes battery-backed nodes feasible.
Recomendado
Battery-Powered IoT Sensor Nodes
The ATMEGA328P-AU's picoPower technology with six sleep modes (Power-down typical 0.2 uA) and wide 1.8 V to 5.5 V operating range makes it ideal for coin-cell or Li-ion powered wireless sensor nodes. Combined with a sub-GHz radio like the RFM69 or LoRa module over SPI, the MCU spends most of its time in Power-save sleep and wakes on watchdog interrupt or external pin to take a sensor reading and transmit, achieving years of battery life. The 10-bit ADC reads battery voltage and analog sensor outputs (temperature, light, soil moisture), while the 2 KB SRAM buffers small packets before TX. The internal 8 MHz RC oscillator eliminates the external crystal for cost-sensitive designs, and the brown-out detector protects Li-ion cells from over-discharge.
Recomendado
Motor Control and Robotics
The 6 PWM channels (3 from Timer0 8-bit, 2 from Timer1 16-bit, 1 from Timer2 8-bit) plus the 16-bit Timer1 for quadrature encoder input make the ATMEGA328P-AU a capable platform for small robotics. The high-speed 16-bit Timer1 can decode two quadrature channels simultaneously at motor RPM up to several thousand, while the 8-bit timers provide up to 6 PWM outputs at up to 10-bit effective resolution via phase-correct mode to drive DC motors, servos, or LED brightness. The 20 MIPS throughput handles PID control loops at 1 kHz update rate with headroom for sensor reads. Many classic robot kits, 3D printer controllers (early generations), and CNC motion controllers historically used the ATmega328 family. The 2 KB SRAM is adequate for small kinematics tables; for path planning, offload to a host or use a 32-bit Cortex-M part.
Recomendado
Consumer Appliances and White Goods
The ATMEGA328P-AU's industrial temperature grade (-40 C to +85 C), wide voltage range, and robust on-chip peripherals (watchdog timer with dedicated oscillator, brown-out detector, hardware CRC) make it well-suited to consumer appliances such as coffee machines, washing machine control boards, microwave user interfaces, and HVAC thermostats. The 23 GPIO drive LEDs, button matrices, 7-segment displays, triacs, and relay coils directly via transistors. The 1 KB EEPROM stores user settings (setpoints, calibration) without external memory, and the 10-bit ADC reads temperature sensors (NTC thermistor), pressure sensors, and potentiometers for setpoint input. The debugWIRE interface allows in-circuit firmware updates during production calibration.
Recomendado
Educational Platforms and Maker Projects
The ATMEGA328P-AU is the de facto teaching microcontroller for embedded systems courses, hobbyist kits, and STEM education due to the massive Arduino ecosystem, free toolchains (avr-gcc, AVR Studio), and abundant example code. Students learn GPIO, ADC, timers, interrupts, USART, SPI, and I2C on a single, well-documented part. The -AU TQFP-32 surface-mount variant is used on commercial Arduino boards and beginner-friendly kits that demonstrate PCB assembly, reflow soldering, and ISP programming. Many breakout boards (SparkFun Pro Mini, Adafruit Metro) carry the ATMEGA328P-AU and expose all 23 GPIO plus the analog reference. Open-source firmware libraries (Arduino core,avr-libc, Fritzing diagrams) accelerate the learning curve and let educators focus on concepts rather than driver code.
Recomendado
Industrial Control and Data Acquisition
The ATMEGA328P-AU's 8-channel 10-bit ADC, USART for RS-232/RS-485 links, SPI for high-speed peripherals (external ADC, DAC, FRAM), and hardware watchdog make it a fit for small industrial controllers, data loggers, and remote telemetry units (RTUs). The 10-bit ADC (8.5 ENOB typical) reads 4-20 mA current loops via a shunt resistor, thermocouples via amplification, and 0-10 V process signals via dividers. The USART drives RS-485 transceivers for Modbus RTU networks, while SPI connects to external high-resolution ADCs or ferroelectric RAM (FRAM) for non-volatile event logging. The wide 1.8 V to 5.5 V supply accepts 24 V industrial rails via switching regulators. The hardware watchdog with dedicated oscillator resets the MCU if firmware locks up - essential for unattended remote installations.
Recomendado
Resumen de productos recomendados
Datos de referencia de ingeniería para ATMEGA328P-AU — comparación, orientación de diseño e información de cumplimiento.
Guía de selección
Comparación con alternativas
| Parámetro | Este producto | ATMEGA328P-AUR | ATMEGA328PB-AU | ATMEGA168P-AU | ATMEGA88P-AU |
|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| 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 |
| Flash Memory | 32 KB | 32 KB | 32 KB | 16 KB | 8 KB |
| SRAM | 2 KB | 2 KB | 2 KB | 1 KB | 1 KB |
| EEPROM | 1 KB | 1 KB | 1 KB | 512 B | 256 B |
| I/O Pins | 23 | 23 | 27 (+4) | 23 | 23 |
| PWM Channels | 6 | 6 | 9 (+3) | 6 | 6 |
| USART | 1 | 1 | 2 (+1) | 1 | 1 |
| Operating 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 |
Diferenciadores clave
- Drop-in superset variant with more I/O and same footprint (frente a ATMEGA328PB-AU)
- Available in higher-density Flash than 168P (frente a ATMEGA168P-AU)
- Industrial-grade temperature range with picoPower (frente a ATMEGA8A-AU)
Notas de diseño
Decouple both VCC and AVCC with 100 nF ceramic capacitors placed as close as possible to the IC pins (within 3 mm). Add a 10 uF bulk capacitor near VCC for switching transients. Connect AVCC through a ferrite bead or 10 ohm resistor to VCC to isolate analog supply noise. Connect AREF through a 100 nF capacitor to AGND to stabilize the ADC reference. For battery-powered designs, the Power-down sleep mode draws 0.2 uA typical but rises if any I/O pin is left floating - configure unused pins as outputs or enable internal pull-ups.
At 20 MHz and 5 V active current is ~10 mA (0.5 mA/MHz), giving ~50 mW dissipation. In Power-down sleep (0.2 uA) dissipation drops to ~1 uW. Estimated: duty-cycled sensor node running 1% active draws average ~0.5 mA from a 3 V coin cell (~1500 mAh), giving ~3000 hours battery life. The TQFP-32 package has theta_JA ~45 C/W but MCU dissipation is so low that no thermal design is required even at industrial 85 C ambient.
Route the crystal traces (XTAL1/XTAL2) short and symmetric with a ground guard ring to minimize EMI pickup. Place the 22 pF crystal load capacitors within 5 mm of the XTAL pins. Keep ADC analog traces (ADC0-ADC5, AVCC, AREF, AGND) away from digital switching signals (PWM, SPI clocks) to preserve ADC accuracy. Use a single ground plane partitioned so analog returns have a low-impedance path to the AGND pin. For ISP programming, expose the SPI signals (MOSI/MISO/SCK/RESET) on a 2x3 0.1 inch header to allow bootloader burning with an AVR ISP mkII or USBasp programmer.
Do not exceed the 20 MHz maximum clock frequency or the device will malfunction. Do not leave the RESET pin floating - either tie to VCC through a 10 kohm resistor or add a manual reset pushbutton with 100 nF debounce cap to ground. Do not apply voltage to any pin before VCC is applied (latch-up risk). When using the internal 8 MHz RC oscillator for UART communication, the accuracy is only +/-10% - the UART will not work reliably at 115200 baud. Use an external 16 MHz crystal for UART-critical designs. The watchdog timer must be either enabled and periodically reset in firmware or permanently disabled by writing WDTCR = 0; otherwise a runaway MCU will lock up.
Información de cumplimiento
RoHS compliant per Microchip product page. Not AEC-Q100 qualified (industrial grade only). Pb-free packaging.