ATMEGA328-MMHR - 8-Bit AVR MCU 20MHz 32KB Flash | Microchip
MPN: ATMEGA328-MMHR β Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $2.94 | $2.94 |
| 10 | $2.65 | $26.50 |
| 100 | $2.31 | $231.00 |
| 500 | $2.1 | $1,050.00 |
| 1,000 | $1.92 | $1,920.00 |
| 3,000 | $1.8 | $5,400.00 |
ATMEGA328-MMHR Overview
An 8-bit microcontroller is a single-chip processor executing instructions on 8-bit data words, sitting within the broader hierarchy of embedded processors: microcontroller -> embedded processor -> system-on-chip -> semiconductor device. AVR ATmega devices combine a Harvard-architecture RISC CPU with on-chip flash program memory, SRAM data memory, EEPROM, and rich analog/digital peripherals, allowing a complete embedded control system in one package.
Key features include the AVR RISC core executing most instructions in a single clock cycle (131 instructions, 32 general-purpose registers), up to 20 MIPS throughput, six-channel 10-bit ADC with 2x differential channels, two 8-bit timers and one 16-bit timer, USART, SPI, and 2-wire (I2C) serial interfaces, plus watchdog timer and on-chip debug capability via debugWIRE. The MMHR suffix denotes the RoHS-green QFN/MLF package supplied in tape and reel for automated assembly.
Technically, the ATMEGA328 uses an enhanced AVR core with pipelined single-cycle execution and a Harvard bus structure enabling concurrent program and data access. Self-programmable flash supports in-system programming through SPI and bootloader firmware, while 1.8V to 5.5V operation supports battery designs at reduced clock rates. Sleep modes from idle to power-down minimize average current draw.
Typical applications include embedded sensor nodes and IoT endpoints, industrial control and automation interfaces, consumer appliance controls, and the well-known Arduino UNO-class open-source platforms (the 328 family is the classic Arduino MCU).
Design consideration: place 100nF decoupling at the VCC pin and ensure the exposed die pad is soldered to a ground pour for thermal and EMI performance; keep XTAL traces short when using an external crystal.
This page synthesizes distributor data, drop-in alternatives, 28-pin QFN pinout, and practical design notes not found on the manufacturer product page.
Drop-in alternatives for ATMEGA328-MMHR β 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 ATMEGA328-MMHR (same form factor and footprint) β differing in Package, Flash Memory, SRAM, EEPROM, Operating Temperature.
Quick Comparison Tool β Select alternative parts for side-by-side comparison:
ATMEGA328P-MMHR
β Drop-In β οΈ εζ°εΎ ιͺθ―π Reference alternative (not in catalog)
ATMEGA328P-MMH
β Drop-In β οΈ εζ°εΎ ιͺθ―π Reference alternative (not in catalog)
ATMEGA328-20MUR
β Drop-In β οΈ εζ°εΎ ιͺθ―π Reference alternative (not in catalog)
ATMEGA168PA-MU
β Drop-In β οΈ εζ°εΎ ιͺθ―β In Stock
$1.72 / Unit
View Datasheet βATMEGA168PB-MU
β Drop-In β οΈ εζ°εΎ ιͺθ―β In Stock
$1.31 / Unit
View Datasheet βATMEGA328-20MU
β Drop-In β οΈ εζ°εΎ ιͺθ―π Reference alternative (not in catalog)
ATMEGA328-MMHR Maximum Ratings & Electrical Characteristics
| Core | AVR 8-bit RISC |
| Core Size | 8-bit |
| Speed | 20 MHz |
| Flash Memory | 32 KB (16K x 16) |
| SRAM | 2 KB |
| EEPROM | 512 B |
| Supply Voltage Range | 1.8 V to 5.5 V |
| Operating Temperature | -40C to +85C |
| Number of I/O | 23 |
| ADC Channels | 6 x 10-bit |
| Timers | 2 x 8-bit, 1 x 16-bit |
| Communication Interfaces | USART, SPI, 2-Wire (I2C) |
| Package | 28-VQFN (4x4 mm) Exposed Pad |
| Mounting Type | Surface Mount |
| Programming Interface | SPI ISP, debugWIRE |
| Sleep Modes | Idle, ADC Noise Reduction, Power-save, Power-down, Standby, Extended Standby |
| RoHS Status | Compliant (Green package) |
ATMEGA328-MMHR Pin Configuration
| Pin 1 | PC6 / RESET β Reset input or Port C bit 6 |
| 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 output compare B |
| Pin 6 | PD4 / T0 / XCK β Port D bit 4, Timer0 counter input, USART external clock |
| Pin 7 | VCC β Digital supply voltage |
| Pin 8 | GND β Ground |
| Pin 9 | PB6 / XTAL1 / TOSC1 β Port B bit 6, crystal oscillator input 1 / Timer oscillator 1 |
| Pin 10 | PB7 / XTAL2 / TOSC2 β Port B bit 7, crystal oscillator output 2 / Timer oscillator 2 |
| Pin 11 | PD5 / T1 / OC0B β Port D bit 5, Timer1 counter input, Timer0 output compare B |
| Pin 12 | PD6 / AIN0 / OC0A β Port D bit 6, analog comparator positive input, Timer0 output compare 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, clock output |
| Pin 15 | PB1 / OC1A β Port B bit 1, Timer1 output compare A |
| Pin 16 | PB2 / SS / OC1B β Port B bit 2, SPI slave select, Timer1 output compare B |
| Pin 17 | PB3 / MOSI / OC2A β Port B bit 3, SPI master output, Timer2 output compare 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 |
| Pin 21 | AREF β ADC analog reference input |
| Pin 22 | GND β Ground |
| Pin 23 | PC0 / ADC0 β Port C bit 0, ADC input 0 |
| Pin 24 | PC1 / ADC1 β Port C bit 1, ADC input 1 |
| Pin 25 | PC2 / ADC2 β Port C bit 2, ADC input 2 |
| Pin 26 | PC3 / ADC3 β Port C bit 3, ADC input 3 |
| Pin 27 | PC4 / ADC4 / SDA β Port C bit 4, ADC input 4, I2C data |
| Pin 28 | PC5 / ADC5 / SCL β Port C bit 5, ADC input 5, I2C clock |
Typical Applications
ATMEGA328-MMHR is suitable for 6 applications: Embedded Sensor Nodes and IoT Endpoints, Industrial Control and Automation, Arduino-Compatible Open-Source Hardware, Consumer Appliance Controls, Battery Management and Portable Instrumentation, Hobbyist, Education, and Prototyping.
Embedded Sensor Nodes and IoT Endpoints
The ATMEGA328-MMHR fits battery-powered sensor nodes because its 1.8V-5.5V supply range and multiple sleep modes (down to power-save and power-down) let designers trade clock speed for ultra-low average current. The six-channel 10-bit ADC with differential channels digitizes analog sensors directly without an external converter, and the 2KB SRAM handles protocol stacks such as lightweight mesh or LoRaWAN-class packet framing. Wired to an RF module via SPI at up to 20 MHz, the MCU runs in active mode briefly then parks in power-down, stretching coin-cell life from days to months. The compact 4x4 mm QFN keeps the node PCB small for wearable and retrofit deployments.
Recommended
Industrial Control and Automation
In factory automation the ATMEGA328-MMHR provides reliable 20 MIPS control of actuators, valves, and process loops within an industrial -40C to +85C envelope. The 16-bit timer supports precise PWM generation for motor and heater control, the watchdog timer recovers from transient faults, and the brown-out detector guarantees safe resets on noisy 24V-derived supplies. Its USART links to Modbus RTU gateways, while SPI and I2C connect isolated ADCs, EEPROMs, and human-machine interfaces. The exposed-pad QFN solders to a ground pour improving EMC on electrically harsh panels, and ISP flash allows field firmware updates through a bootloader without desoldering the device.
Recommended
Arduino-Compatible Open-Source Hardware
The ATmega328 family is the core of the Arduino UNO ecosystem, and the ATMEGA328-MMHR is fully code-compatible with Arduino sketches and bootloaders. Designers of custom Arduino-compatible boards choose the 28-pin QFN to shrink board area versus the TQFP-32 UNO footprint while keeping full compatibility with the standard 16 MHz (or faster) build configuration. The chip accepts the standard Optiboot bootloader over its SPI ISP interface, after which sketches upload through USART. The 32KB flash accommodates substantial sketches, and the AVR instruction set matches thousands of published libraries and shields, minimizing porting effort for maker products transitioning to volume manufacturing.
Recommended
Consumer Appliance Controls
Home appliances, small HVAC controllers, and kitchen devices benefit from the ATMEGA328-MMHR's combination of low cost, integrated peripherals, and RoHS-green packaging. The 10-bit ADC reads NTC temperature sensors and user potentiometers, timers generate button-scanning interrupts and buzzer tones, and the EEPROM retains user settings and calibration data across power cycles with 100k write endurance. Operating at 5V from transformer-derived supplies keeps the design simple, while the 4x4 mm QFN fits compact control PCBs behind front panels. Sleep-mode support helps products meet regional standby-power regulations, dropping controller current to microamps when the appliance idles between user interactions.
Recommended
Battery Management and Portable Instrumentation
Portable instruments use the ATMEGA328-MMHR for measurement front ends: the differential ADC channels with 1x/10x/200x gain measure bridge sensors and shunt currents, while the internal 1.1V/2.56V bandgap references give absolute readings without external references. Fuel-gauge and battery-protection firmware exploits fast wake-from-power-save interrupts to service charger events within microseconds yet return to sub-microamp sleep. SPI drives OLED/graphical LCDs, and USART provides field service links. The 5.5V maximum supply tolerates a single Li-ion cell directly through an LDO, and the industrial temperature range supports outdoor meters. Self-programmable flash enables calibration coefficients and datalogging buffers updated in the field.
Recommended
Hobbyist, Education, and Prototyping
Universities, maker labs, and rapid-prototyping teams standardize on ATmega328-class MCUs because the documentation, toolchain (AVR-GCC, Microchip Studio, Arduino IDE), and community resources are unmatched. The ATMEGA328-MMHR's 20 MHz rating gives 25% more throughput than UNO-spec 16 MHz designs while remaining fully compatible with existing sketches. debugWIRE single-wire debugging requires only the RESET line, letting students step through code with a one-pin connection and an inexpensive programmer. The 23 GPIOs drive servos, LEDs, and H-bridges directly, and abundant through-hole breakout adapters exist for the 28-pin QFN, enabling breadboard prototyping before a custom PCB commit.
Recommended
Recommended Products Summary
Engineering reference data for ATMEGA328-MMHR β comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | ATMEGA328P-MMHR | ATMEGA328-20MUR | ATMEGA168PA-MU | ATMEGA168PB-MU |
|---|---|---|---|---|---|
| Package | 28-VQFN (4x4 mm) Exposed Pad | 28-VQFN (4x4 mm) - same | 28-VQFN (4x4 mm) - same | 28-VQFN (4x4 mm) - same | 28-VQFN (4x4 mm) - same |
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Flash Memory | 32 KB | 32 KB | 32 KB | 16 KB | 16 KB |
| SRAM | 2 KB | 2 KB | 2 KB | 1 KB | 1 KB |
| Max Speed | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz |
| picoPower Technology | No | Yes | No | Yes | Yes |
| USART Count | 1 | 1 | 1 | 1 | 2 |
| Operating Temperature | -40C to +85C | -40C to +85C | -40C to +85C | -40C to +85C | -40C to +85C |
Key Differentiators
- 20 MHz maximum clock versus UNO-class 16 MHz designs (vs ATMEGA328-20MUR)
- Double the flash and SRAM of the 168 series (vs ATMEGA168PA-MU)
- Lower production cost than the picoPower variant (vs ATMEGA328P-MMHR)
Design Notes
The 28-VQFN (4x4 mm) exposed pad must be soldered to a grounded copper pour for reliable ground return, heat dissipation, and EMC. Use a 3x3 or 4x4 via array under the die pad to the internal ground plane. Place 100nF X7R ceramic decoupling capacitors within 3 mm of VCC (pin 7) and AVCC (pin 20); add 10uF bulk capacitance near the supply entry. Keep the AREF node quiet with a 100nF cap to ground when using internal references.
Clock frequency must be derated versus supply voltage: 20 MHz operation is guaranteed only at 4.5V-5.5V; at 3.3V the safe maximum is roughly 13.3 MHz and at 1.8V approximately 4 MHz per the datasheet frequency-vs-VCC curve. Designers running 16 MHz at 3.3V (common Arduino-derived practice) are within the safe boundary. Also connect AVCC to VCC through an LC or RC filter when the ADC is used in noisy switching-supply environments.
The bare ATMEGA328-MMHR ships unprogrammed - it has no bootloader, so a first-time bring-up requires an ISP programmer (SPI on PB3-PB5, pin 17-19) or a debugWIRE-capable tool on the RESET line. Do not route other signals on PC6/RESET, and ensure the RESET pull-up (10k) is present if using debugWIRE. When migrating from DIP/TQFP designs, note pin 1 remains RESET and the QFN numbering matches DIP-28 one-to-one, but the exposed pad is ground and must not float.
Compliance Information
Mouser listing identifies the ATMEGA328-MMHR as 'GRN' (green, RoHS-compliant, NiPdAu plating). REACH and conflict-minerals declarations must be requested from Microchip via certificate of conformance.