ATMEGA168-20AU - 8-Bit AVR MCU 16KB Flash 20MHz | Microchip
MPN: ATMEGA168-20AU β Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $2.85 | $2.85 |
| 10 | $2.56 | $25.60 |
| 100 | $2.28 | $228.00 |
| 500 | $2.05 | $1,025.00 |
| 1,000 | $1.82 | $1,820.00 |
ATMEGA168-20AU Overview
An AVR microcontroller is a Harvard-architecture 8-bit RISC device that executes most instructions in a single clock cycle, sitting in the hierarchy MCU -> 8-bit microcontroller -> embedded processor -> semiconductor. The ATmega168 family is the classic general-purpose AVR line, offering a balance of flash memory, peripheral integration, and low power that made it a de-facto standard for embedded control, hobbyist platforms, and industrial sensor nodes.
Key differentiators include 16 KB flash with read-while-write self-programming, 20 MIPS throughput at 20 MHz, debugWIRE on-chip debug, and a rich peripheral set: two 8-bit and one 16-bit timer/counter with PWM, USART, SPI, and TWI (I2C) serial interfaces, and a programmable watchdog. The 10-bit ADC with 8 multiplexed channels supports precision analog sensing without external converters.
The device uses Atmel/Microchip's low-power CMOS process with multiple sleep modes (idle, ADC noise reduction, power-save, power-down, standby, and extended standby), drawing under 1 uA in power-down, which suits battery-powered and energy-harvesting designs. In-system programming via SPI and a bootloader section enable field firmware updates.
Typical applications include industrial control and automation nodes, consumer appliance control boards, battery-powered IoT sensor endpoints, motor and lighting control, and educational/development platforms. The 32-TQFP package with 7x7 mm body and 0.8 mm pitch is reflow-compatible and supports compact two-layer PCB layouts.
When designing, decouple AVCC and VCC with 100 nF ceramics close to the pins, use a 10 uF bulk capacitor on the supply rail, and keep the AREF pin bypassed to ground for ADC accuracy. The internal calibrated 8 MHz RC oscillator allows operation without an external crystal, while an external 16 MHz crystal is recommended for USB-class timing accuracy.
This page synthesizes distributor pricing, drop-in alternatives, and practical design notes not found in the manufacturer datasheet, giving engineers a single reference for selection, replacement, and layout decisions.
Drop-in alternatives for ATMEGA168-20AU β 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-20AU (same form factor and footprint) β differing in Operating Temperature, Communication Interfaces, Instruction Set, Programming, Throughput.
Quick Comparison Tool β Select alternative parts for side-by-side comparison:
ATMEGA168P-20AU
β Drop-Inβ In Stock
$2.91 / Unit
View Datasheet βATMEGA168A-AU
β Drop-Inβ In Stock
$1.42 / Unit
View Datasheet βATMEGA168PA-AU
β Drop-Inπ Reference alternative (not in catalog)
ATMEGA88-20AU
β Drop-Inπ Reference alternative (not in catalog)
ATMEGA328P-20AU
β Drop-Inπ Reference alternative (not in catalog)
ATMEGA168-20AU Maximum Ratings & Electrical Characteristics
| Core Architecture | 8-bit AVR RISC |
| Program Memory | 16 KB In-System Programmable Flash |
| SRAM | 1 KB |
| EEPROM | 512 B |
| Maximum Clock Frequency | 20 MHz |
| Throughput | 20 MIPS at 20 MHz |
| Supply Voltage Range | 2.7 V to 5.5 V |
| General Purpose I/O Lines | 23 |
| General Purpose Working Registers | 32 x 8-bit |
| ADC | 8-channel, 10-bit successive approximation |
| Timers | 2 x 8-bit, 1 x 16-bit with PWM |
| Serial Interfaces | USART, SPI, TWI (I2C) |
| On-Chip Debug | debugWIRE |
| Package | 32-TQFP (7x7 mm) |
| Operating Temperature | -40C to +85C |
| Mounting Type | Surface Mount |
| Instruction Set | 131 powerful instructions, most single clock cycle |
| RoHS Status | Compliant |
ATMEGA168-20AU Pin Configuration
| Pin 1 | PB0 β Port B, bit 0 (also ICP1/CLKO/PCINT0) |
| Pin 2 | PB1 β Port B, bit 1 (also OC1A/PCINT1) |
| Pin 3 | PB2 β Port B, bit 2 (also SS/OC1B/PCINT2) |
| Pin 4 | PB3 β Port B, bit 3 (also MOSI/OC2A/PCINT3) |
| Pin 5 | PB4 β Port B, bit 4 (also MISO/PCINT4) |
| Pin 6 | PB5 β Port B, bit 5 (also SCK/PCINT5) |
| Pin 7 | PB6 β Port B, bit 6 (also XTAL1/TOSC1/PCINT6) |
| Pin 8 | PB7 β Port B, bit 7 (also XTAL2/TOSC2/PCINT7) |
| Pin 9 | RESET β Reset input (active low) |
| Pin 10 | VCC β Digital supply voltage |
| Pin 11 | GND β Ground |
| Pin 12 | XTAL2 β Crystal oscillator output |
| Pin 13 | XTAL1 β Crystal oscillator input |
| Pin 14 | PD0 β Port D, bit 0 (also RXD/PCINT16) |
| Pin 15 | PD1 β Port D, bit 1 (also TXD/PCINT17) |
| Pin 16 | PD2 β Port D, bit 2 (also INT0/PCINT18) |
| Pin 17 | PD3 β Port D, bit 3 (also INT1/OC2B/PCINT19) |
| Pin 18 | PD4 β Port D, bit 4 (also T0/PCINT20) |
| Pin 19 | PD5 β Port D, bit 5 (also T1/OC0B/PCINT21) |
| Pin 20 | PD6 β Port D, bit 6 (also AIN0/OC0A/PCINT22) |
| Pin 21 | PD7 β Port D, bit 7 (also AIN1/PCINT23) |
| Pin 22 | PC0 β Port C, bit 0 (also ADC0/PCINT8) |
| Pin 23 | PC1 β Port C, bit 1 (also ADC1/PCINT9) |
| Pin 24 | PC2 β Port C, bit 2 (also ADC2/PCINT10) |
| Pin 25 | PC3 β Port C, bit 3 (also ADC3/PCINT11) |
| Pin 26 | PC4 β Port C, bit 4 (also ADC4/SDA/PCINT12) |
| Pin 27 | PC5 β Port C, bit 5 (also ADC5/SCL/PCINT13) |
| Pin 28 | PC6 β Port C, bit 6 (also RESET/PCINT14) |
| Pin 29 | AREF β Analog reference voltage for ADC |
| Pin 30 | AVCC β Analog supply voltage for ADC |
| Pin 31 | GND β Ground |
| Pin 32 | ADC7 β ADC channel 7 input |
Typical Applications
ATMEGA168-20AU is suitable for 6 applications: Industrial Control and Automation, Battery-Powered IoT Sensor Nodes, Consumer Appliance Control Boards, Motor and Lighting Control, Embedded Development and Education, Precision Analog Sensing and Data Acquisition.
Industrial Control and Automation
The ATMEGA168-20AU fits industrial control nodes because its 23 I/O lines, 2.7 V to 5.5 V supply, and -40C to +85C temperature range match PLC and factory automation requirements. Its USART, SPI, and TWI interfaces connect directly to sensors, motor drivers, and communication modules without glue logic. Running at 20 MHz, it executes control loops with deterministic single-cycle instruction timing, and the watchdog timer plus brown-out detection improve fault tolerance. A typical node uses the 10-bit ADC to read analog process signals while PWM outputs drive actuators. The trade-off versus a 32-bit MCU is lower math throughput, but for relay sequencing, sensor polling, and Modbus-style communication the 8-bit AVR is cost-effective and well supported by the AVR toolchain.
Recommended
Battery-Powered IoT Sensor Nodes
The ATMEGA168-20AU suits battery-powered IoT endpoints because its multiple sleep modes draw under 1 uA in power-down, and it operates down to 2.7 V, extending coin-cell and Li-ion runtime. The integrated 8-channel 10-bit ADC reads temperature, humidity, or pressure sensors directly, while SPI and TWI connect radio modules such as sub-GHz or BLE transceivers. At 20 MHz the MCU wakes, samples, and transmits quickly, minimizing radio-on time and average current. The 16 KB flash holds sensor drivers plus a lightweight protocol stack, and 512 B EEPROM stores calibration data across power cycles. Compared with a 32-bit Cortex-M0, the AVR offers simpler peripherals and lower standby leakage, though it lacks hardware floating point for complex DSP.
Recommended
Consumer Appliance Control Boards
The ATMEGA168-20AU is widely used in consumer appliance control boards because it integrates the timers, PWM, ADC, and serial interfaces needed for touch panels, motor control, and display drivers on one 32-TQFP device. Its 16 KB flash accommodates user-interface state machines and safety logic, while 23 I/O lines drive relays, LEDs, and buttons. The 5 V-tolerant supply simplifies interfacing with legacy 5 V peripherals, and the internal 8 MHz RC oscillator removes the external crystal for cost-sensitive designs. For washing machines, coffee makers, or air purifiers, the MCU runs control loops at 20 MHz with deterministic timing. The main trade-off is limited RAM for large graphical displays, where a 32-bit MCU with more SRAM would be preferable.
Recommended
Motor and Lighting Control
The ATMEGA168-20AU supports motor and lighting control because its 16-bit timer/counter generates precise PWM for BLDC commutation, dimming, and servo positioning, while the 10-bit ADC monitors current sense resistors for overcurrent protection. At 20 MHz, PWM resolution and loop latency are adequate for fans, steppers, and LED drivers. The 23 I/O lines handle gate drivers, limit switches, and user inputs, and the USART enables remote control or diagnostics. Compared with a dedicated motor-control MCU, the AVR lacks advanced PWM dead-time insertion, so external gate drivers with built-in dead time are recommended. Its 2.7 V to 5.5 V range allows direct drive from 5 V rails common in lighting ballasts and appliance motors.
Recommended
Embedded Development and Education
The ATMEGA168-20AU is a staple of embedded education and prototyping because the AVR architecture, debugWIRE on-chip debug, and in-system programming make it easy to learn and iterate. The 32-TQFP package is breadboard-friendly via breakout adapters, and the 16 KB flash is large enough for RTOS-lite schedulers and communication stacks. Students and engineers use it to study timers, interrupts, ADC, and serial protocols with a mature toolchain including Atmel Studio, avr-gcc, and Arduino-compatible cores. The 20 MHz clock and 20 MIPS throughput give responsive behavior for teaching labs. The trade-off versus modern 32-bit boards is lower performance and memory, but the AVR's simplicity and abundant documentation make it ideal for foundational learning.
Recommended
Precision Analog Sensing and Data Acquisition
The ATMEGA168-20AU fits precision analog sensing because its 8-channel 10-bit successive-approximation ADC, programmable gain, and ADC noise-reduction sleep mode enable accurate measurement of thermocouples, strain gauges, and photodiodes. The AREF pin allows an external precision reference to improve absolute accuracy beyond the internal reference. At 20 MHz, the ADC can oversample and average readings to gain effective resolution, while the USART or SPI streams data to a host or logger. The 512 B EEPROM stores calibration coefficients, and the watchdog timer recovers from lockups in remote installations. Compared with a dedicated 16-bit ADC plus MCU, the integrated 10-bit ADC saves board space and cost, though it limits resolution for high-precision instrumentation.
Recommended
Recommended Products Summary
Engineering reference data for ATMEGA168-20AU β comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | ATMEGA168P-20AU | ATMEGA168A-AU | ATMEGA88-20AU | ATMEGA328P-20AU |
|---|---|---|---|---|---|
| Package | 32-TQFP (7x7) | 32-TQFP (7x7) - same | 32-TQFP (7x7) - same | 32-TQFP (7x7) - same | 32-TQFP (7x7) - same |
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Flash Memory | 16 KB | 16 KB | 16 KB | 8 KB | 32 KB |
| SRAM | 1 KB | 1 KB | 1 KB | 1 KB | 2 KB |
| EEPROM | 512 B | 512 B | 512 B | 512 B | 1 KB |
| Maximum Clock Frequency | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz |
| Supply Voltage Range | 2.7 V to 5.5 V | 2.7 V to 5.5 V | 2.7 V to 5.5 V | 2.7 V to 5.5 V | 2.7 V to 5.5 V |
| GPIO Lines | 23 | 23 | 23 | 23 | 23 |
| Low-Power Technology | Standard AVR | picoPower | Standard AVR | Standard AVR | picoPower |
| Operating Temperature | -40C to +85C | -40C to +85C | -40C to +85C | -40C to +85C | -40C to +85C |
Key Differentiators
- Pin-compatible picoPower upgrade path (vs ATMEGA168P-20AU)
- Higher memory in the same footprint (vs ATMEGA328P-20AU)
- Cost-optimized for smaller firmware (vs ATMEGA88-20AU)
Design Notes
Decouple VCC and AVCC with 100 nF ceramic capacitors placed within a few millimeters of the pins, and add a 10 uF bulk capacitor on the supply rail. AVCC should be connected through a low-pass filter (10 uH inductor or ferrite bead plus 100 nF) to isolate ADC noise from digital switching. Estimated: at 20 MHz and 5 V, active current is roughly 15 mA, so a 10 uF bulk capacitor provides adequate transient reserve for typical load steps.
Route the crystal or resonator traces as short as possible and keep them away from high-speed digital signals. Place the 22 pF load capacitors close to the crystal pins and connect their ground returns directly to the MCU ground plane. For the 32-TQFP package, use a solid ground plane under the device and thermal-relief vias on the exposed pad area if present. Keep the AREF bypass capacitor (100 nF) adjacent to the AREF pin for ADC accuracy.
Do not leave the RESET pin floating; add a 10 kOhm pull-up to VCC and a 100 nF capacitor to ground to prevent spurious resets. Ensure the ISP programming header connects MOSI, MISO, SCK, RESET, VCC, and GND correctly, and that the SPI clock is below the flash programming frequency limit. When using the internal 8 MHz RC oscillator, calibrate it via the OSCCAL register if UART baud-rate accuracy matters, since uncalibrated RC drift can exceed 10 percent.
Compliance Information
RoHS compliance indicated by distributor listings. AEC-Q100 automotive qualification not indicated for the standard ATMEGA168-20AU; automotive-grade variants should be sourced separately.