ATMEGA168-20MU - 8-Bit AVR MCU 20MHz 16KB Flash | Microchip
MPN: ATMEGA168-20MU ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $0 | $0.00 |
| 10 | $0 | $0.00 |
| 100 | $0 | $0.00 |
| 500 | $0 | $0.00 |
| 1,000 | $0 | $0.00 |
ATMEGA168-20MU Overview
An 8-bit microcontroller is an integrated circuit that combines a processor core, program memory, data memory, and peripherals such as timers, UART, SPI, and ADC on a single chip. Within the power-management and system-hierarchy of embedded electronics, the MCU sits at the heart of an embedded system, controlling sensors, actuators, and communication interfaces. The AVR architecture, developed by Atmel and now part of Microchip Technology, uses a Harvard architecture with mostly single-cycle instruction execution, making it popular in both hobbyist and industrial designs.
Key features of the ATMEGA168-20MU include advanced RISC architecture with 131 powerful instructions, 16KB of in-system self-programmable Flash with read-while-write capability, an 8-channel 10-bit ADC with internal bandgap reference, and debugWIRE on-chip debugging through the RESET pin. It also includes two 8-bit timers, one 16-bit timer, a usART serial interface, SPI, and I2C-compatible TWI, along with six PWM channels for motor and LED control.
Technically, the device runs from 2.7V to 5.5V with a speed grade of 20MHz at 4.5V to 5.5V, giving designers the option to trade clock speed for lower power consumption through clock prescaling and sleep modes such as Idle, ADC Noise Reduction, Power-save, and Power-down.
Typical applications include industrial control, consumer appliances, sensor nodes, motor control, and hobby/Arduino-class boards where the ATmega168's compatibility with Arduino bootloader toolchains is valuable.
Design consideration: keep the supply decoupled with 100nF capacitors on VCC and AVCC, and be aware that ISP programming shares pins PB5-PB7, so series resistors should isolate programming circuitry from peripheral loads.
This page synthesizes distributor pricing, drop-in alternatives, and practical design notes not found in the manufacturer datasheet.
Drop-in alternatives for ATMEGA168-20MU — 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 ATMEGA168-20MU (same form factor and footprint) — differing in Package, Programming, Operating Temperature, Timers, Supply Voltage Range.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
ATMEGA168P-20MU
✅ Drop-In✓ In Stock
$1.38 / Unit
View Datasheet →ATMEGA168PA-MU
✅ Drop-In✓ In Stock
$1.72 / Unit
View Datasheet →ATMEGA168-20MQR
✅ Drop-In ⚠️ 参数待验证✓ In Stock
$2.38 / Unit
View Datasheet →ATMEGA328P-20MU
✅ Drop-In ⚠️ 参数待验证📋 Reference alternative (not in catalog)
ATMEGA88P-20MU
✅ Drop-In ⚠️ 参数待验证📋 Reference alternative (not in catalog)
ATMEGA168-20MU Maximum Ratings & Electrical Characteristics
| Core | AVR 8-bit RISC |
| Core Size | 8-Bit |
| Speed | 20MHz |
| Program Memory Size | 16KB (8K x 16) Flash |
| EEPROM Size | 512B |
| RAM Size | 1K x 8 |
| Number of I/O | 23 |
| Supply Voltage Range | 2.7 V to 5.5 V |
| ADC Resolution | 10-bit |
| ADC Channels | 8 (TQFP and QFN/MLF packages) |
| Peripherals | Brown-out Detect/Reset, POR, PWM, WDT |
| Connectivity | I2C (TWI), SPI, UART/USART |
| Timers | 2 x 8-bit, 1 x 16-bit |
| Oscillator Type | Internal |
| Operating Temperature | 0C to +70C |
| Package | 32-VQFN (5x5 mm) exposed pad |
| Mounting Type | Surface Mount |
| Debug | debugWIRE on-chip debug |
| Programming | ISP, In-Circuit Serial Programming (ICSP) |
ATMEGA168-20MU Pin Configuration
| Pin 1 | PD3 (PCINT19/OC2B/INT1) — Port D bit 3, pin-change interrupt 19, Timer2 output compare B, external interrupt 1 |
| Pin 2 | PD4 (PCINT20/XCK/T0) — Port D bit 4, pin-change interrupt 20, USART external clock, Timer0 clock input |
| Pin 3 | GND — Ground |
| Pin 4 | VCC — Digital supply voltage |
| Pin 5 | GND — Ground (die pad / thermal) |
| Pin 6 | VCC — Digital supply voltage |
| Pin 7 | PB6 (PCINT6/XTAL1/TOSC1) — Port B bit 6, crystal oscillator input / timer oscillator |
| Pin 8 | PB7 (PCINT7/XTAL2/TOSC2) — Port B bit 7, crystal oscillator output |
| Pin 9 | PD5 (PCINT21/OC0B/T1) — Port D bit 5, Timer0 output compare B, Timer1 clock input |
| Pin 10 | PD6 (PCINT22/OC0A/AIN0) — Port D bit 6, Timer0 output compare A, 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, Timer1 output compare A (PWM) |
| Pin 14 | PB2 (PCINT2/SS/OC1B) — Port B bit 2, SPI slave select, Timer1 output compare B (PWM) |
| Pin 15 | PB3 (PCINT3/MOSI/OC2A) — Port B bit 3, SPI master output, Timer2 output compare A (PWM) |
| Pin 16 | PB4 (PCINT4/MISO) — Port B bit 4, SPI master input |
| Pin 17 | PB5 (PCINT5/SCK) — Port B bit 5, SPI clock, ISP programming clock |
| Pin 18 | AVCC — ADC supply voltage |
| Pin 19 | ADC6 — Analog input channel 6 (TQFP/QFN packages only) |
| Pin 20 | AREF — Analog reference voltage for ADC |
| Pin 21 | GND — Ground |
| Pin 22 | ADC7 — Analog input channel 7 (TQFP/QFN packages only) |
| Pin 23 | PC0 (PCINT8/ADC0) — Port C bit 0, analog input channel 0 |
| Pin 24 | PC1 (PCINT9/ADC1) — Port C bit 1, analog input channel 1 |
| Pin 25 | PC2 (PCINT10/ADC2) — Port C bit 2, analog input channel 2 |
| Pin 26 | PC3 (PCINT11/ADC3) — Port C bit 3, analog input channel 3 |
| Pin 27 | PC4 (PCINT12/SDA/ADC4) — Port C bit 4, TWI data line, analog channel 4 |
| Pin 28 | PC5 (PCINT13/SCL/ADC5) — Port C bit 5, TWI clock line, analog channel 5 |
| Pin 29 | PC6 (PCINT14/RESET) — Reset input, debugWIRE interface |
| 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 |
Typical Applications
ATMEGA168-20MU is suitable for 6 applications: Industrial Control and Automation, Consumer Appliances, Sensor Nodes and IoT Endpoints, Motor Control, Hobby and Arduino-Compatible Boards, Battery-Powered Measuring Instruments.
Industrial Control and Automation
The ATMEGA168-20MU fits industrial control nodes where a robust 8-bit MCU with 2.7V to 5.5V tolerance and 20MHz throughput handles deterministic I/O tasks without an RTOS. Its 23 I/O lines, six PWM channels, and watchdog timer with brown-out reset make it dependable for relay sequencing, sensor polling, and actuator control in factory panels. The 10-bit ADC monitors feedback signals at up to roughly 15ksps, adequate for temperature and current loops. Its UART/SPI/TWI interfaces link to displays and PLC expansion modules. Because code runs from Flash with read-while-write, firmware field updates over UART are possible without halting data logging, an important benefit in installations where downtime is costly.
Recommended
Consumer Appliances
In consumer appliances such as coffee machines, fans, and small heaters, the ATMEGA168-20MU provides cost-effective control with its integrated 10-bit ADC reading NTC thermistors and its six PWM outputs driving triac or MOSFET stages for heater and motor regulation. The internal RC oscillator removes the need for an external crystal in non-timing-critical products, cutting BOM cost, while the 20MHz speed grade supports fast user-interface response. Power-down sleep at microamp levels suits battery-backed clock retention. The 32-VQFN 5x5 mm package fits compact appliance PCBs, and debugWIRE allows one-wire in-system debugging through the existing RESET line during firmware development and production calibration.
Recommended
Sensor Nodes and IoT Endpoints
For sensor nodes and IoT endpoints, the ATMEGA168-20MU combines a 10-bit, 8-channel ADC with power-saving sleep modes, allowing battery-operated designs to sample multiple analog sensors then spend most of the cycle in power-down. Its TWI (I2C) and SPI ports connect MEMS sensors, EEPROM, and radio modules, while the UART streams data to a wireless bridge. The 1KB SRAM handles modest buffering for packetized transmissions, and the 16KB Flash accommodates protocol stacks such as lightweight mesh or AT-command drivers. Running from 2.7V suits two-cell alkaline or single-cell LiFePO4 supplies directly, avoiding boost-converter cost in ultra-low-BOM nodes.
Recommended
Motor Control
The ATMEGA168-20MU supports DC and small stepper motor control using its six PWM channels and 16-bit Timer1 for precise duty-cycle and frequency generation. At 20MHz, an 8-bit fast PWM achieves approximately 78kHz carrier, inaudible in appliances and free of audible whine, while phase-correct PWM at lower frequencies suits H-bridge direction control. The ADC reads back current via shunt resistors for closed-loop torque limiting, and the analog comparator enables zero-cross detection for sensorless fan startup. External MOSFET drivers translate its 5V logic to power stages. Brown-out detection protects Flash contents during supply sags common in motor-heavy systems, preserving firmware integrity across stall-induced brownouts.
Recommended
Hobby and Arduino-Compatible Boards
The ATMEGA168-20MU is fully compatible with the Arduino toolchain and bootloader ecosystem, making it a mainstay for Arduino-compatible board designs and educational kits. Its 16KB Flash holds the bootloader plus a typical sketch, the 1KB SRAM supports common libraries, and the AVR instruction set is fully supported by avr-gcc and the Arduino IDE. The 32-VQFN 5x5 package suits compact wearable and maker designs where DIP packages are too large, while ISP programming uses the standard 6-pin header layout. debugWIRE debugging through RESET gives developers breakpoint-level visibility unusual at this price point, easing the transition from hobby sketch to commercial firmware.
Recommended
Battery-Powered Measuring Instruments
Handheld meters and portable measuring instruments benefit from the ATMEGA168-20MU's 2.7V minimum supply, allowing direct operation from two AA cells through end-of-life, and its ADC noise-reduction sleep mode which quiets the digital core during 10-bit conversions for improved effective resolution. The 16-bit Timer1 performs frequency and period measurement with input capture, useful for tachometer and event-counting functions. LCD or segment displays drive from I/O pins with multiplexing in software, and pushbuttons attach to interrupt-capable lines for instant wake from power-down at microamp-level current. Calibration constants store in the 512B EEPROM with endurance of roughly 100k write cycles, sufficient for annual recalibration over product lifetime.
Recommended
Recommended Products Summary
Engineering reference data for ATMEGA168-20MU — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | ATMEGA168P-20MU | ATMEGA168PA-MU | ATMEGA328P-20MU | ATMEGA88P-20MU |
|---|---|---|---|---|---|
| Package | 32-VQFN (5x5 mm) | 32-VQFN (5x5 mm) - same | 32-VQFN (5x5 mm) - same | 32-VQFN (5x5 mm) - same | 32-VQFN (5x5 mm) - same |
| Brand | Microchip Technology (Atmel legacy) | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Program Memory (Flash) | 16KB | 16KB | 16KB | 32KB | 8KB |
| SRAM | 1KB | 1KB | 1KB | 2KB | 1KB |
| EEPROM | 512B | 512B | 512B | 1KB | 512B |
| Max Clock Speed | 20MHz | 20MHz | 20MHz | 20MHz | 20MHz |
| Supply Voltage | 2.7 V to 5.5 V | 2.7 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 |
| Power Features | Standard idle/power-down sleep modes | Improved process, similar power profile | picoPower ultra-low sleep current | picoPower ultra-low sleep current | picoPower ultra-low sleep current |
| Drop-in Status | - | Pin-to-pin, direct substitute | Pin-to-pin, verify fuses | Pin-compatible, firmware re-test needed | Pin-compatible, only if code fits 8KB |
Key Differentiators
- 20MHz speed grade over full industrial-clock range (vs ATMEGA88P-20MU)
- Broad 2.7V to 5.5V supply tolerance (vs ATMEGA168PA-MU)
- Straight drop-in substitution path (vs ATMEGA168P-20MU)
Design Notes
The 32-VQFN (5x5) package has a central exposed pad that must be soldered to a grounded copper pour for reliable operation; use an array of thermal vias (roughly 3x3, 0.3mm drill) under the pad connected to the ground plane. Decouple VCC (pins 4/6) and AVCC (pin 18) each with a 100nF ceramic capacitor placed within 2mm of the pin. Tie AVCC to VCC through an LC or RC filter (10uH ferrite or 10-ohm resistor plus 100nF) when ADC accuracy matters. AREF needs a 100nF capacitor to ground even when using the internal reference.
When substituting ATMEGA168P/PA for the ATMEGA168, fuses are not always programmed identically by production programmers; verify LOW/HIGH/EXTENDED fuse bytes (especially brown-out threshold and clock source) after reflow and reprogram if needed. The RESET pin doubles as the debugWIRE interface - once DWEN fuse is set, ISP is disabled until debugWIRE is exited via the debugger, which can look like a dead chip. ISP shares PB3-PB5 with SPI peripherals; add 10k series resistors so SD cards or displays do not fight the programmer.
Estimated: the ATMEGA168-20MU draws approximately 0.2mA per MHz actively at 5V, so a 20MHz active core consumes roughly 5-6mA (estimate from AVR datasheet typical curves, not a single headline spec). In a 2xAA battery node, budget for power-down sleep around sub-uA level and wake via pin-change interrupts; at a 1% duty cycle from sleep, average current falls to tens of microamps, giving multi-year battery life. Enable brown-out detection set near 2.7V to prevent Flash corruption at end-of-battery discharge.
Keep the crystal (if used on PB6/PB7) within 10mm of the pins with load capacitors grounded directly to the exposed-pad ground pour; long crystal traces pick up digital switching noise and cause startup failures at 20MHz. For the 8-channel ADC on this QFN variant, route analog inputs (PC0-PC5, ADC6, ADC7) away from the SPI and UART lines, and place a 10nF capacitor on each analog input to form an RC with the source impedance (keep source impedance below 10k for full 10-bit accuracy per ADC sample-and-hold requirements).
Compliance Information
VQFN-packaged ATmega168 family is offered lead-free/RoHS-compliant per distributor listings; formal RoHS/REACH certificates should be obtained from Microchip for the exact date code. Not an automotive AEC-Q100 part.