ATMEGA168P-20AU - 8-Bit AVR 16KB Flash MCU | Microchip
MPN: ATMEGA168P-20AU ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $4.54 | $4.54 |
| 10 | $4.09 | $40.90 |
| 100 | $3.63 | $363.00 |
| 500 | $3.27 | $1,635.00 |
| 1,000 | $2.91 | $2,910.00 |
ATMEGA168P-20AU Overview
An 8-bit microcontroller (MCU) is a single-chip computer that integrates a CPU, program memory, data memory, and peripherals such as timers, serial interfaces, and analog-to-digital converters. Within the semiconductor taxonomy, the ATmega168P sits under 8-bit microcontrollers, which belong to the broader embedded microcontroller family, itself a subset of integrated circuits. The AVR core uses a Harvard architecture with 32 general-purpose working registers and 133 powerful instructions, most executing in a single clock cycle, delivering up to 20 MIPS throughput at 20 MHz.
Key features include 16 KB ISP flash with read-while-write capability, 512 B EEPROM for non-volatile parameter storage, 1 KB SRAM, three flexible timer/counters with compare modes, a 10-bit ADC, a programmable USART, and an SPI and TWI (I2C) interface. The picoPower technology reduces active and standby current, making the device suitable for battery-powered designs.
The ATmega168P is fabricated on Microchip's low-power CMOS process and supports in-system programming and on-chip debug via the SPI-based ICSP interface, eliminating the need for a separate programmer in production. Its 23 I/O lines are grouped into three ports (PORTB, PORTC, PORTD), each with selectable internal pull-ups.
Typical applications include consumer electronics, battery management, industrial control, sensor nodes, and hobbyist/Arduino-compatible platforms. The 32-TQFP package offers a compact 7x7 mm footprint with 0.8 mm pitch, well suited to automated surface-mount assembly.
When designing with this device, decouple VCC and AVCC with 100 nF ceramic capacitors placed close to the pins, and connect the AREF pin through a low-pass filter when using the ADC. This page synthesizes distributor pricing, drop-in alternatives, and practical design notes not found in the manufacturer datasheet.
Drop-in alternatives for ATMEGA168P-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 ATMEGA168P-20AU (same form factor and footprint) — differing in Operating Temperature, Serial Interfaces, Instruction Set, SRAM, Package.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
ATMEGA168-20AU
✅ Drop-In✓ In Stock
$1.82 / Unit
View Datasheet →ATMEGA168A-AU
✅ Drop-In✓ In Stock
$1.42 / Unit
View Datasheet →ATMEGA168PA-AU
✅ Drop-In✓ In Stock
$0.98 / Unit
View Datasheet →ATMEGA328P-AU
✅ Drop-In✓ In Stock
$1.9 / Unit
View Datasheet →ATMEGA88PA-AU
✅ Drop-In📋 Reference alternative (not in catalog)
ATMEGA168P-20AU Maximum Ratings & Electrical Characteristics
| Core Processor | AVR 8-bit RISC |
| Program Memory Size | 16 KB (8K x 16) Flash |
| EEPROM Size | 512 B |
| SRAM Size | 1 KB |
| Maximum Clock Frequency | 20 MHz |
| Operating Voltage Range | 2.7 V to 5.5 V |
| Number of I/O Lines | 23 |
| General Purpose Registers | 32 |
| Instruction Set | 133 instructions, most single-cycle |
| ADC Resolution | 10-bit |
| Timer/Counters | 3 (two 8-bit, one 16-bit) with compare modes |
| Serial Interfaces | USART, SPI, TWI (I2C) |
| Package | 32-TQFP (7x7 mm) |
| Mounting Type | Surface Mount |
| Operating Temperature | -40 C to +85 C (industrial) |
| Programming Interface | ISP / ICSP (SPI-based) |
| RoHS Status | Compliant (GREEN) |
ATMEGA168P-20AU Pin Configuration
| Pin 1 | PB0 — Port B, bit 0 (also ICP1) |
| Pin 2 | PB1 — Port B, bit 1 (also OC1A) |
| Pin 3 | PB2 — Port B, bit 2 (also SS/OC1B) |
| Pin 4 | PB3 — Port B, bit 3 (also MOSI/OC2A) |
| Pin 5 | PB4 — Port B, bit 4 (also MISO) |
| Pin 6 | PB5 — Port B, bit 5 (also SCK) |
| Pin 7 | PB6 — Port B, bit 6 (also XTAL1/TOSC1) |
| Pin 8 | PB7 — Port B, bit 7 (also XTAL2/TOSC2) |
| Pin 9 | RESET — Reset input, active low |
| Pin 10 | VCC — Digital supply voltage |
| Pin 11 | GND — Ground |
| Pin 12 | XTAL1 — Crystal oscillator input / external clock |
| Pin 13 | XTAL2 — Crystal oscillator output |
| Pin 14 | PD0 — Port D, bit 0 (also RXD) |
| Pin 15 | PD1 — Port D, bit 1 (also TXD) |
| Pin 16 | PD2 — Port D, bit 2 (also INT0) |
| Pin 17 | PD3 — Port D, bit 3 (also INT1/OC2B) |
| Pin 18 | PD4 — Port D, bit 4 (also T0/XCK) |
| Pin 19 | PD5 — Port D, bit 5 (also T1/OC0B) |
| Pin 20 | PD6 — Port D, bit 6 (also AIN0/OC0A) |
| Pin 21 | PD7 — Port D, bit 7 (also AIN1) |
| Pin 22 | PC0 — Port C, bit 0 (also ADC0) |
| Pin 23 | PC1 — Port C, bit 1 (also ADC1) |
| Pin 24 | PC2 — Port C, bit 2 (also ADC2) |
| Pin 25 | PC3 — Port C, bit 3 (also ADC3) |
| Pin 26 | PC4 — Port C, bit 4 (also ADC4/SDA) |
| Pin 27 | PC5 — Port C, bit 5 (also ADC5/SCL) |
| Pin 28 | PC6 — Port C, bit 6 (also RESET) |
| Pin 29 | AREF — Analog reference voltage for ADC |
| Pin 30 | AVCC — Analog supply voltage for ADC |
| Pin 31 | GND — Ground |
| Pin 32 | GND — Ground |
Typical Applications
ATMEGA168P-20AU is suitable for 6 applications: Battery-Powered Sensor Nodes, Industrial Control and Automation, Consumer Electronics and Appliances, Arduino-Compatible Prototyping, Motor and Motion Control, Data Logging and Measurement.
Battery-Powered Sensor Nodes
The ATMEGA168P-20AU fits battery-powered sensor nodes because its picoPower technology reduces active and standby current while the 2.7-5.5 V supply range allows direct operation from a single Li-ion cell or 3xAA pack. The 10-bit ADC samples analog sensors such as thermistors and photodiodes, and the 512 B EEPROM stores calibration coefficients without external memory. In a typical node, the MCU wakes from power-down on a timer interrupt, reads the sensor, and transmits via USART or SPI before returning to sleep. The trade-off is that at 20 MHz the active current is higher than at 8 MHz, so duty-cycled operation and clock prescaling are used to extend battery life.
Recommended
Industrial Control and Automation
The ATMEGA168P-20AU suits industrial control tasks such as relay sequencing, motor direction control, and panel monitoring because its 23 I/O lines and three timer/counters with compare modes generate precise PWM and timing signals. The -40 C to +85 C industrial temperature rating covers most factory-floor environments, and the 5 V operation provides good noise margin for optically isolated inputs. In a typical control board, the MCU reads limit switches on PORTD, drives relays through PORTB, and communicates with a host PLC over the USART. The 16 KB flash is adequate for state-machine firmware, but complex HMI code may require the 32 KB ATMEGA328P-AU.
Recommended
Consumer Electronics and Appliances
The ATMEGA168P-20AU is used in consumer appliances such as coffee machines, air purifiers, and smart thermostats, where it handles button scanning, LED or LCD driving, and temperature control loops. Its 10-bit ADC reads NTC thermistors and potentiometers, while the TWI (I2C) interface connects to small OLED or character LCD modules. The 32-TQFP package is compact enough for space-constrained control boards yet remains hand-solderable for low-volume production. Because the device operates from 2.7 V to 5.5 V, it can run directly from a regulated 3.3 V or 5 V rail, simplifying the power tree. Firmware updates in the field are supported by the read-while-write flash and an SPI or USART bootloader.
Recommended
Arduino-Compatible Prototyping
The ATMEGA168P-20AU is a natural fit for Arduino-compatible prototyping because the ATmega168P is the MCU used on early Arduino boards and is fully supported by the Arduino IDE, avr-gcc, and the Optiboot bootloader. Designers can program the device through the SPI-based ICSP header or load a serial bootloader for USB-to-serial updates. The 16 KB flash holds a bootloader plus a moderate sketch, while the 23 I/O lines map directly to the familiar Arduino digital and analog pin functions. The 32-TQFP package is compatible with common breakout boards and shields. For sketches that outgrow 16 KB, the pin-compatible ATMEGA328P-AU doubles flash and SRAM without changing the PCB.
Recommended
Motor and Motion Control
The ATMEGA168P-20AU can drive small brushed DC motors and stepper motors when paired with an external H-bridge or driver IC, using its 16-bit timer/counter to generate precise PWM and its 8-bit timers for step pulse generation. The 20 MHz clock provides fine PWM resolution, and the 23 I/O lines are enough for limit switches, encoder inputs, and direction control. In a typical design, the MCU receives commands over USART or TWI, ramps the PWM duty cycle to limit inrush current, and monitors a current-sense feedback signal through the 10-bit ADC. Thermal and EMI considerations matter: keep motor return currents away from the MCU ground and add snubbers across the motor terminals.
Recommended
Data Logging and Measurement
The ATMEGA168P-20AU works well in portable data loggers because its 10-bit ADC digitizes sensor signals, the 512 B EEPROM stores configuration and calibration data, and the USART or SPI interface streams samples to an SD card or wireless module. The 1 KB SRAM supports small ring buffers, and the three timer/counters provide a stable sampling timebase. In a typical logger, the MCU sleeps between samples to conserve power, wakes on a timer compare match, performs an ADC conversion, and writes the result to external flash. The 2.7-5.5 V range allows operation from a 3.7 V Li-ion cell. For logs requiring more buffering, the pin-compatible ATMEGA328P-AU offers 2 KB SRAM.
Recommended
Recommended Products Summary
Engineering reference data for ATMEGA168P-20AU — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | ATMEGA168-20AU | ATMEGA168A-AU | ATMEGA168PA-AU | ATMEGA328P-AU | ATMEGA88PA-AU |
|---|---|---|---|---|---|---|
| Package | 32-TQFP (7x7 mm) | 32-TQFP (7x7 mm) - same | 32-TQFP (7x7 mm) - same | 32-TQFP (7x7 mm) - same | 32-TQFP (7x7 mm) - same | 32-TQFP (7x7 mm) - same |
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Flash Memory | 16 KB | 16 KB | 16 KB | 16 KB | 32 KB | 8 KB |
| SRAM | 1 KB | 1 KB | 1 KB | 1 KB | 2 KB | 512 B |
| EEPROM | 512 B | 512 B | 512 B | 512 B | 1 KB | 512 B |
| Maximum Clock | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz |
| Operating 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 | 1.8 V to 5.5 V |
| I/O Lines | 23 | 23 | 23 | 23 | 23 | 23 |
| picoPower Technology | Yes | No | Yes | Yes | Yes | Yes |
| ADC Resolution | 10-bit | 10-bit | 10-bit | 10-bit | 10-bit | 10-bit |
Key Differentiators
- picoPower low-power technology (vs ATMEGA168-20AU)
- Double the flash and SRAM of the 8 KB family member (vs ATMEGA88PA-AU)
- Lower cost than the 32 KB pin-compatible upgrade (vs ATMEGA328P-AU)
- Wide 2.7 V to 5.5 V supply with full 20 MHz operation (vs ATMEGA168A-AU)
Design Notes
Decouple both VCC (pin 10) and AVCC (pin 30) with 100 nF ceramic capacitors placed within a few millimeters of the pins, and add a 10 uF bulk capacitor on the board rail. AVCC should be connected to VCC through a low-pass filter (10 uH inductor or 10 ohm resistor plus 100 nF) when the ADC is used, per the Microchip ATmega168P datasheet recommendation. Keep the AREF pin bypassed with 100 nF to GND when using the internal reference, or drive it from a clean external reference for ratiometric measurements.
Route the crystal between XTAL1 (pin 12) and XTAL2 (pin 13) with the shortest possible traces and place the two load capacitors (typically 22 pF for a 16 MHz crystal) directly at the pins with a solid ground return. Keep the crystal area free of high-speed digital traces and, where possible, surround it with a ground guard ring. For the 32-TQFP package, use a 0.8 mm pitch land pattern and verify solder-paste stencil apertures against the Microchip package drawing to avoid bridging on the fine-pitch pins.
Do not leave the RESET pin floating; add a 10 kohm pull-up to VCC and a 100 nF capacitor to GND to prevent spurious resets, especially in noisy environments. Note that PC6 doubles as RESET on this device, so using it as an I/O requires disabling the reset function via the RSTDISBL fuse, which also disables ISP programming. Also verify the brown-out detector (BOD) level fuse setting: the default may be too low for reliable EEPROM writes at 5 V, and Microchip recommends enabling BOD at 2.7 V or higher for industrial designs.
Estimated: the ATmega168P-20AU dissipates roughly 50-100 mW at 5 V and 20 MHz in active mode, based on a typical active current in the low tens of milliamps; the 32-TQFP package has ample thermal margin at the -40 C to +85 C industrial rating, so no heatsinking is required. The dominant thermal consideration is self-heating from the on-chip linear regulator if one is used, not the MCU itself. Verify actual current from the datasheet electrical characteristics table for your clock and voltage combination.
Compliance Information
Distributor listings describe the ATMEGA168P-20AU as GREEN and RoHS compliant. The part is an industrial-temperature (-40 C to +85 C) device and is not AEC-Q100 qualified; automotive designs should select an AEC-Q100 qualified AVR variant.