ATMEGA328P-MN - AVR 8-bit MCU 20MHz 32KB Flash 32-VQFN | Microchip
MPN: ATMEGA328P-MN ✓ AktifATMEGA328P-MN Ringkasan
A microcontroller (MCU) is a single-chip computer that integrates a CPU, memory (Flash for program, SRAM for data, EEPROM for non-volatile storage), and programmable peripherals on one die. The ATmega328P belongs to the AVR enhanced RISC architecture family, which executes most instructions in a single clock cycle, enabling deterministic timing essential for real-time embedded control. Within the broader taxonomy, the ATmega328P-MN is a microcontroller -> embedded processor -> semiconductor device, and is the canonical MCU used on Arduino Uno and Arduino Nano carrier boards.
Key features include 131 RISC instructions, a debugWIRE on-chip debug interface, six PWM channels, a 10-bit ADC, programmable watchdog timer with separate on-chip oscillator, and five software-selectable power-saving modes that drop quiescent current below 1 µA in power-down mode. Internal 8 MHz and 128 kHz RC oscillators reduce external component count for cost-sensitive designs.
The device is built on a low-power CMOS process with an advanced Harvard architecture that separates program and data buses for simultaneous fetch and write, achieving throughput up to 20 MIPS at 20 MHz. Hardware multipliers and true single-cycle execution make it well suited to deterministic control loops in sensor processing and communication bridging.
Typical applications include Arduino-compatible maker boards, consumer appliance controllers, sensor data acquisition nodes, battery-powered IoT endpoints, industrial 4-20 mA loop interfaces, and hobby/educational platforms. Designers choose the ATmega328P-MN for its mature toolchain (avr-gcc, Arduino IDE, Atmel Studio), abundant reference designs, and the broad availability of code libraries.
Design tip: When migrating from the plastic DIP-28 (ATMEGA328P-PU) footprint used on the classic Arduino Uno to the QFN-32 package, ensure your PCB includes a thermal pad with at least 6 ground vias to dissipate the package's heat under high CPU load, and use a 0.5 mm pitch land pattern that respects the JEDEC MSL3 moisture sensitivity.
This page synthesizes live distributor pricing, drop-in VQFN-32 alternatives (ATMEGA328PB-MN, ATMEGA328-MN, ATMEGA168P-MN), and engineering guidance not aggregated on a single OEM datasheet page.
Alternatif penggantian untuk ATMEGA328P-MN — paket yang sama, pin-pada-pin kompatibel. Bagian paket yang berbeda memerlukan kerja ulang PCB diabaikan.
Variasi di dalam seri ini
Model-series yang sama yang kompatibel dengan penggantian ATMEGA328P-MN (sama faktor bentuk dan footprint) — berbeda di dalam ADC, Communication Interfaces, EEPROM, Package, SRAM.
ATMEGA328PB-MN
✅ Drop-InKontak untuk harga
Lihat Datasheet →ATMEGA328-MN
✅ Drop-In📋 Alternatif referensi (tidak dalam katalog)
ATMEGA168P-MN
✅ Drop-In📋 Alternatif referensi (tidak dalam katalog)
ATMEGA88P-MN
✅ Drop-In📋 Alternatif referensi (tidak dalam katalog)
ATMEGA48P-MN
✅ Drop-In📋 Alternatif referensi (tidak dalam katalog)
ATMEGA328P-MN Rating Maksimal & Karakteristik Listrik
| Core Architecture | AVR 8-bit RISC |
| Program Memory (Flash) | 32 KB (16K x 16) |
| SRAM | 2 KB |
| EEPROM | 1 KB |
| Maximum CPU Speed | 20 MHz |
| Tegangan Pemuat | 1.8 V to 5.5 V |
| Throughput | Up to 20 MIPS at 20 MHz |
| Programmable I/O Lines | 23 |
| ADC | 6 channels, 10-bit |
| Timers | 2x 8-bit, 1x 16-bit |
| PWM Channels | 6 |
| Communication Interfaces | 1x USART, 1x SPI, 1x TWI (I2C) |
| Suhu Kerja | -40 °C to +105 °C |
| Paket | 32-pin VQFN (5x5 mm) |
| Tipe Mounting | Surface Mount |
| Status RoHS | Compliant |
| Debug Interface | debugWIRE |
Konfigurasi Pin ATMEGA328P-MN
| Pin produk 1 | PD3 (OC2B, INT1) — PORTD bit 3, Timer/Counter2 compare B, external interrupt 1 |
| Pin produk 2 | PD4 (T0, XCK) — PORTD bit 4, Timer0 external clock, USART0 clock |
| Pin produk 3 | GND — Digital ground |
| Pin produk 4 | VCC — Digital supply voltage |
| Pin produk 5 | GND — Digital ground |
| Pin produk 6 | VCC — Digital supply voltage |
| Pin produk 7 | PD5 (OC0B, T1) — PORTD bit 5, Timer0 compare B, Timer1 external clock |
| Pin produk 8 | PD6 (OC0A, AIN0) — PORTD bit 6, Timer0 compare A, analog comparator +input |
| Pin produk 9 | PD7 (OC2A, AIN1) — PORTD bit 7, Timer2 compare A, analog comparator -input |
| Pin produk 10 | PB0 (ICP1, CLKO) — PORTB bit 0, Timer1 input capture, system clock output |
| Pin produk 11 | PB1 (OC1A) — PORTB bit 1, Timer1 compare A |
| Pin produk 12 | PB2 (OC1B, SS) — PORTB bit 2, Timer1 compare B, SPI slave select |
| Pin produk 13 | PB3 (MOSI, OC2A) — PORTB bit 3, SPI MOSI, Timer2 compare A |
| Pin produk 14 | PB4 (MISO) — PORTB bit 4, SPI MISO |
| Pin produk 15 | PB5 (SCK) — PORTB bit 5, SPI clock |
| Pin produk 16 | PB6 (XTAL1, TOSC1) — PORTB bit 6, crystal oscillator pin 1, Timer2 oscillator pin 1 |
| Pin produk 17 | PB7 (XTAL2, TOSC2) — PORTB bit 7, crystal oscillator pin 2, Timer2 oscillator pin 2 |
| Pin produk 18 | AREF — ADC reference voltage input |
| Pin produk 19 | GND — Digital ground |
| Pin produk 20 | AVCC — Analog supply voltage |
| Pin produk 21 | ADC7 — ADC channel 7 |
| Pin produk 22 | ADC6 — ADC channel 6 |
| Pin produk 23 | PC0 (ADC0) — PORTC bit 0, ADC channel 0 |
| Pin produk 24 | PC1 (ADC1) — PORTC bit 1, ADC channel 1 |
| Pin produk 25 | PC2 (ADC2) — PORTC bit 2, ADC channel 2 |
| Pin produk 26 | PC3 (ADC3) — PORTC bit 3, ADC channel 3 |
| Pin produk 27 | PC4 (SDA) — PORTC bit 4, I2C data |
| Pin produk 28 | PC5 (SCL) — PORTC bit 5, I2C clock |
| Pin produk 29 | PC6 (RESET) — PORTC bit 6, reset (active low) |
| Pin produk 30 | PD0 (RXD) — PORTD bit 0, USART0 RX |
| Pin produk 31 | PD1 (TXD) — PORTD bit 1, USART0 TX |
| Pin produk 32 | PD2 (INT0) — PORTD bit 2, external interrupt 0 |
| Pin produk 33 | EP — Exposed thermal pad (must be soldered to ground for thermal performance) |
Aplikasi Umum
ATMEGA328P-MN cocok untuk 6 aplikasis: Arduino-Compatible Maker Boards, Battery-Powered IoT Sensor Nodes, Industrial 4-20 mA Loop Transmitters, Consumer Appliance Control Boards, Educational and STEM Platforms, Hobby Robotics and Servo Control.
Arduino-Compatible Maker Boards
The ATMEGA328P-MN is the surface-mount VQFN-32 die behind most Arduino-compatible boards, including the Arduino Nano and the SMD variants of the Uno. Its 20 MHz AVR core and 32 KB Flash run the Arduino boot loader and the full avr-gcc library set unmodified, while 23 programmable I/O lines expose PWM, ADC, and I2C/SPI for shields and breakout boards. The 105 °C operating range and 1.8 V–5.5 V supply tolerance let the same part serve 3.3 V Feather-class boards and legacy 5 V boards without redesign.
Direkomendasikan
Battery-Powered IoT Sensor Nodes
The ATMEGA328P-MN's five software-selectable power-saving modes (Idle, ADC Noise Reduction, Power-save, Power-down, Standby) drop quiescent current below 1 µA in power-down mode while retaining the ability to wake on watchdog, external interrupt, or pin change. With 1.8 V operation it runs directly from a single Li-FePO4 cell, and its 32 KB Flash accommodates Over-the-Air update code for LoRaWAN or Zigbee stack bring-up. Real-world designs typically see 3–5 year battery life on a 2400 mAh cell when the MCU sleeps between sensor reads.
Direkomendasikan
Industrial 4-20 mA Loop Transmitters
The ATMEGA328P-MN's 10-bit ADC with six channels and 1.8 V–5.5 V analog supply range matches the signal levels from 4-20 mA current loops and bridge sensors. Its hardware TWI (I2C) and SPI peripherals drive external DACs and digital isolators, while the watchdog timer and brown-out detector provide the supervisory functions demanded by industrial process-control standards. –40 °C to +105 °C operation handles the typical industrial enclosure temperature range without derating.
Direkomendasikan
Consumer Appliance Control Boards
In washing machines, coffee makers, and HVAC zone controllers, the ATMEGA328P-MN's six PWM channels drive TRIACs, MOSFETs, and variable-frequency drives, while its USART interfaces to main-display or Wi-Fi modules. The 32 KB Flash supports capacitive-touch firmware and safety-state machines, and the –40 °C to +105 °C rating meets appliance under-hood thermal stress. Combined with its sub-$3 reel price, it offers the best MCU price/performance for high-volume consumer SKUs shipping in the millions of units per year.
Direkomendasikan
Educational and STEM Platforms
The ATMEGA328P-MN is the de-facto learning MCU in universities and maker spaces because the avr-gcc, Arduino IDE, and Microchip Studio all target it as a first-class citizen. Its 32 KB Flash holds the standard Arduino boot loader plus user sketches, and the debugWIRE interface supports single-pin in-circuit debugging from low-cost tools such as the Atmel-ICE and the AVR Dragon. Students benefit from deterministic single-cycle instruction execution, which makes timing tutorials and assembly primer labs reproducible on every board revision.
Direkomendasikan
Hobby Robotics and Servo Control
Robotics hobbyists rely on the ATMEGA328P-MN to drive multi-servo gimbals, BLDC ESC interfaces, and sensor fusion loops at the heart of hexapods, robotic arms, and pan-tilt gimbals. The 16-bit Timer/Counter1 supports high-precision PWM in the 50 Hz servo range, and the six PWM outputs cover typical 4–6 servo limbs without external drivers. The 32 KB Flash accommodates inverse-kinematics libraries and IMU fusion filters; the I2C bus ties in MPU6050 / BNO055 IMUs directly without glue logic.
Direkomendasikan
Ringkasan Produk Direkomendasikan
Data referensi engineering untuk ATMEGA328P-MN — pembandingan, panduan desain, dan informasi konformitas.
Panduan Pemilihan
Pembandingan dengan Alternatif
| Parameter Umum | Produk Ini | ATMEGA328PB-MN | ATMEGA328-MN | ATMEGA168P-MN | ATMEGA88P-MN | ATMEGA48P-MN |
|---|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | VQFN-32 (5x5 mm) | VQFN-32 (5x5 mm) - same | VQFN-32 (5x5 mm) - same | VQFN-32 (5x5 mm) - same | VQFN-32 (5x5 mm) - same | VQFN-32 (5x5 mm) - same |
| Program Memory (Flash) | 32 KB | 32 KB | 32 KB | 16 KB | 8 KB | 4 KB |
| SRAM | 2 KB | 2 KB | 2 KB | 1 KB | 1 KB | 512 B |
| EEPROM | 1 KB | 1 KB | 1 KB | 512 B | 256 B | 256 B |
| Max CPU Speed | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz |
| Supply Voltage | 1.8 V to 5.5 V | 1.8 V to 5.5 V | 4.5 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 |
| PWM Channels | 6 | 9 (+3 vs base) | 6 | 6 | 6 | 6 |
| USART / SPI / TWI | 1 / 1 / 1 | 2 / 2 / 1 (+1 USART, +1 SPI) | 1 / 1 / 1 | 1 / 1 / 1 | 1 / 1 / 1 | 1 / 1 / 1 |
Diferensiator Kunci
- Highest Flash density in the VQFN-32 8-bit AVR family (vsATMEGA168P-MN)
- Backwards-compatible peripheral upgrade path (vsATMEGA328PB-MN)
- PicoPower (P-variant) low-voltage operation (vsATMEGA328-MN)
- Mature, broadest ecosystem and code-library compatibility (vsATMEGA88P-MN)
Catatan Desain
The 32-pin VQFN package requires that the exposed thermal pad (pin 33) be soldered directly to a ground copper pour with at least six thermal vias (0.3 mm drill, 0.6 mm pads) stitching to inner ground planes. At 20 MHz with all peripherals running, the die dissipates roughly 30 mW; without a thermal pad the junction-to-ambient thermal resistance can climb above 70 C/W, violating the 105 °C ceiling in enclosed housings. Use at least 1 oz copper on the top layer beneath the device for best thermal relief.
Place the 0.1 µF VCC decoupling capacitor within 2 mm of pin 4 (and pin 20 AVCC), with a 10 µF bulk capacitor on the same rail no more than 20 mm away. Route the crystal traces (PB6/XTAL1, PB7/XTAL2) as short, ground-guarded differential pairs under 10 mm, and add 22 pF load capacitors to GND within 3 mm of each pin. Avoid routing high-speed SPI or USART lines across the crystal region to prevent jitter and EMI.
Estimated: when migrating from ATMEGA328P-PU (DIP-28) to -MN (VQFN-32), the ADC channels 6 and 7 are mapped to dedicated analog-only pins (no digital function) and C6 lacks RESET functionality, requiring a 10 kΩ pull-up to VCC and the fuse set to disable RESET (RSTDISBL programmed). Designers commonly forget that an unprogrammed -PU will draw 5 mA continuously because the internal pull-up on the RESET pin keeps the chip in reset without a clean high level.
Activate the Brown-out Detector (BOD) fuse at 2.7 V threshold for all battery-powered designs to guarantee predictable reset behavior below the safe operating range. In power-down mode the ATMEGA328P-MN draws less than 1 µA with the watchdog disabled; enabling the watchdog adds roughly 4 µA. Wake sources can be WDT, INT0/INT1 external interrupts, or pin-change interrupts on PORTB — disable unused analog comparators and the ADC (PRR register) to reach the bottom of the datasheet's power curve.
Informasi Konformitas
RoHS and REACH compliant per the Microchip material declaration page. Not AEC-Q100 qualified: for automotive safety-critical applications use an AEC-Q100 grade part such as the PIC18F46K22-I/PT or ATSAM series. Lead-free VQFN-32 package is MSL3 rated; observe JEDEC J-STD-033 moisture bake procedures before reflow.