ATMEGA168-20PU - 8-bit AVR MCU 16KB Flash 20MHz PDIP-28 | Microchip
MPN: ATMEGA168-20PU β Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $5.05 | $5.05 |
| 10 | $4.72 | $47.20 |
| 100 | $4.35 | $435.00 |
| 500 | $4.05 | $2,025.00 |
| 1,000 | $3.78 | $3,780.00 |
ATMEGA168-20PU Overview
An 8-bit microcontroller (MCU) is a self-contained computing chip that integrates a processor core, program memory, data memory, and peripherals on a single die. Within the power-management and embedded hierarchy, the ATMEGA168 belongs to the AVR ATmega family of microcontroller ICs, which sit above bare logic ICs and below 32-bit application processors, making them ideal for compact embedded control tasks.
Key features include the advanced AVR RISC architecture executing 133 powerful instructions - most in a single clock cycle - 32 general-purpose 8-bit working registers, 16KB of In-System Self-Programmable Flash with read-while-write capability, and debugWIRE on-chip debugging. The 20 MHz grade (the '-20' suffix) delivers up to 20 MIPS throughput at 5V, roughly 1 MIPS per MHz.
The Harvard-architecture core accesses program and data memory through separate buses, allowing single-cycle instruction fetch. Peripheral set includes two 8-bit timers, one 16-bit timer, a 6-channel 10-bit ADC on the PDIP variant, USART, two-wire interface (I2C-compatible), SPI, analog comparator, and multiple sleep modes for low-power design. In-System Programming (ISP) via the SPI or debugWIRE interface allows firmware updates without removing the chip from the board.
Typical applications include Arduino-compatible hobby and prototyping boards, industrial sensor nodes, home automation controllers, battery-powered instruments, and legacy through-hole designs where hand-solderability matters. The PDIP-28 package fits standard 0.1-inch sockets for rapid prototyping.
Design tip: full 20 MHz operation is specified at 4.5V to 5.5V; at lower supply voltages the maximum safe clock frequency scales down per the datasheet frequency-versus-voltage curve.
This page synthesizes verified distributor pricing, drop-in alternatives, PDIP-28 pinout data, and practical design notes not consolidated in the manufacturer datasheet.
Drop-in alternatives for ATMEGA168-20PU β 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-20PU (same form factor and footprint) β differing in Core Processor, Package, ADC Channels, Communication Interfaces, Instructions.
Quick Comparison Tool β Select alternative parts for side-by-side comparison:
ATMEGA168A-PU
β Drop-Inπ Reference alternative (not in catalog)
ATMEGA168PA-PU
β Drop-Inβ In Stock
$1.86 / Unit
View Datasheet βATMEGA168P-20PU
β Drop-Inβ In Stock
$2.05 / Unit
View Datasheet βATMEGA328P-PU
β Drop-Inπ Reference alternative (not in catalog)
ATMEGA328-PU
β Drop-Inπ Reference alternative (not in catalog)
ATMEGA88-20PU
β Drop-In β οΈ εζ°εΎ ιͺθ―π Reference alternative (not in catalog)
ATMEGA168-20PI
β Drop-In β οΈ εζ°εΎ ιͺθ―π Reference alternative (not in catalog)
ATMEGA168-20PU Maximum Ratings & Electrical Characteristics
| Core Processor | AVR 8-bit RISC |
| Core Size | 8-Bit |
| Max Clock Speed | 20 MHz |
| Flash Memory | 16 KB (8K x 16) |
| EEPROM | 512 B |
| SRAM | 1 KB |
| Supply Voltage Range | 2.7 V to 5.5 V |
| General Purpose I/O | 23 |
| ADC Resolution | 10-bit |
| ADC Channels (PDIP) | 6 |
| Communication Interfaces | USART, SPI, I2C (TWI) |
| Timers | 2 x 8-bit, 1 x 16-bit |
| Package | 28-PDIP (0.300 inch, 7.62 mm) |
| Mounting Type | Through Hole |
| Instruction Set | 133 instructions, most single-cycle |
| Working Registers | 32 x 8-bit |
| Debug Interface | debugWIRE |
ATMEGA168-20PU Pin Configuration
| Pin 1 | PC6 / RESET β Reset input (active low) or digital I/O PC6 |
| Pin 2 | PD0 / RXD β Digital I/O PD0, USART receive |
| Pin 3 | PD1 / TXD β Digital I/O PD1, USART transmit |
| Pin 4 | PD2 / INT0 β Digital I/O PD2, external interrupt 0 |
| Pin 5 | PD3 / INT1 / OC2B β Digital I/O PD3, external interrupt 1, Timer2 PWM output |
| Pin 6 | PD4 / T0 / XCK β Digital I/O PD4, Timer0 counter input, USART external clock |
| Pin 7 | VCC β Digital supply voltage (2.7 V to 5.5 V) |
| Pin 8 | GND β Ground |
| Pin 9 | PB6 / XTAL1 / TOSC1 β Digital I/O PB6, crystal oscillator input, RTC oscillator input |
| Pin 10 | PB7 / XTAL2 / TOSC2 β Digital I/O PB7, crystal oscillator output |
| Pin 11 | PD5 / T1 / OC0B β Digital I/O PD5, Timer1 counter input, Timer0 PWM output |
| Pin 12 | PD6 / AIN0 / OC0A β Digital I/O PD6, analog comparator positive input, Timer0 PWM output |
| Pin 13 | PD7 / AIN1 β Digital I/O PD7, analog comparator negative input |
| Pin 14 | PB0 / ICP1 / CLK0 β Digital I/O PB0, Timer1 input capture, divided clock output |
| Pin 15 | PB1 / OC1A β Digital I/O PB1, Timer1 PWM output A |
| Pin 16 | PB2 / SS / OC1B β Digital I/O PB2, SPI slave select, Timer1 PWM output B |
| Pin 17 | PB3 / MOSI / OC2A β Digital I/O PB3, SPI master data out, Timer2 PWM output |
| Pin 18 | PB4 / MISO β Digital I/O PB4, SPI master data in |
| Pin 19 | PB5 / SCK β Digital I/O PB5, SPI serial clock |
| Pin 20 | AVCC β ADC supply voltage, connect to VCC via low-pass filter |
| Pin 21 | AREF β ADC analog reference voltage |
| Pin 22 | GND β Ground |
| Pin 23 | PC0 / ADC0 β Digital I/O PC0, ADC channel 0 |
| Pin 24 | PC1 / ADC1 β Digital I/O PC1, ADC channel 1 |
| Pin 25 | PC2 / ADC2 β Digital I/O PC2, ADC channel 2 |
| Pin 26 | PC3 / ADC3 β Digital I/O PC3, ADC channel 3 |
| Pin 27 | PC4 / ADC4 / SDA β Digital I/O PC4, ADC channel 4, TWI data line |
| Pin 28 | PC5 / ADC5 / SCL β Digital I/O PC5, ADC channel 5, TWI clock line |
Typical Applications
ATMEGA168-20PU is suitable for 6 applications: Arduino-Compatible Prototyping Boards, Industrial Sensor Nodes and Data Loggers, Home Automation and Smart Devices, Battery-Powered Portable Instruments, Motor Control and PWM Actuation, Educational and Legacy Through-Hole Systems.
Arduino-Compatible Prototyping Boards
The ATMEGA168-20PU is a natural fit for Arduino-compatible boards and through-hole prototypes because the PDIP-28 package plugs into a standard 0.1-inch socket, allowing the MCU to be swapped without desoldering. The Arduino ecosystem (including the MiniCore hardware package on GitHub) provides bootloaders and board definitions for ATmega168/328 parts. With a 16 MHz crystal at 5V, the device delivers 16 MIPS with single-cycle I/O access, comfortably running digitalRead/Write, PWM, and ADC sampling loops. ISP flashing through the SPI header keeps firmware updates non-destructive to the board.
Recommended
Industrial Sensor Nodes and Data Loggers
In industrial sensing, the ATMEGA168-20PU combines a 10-bit ADC with six analog channels on the PDIP variant, USART for RS-485/Modbus links via a transceiver, and the TWI (I2C) master for digital sensors. The 2.7V-5.5V supply range tolerates unregulated industrial rails after simple LDO conditioning, and the Power-down sleep mode (sub-uA class) suits battery-backed loggers that wake on timer or interrupt. The 16KB Flash accommodates a Modus-free acquisition firmware plus a small protocol stack, while 512B EEPROM safely stores calibration constants across power cycles.
Recommended
Home Automation and Smart Devices
For smart-home nodes such as wall switches, dimmers, and RF remotes, the ATMEGA168-20PU offers TWI for OLED displays and RTC chips, SPI for RF transceiver modules, and hardware PWM on multiple timer channels for LED dimming or small motor control. Running at 20 MHz from a 5V rail gives ample timing resolution for zero-cross AC dimming, and the analog comparator supports mains-sync detection without external op-amps. The through-hole package simplifies repair-friendly consumer designs and low-volume assembly by hand or wave soldering.
Recommended
Battery-Powered Portable Instruments
Portable meters and handheld instruments benefit from the AVR family's low-power design: multiple sleep modes, an on-chip ADC with internal 1.1V/2.56V references, and clock prescaling that lets the 20 MHz core idle at kilohertz rates to save power. The 2.7V floor permits two-cell alkaline or single-cell lithium operation with a boost regulator. Firmware can gate peripherals per the datasheet's Power Reduction Register, and debugWIRE on the RESET pin enables single-wire in-system debugging with only one signal pin consumed during development.
Recommended
Motor Control and PWM Actuation
The ATMEGA168-20PU drives small DC motors, servos, and stepper drivers using its three timers: two 8-bit timers provide up to four PWM channels for fan/servo control, and the 16-bit Timer1 generates precise servo or phase-correct PWM at 20 MHz resolution. Hardware input-capture supports tachometer/encoder feedback without CPU polling. Fast GPIO with single-cycle access allows bit-banged protocols for ESC or driver interfaces. Combined with a MOSFET gate driver, the MCU's 20 MIPS throughput handles closed-loop speed control loops at multi-kilohertz update rates.
Recommended
Educational and Legacy Through-Hole Systems
Universities and repair shops value the ATMEGA168-20PU because the DIP-28 body teaches real pin-level wiring - crystals, ISP headers, decoupling - with no hot-air rework required, and it retrofits into decades of legacy DIP-based control boards as a direct replacement for older AT90S/ATmega8-class sockets (with firmware porting). The AVR instruction set, with 133 mostly single-cycle instructions and 32 working registers, remains a standard teaching platform, and open toolchains (avrdude, GCC, MiniCore) run free on any PC.
Recommended
Recommended Products Summary
Engineering reference data for ATMEGA168-20PU β comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | ATMEGA168A-PU | ATMEGA168PA-PU | ATMEGA168P-20PU | ATMEGA328P-PU | ATMEGA88-20PU |
|---|---|---|---|---|---|---|
| Package | 28-PDIP | 28-PDIP - same | 28-PDIP - same | 28-PDIP - same | 28-PDIP - same | 28-PDIP - same |
| Brand | Microchip Technology (Atmel legacy) | 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 | 1 KB |
| EEPROM | 512 B | 512 B | 512 B | 512 B | 1 KB | 512 B |
| Max Clock Speed | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz |
| Power Technology | Standard CMOS | Refreshed low-power | picoPower | picoPower | picoPower | Standard CMOS |
| GPIO Count | 23 | 23 | 23 | 23 | 23 | 23 |
| Drop-in Compatibility | Reference part | Pin-to-pin, same register map | Pin-to-pin, same register map | Pin-to-pin, same register map | Pin-to-pin upgrade, 2x memory | Pin-to-pin downgrade, half Flash |
Key Differentiators
- Through-hole PDIP-28 package for socketed, repairable designs (vs ATMEGA168-20AU / ATMEGA328P-PU TQFP peers)
- 20 MHz top speed grade within the ATmega168 PDIP family (vs ATMEGA168V-10PU / ATMEGA168PV-10PU)
- Straightforward memory upgrade path (vs ATMEGA328P-PU)
Design Notes
The 20 MHz '-20' speed grade is guaranteed only in the 4.5V-5.5V supply region; below that, derate the clock per the datasheet maximum-frequency-vs-VCC safe operating region (roughly halving near 2.7V). Provide separate VCC and AVCC filtering: connect AVCC to VCC through an LC or RC low-pass (e.g., 10 uH / 10 uF) so ADC readings are not corrupted by digital supply noise, and never leave AVCC floating even if the ADC is unused.
Place 100 nF ceramic decoupling capacitors directly across VCC-GND (pins 7-8) and AVCC-GND (pin 20 to nearest ground), with leads as short as possible on through-hole layouts. Add a bulk 10 uF capacitor at the power entry point. Route the ISP header (MOSI/MISO/SCK/RESET/VCC/GND) as a 2x3 0.1-inch header near the MCU so AVRISP/MPLAB SNAP programmers reach it without disturbing crystal routing.
PC6 (pin 1) defaults to RESET, not GPIO - reconfiguring it as I/O disables external reset and complicates ISP recovery, so keep it as RESET in most designs. When using an external crystal on PB6/PB7, set the correct CKSEL/SUT fuse bits; wrong fuses can brick the clock configuration, requiring a high-frequency external clock for rescue. Also note RESET doubles as the debugWIRE single-wire debug pin.
For I2C (TWI on PC4/SDA, PC5/SCL), include pull-up resistors sized for bus capacitance - typically 4.7 kOhm at 100 kHz for short buses on a 5V rail. For USART links beyond board level, use a proper transceiver (RS-485/RS-232) rather than driving lines directly. Crystal layout should keep the crystal and two load capacitors within a few millimeters of PB6/PB7 over a solid ground pour.
Compliance Information
Compliance status not stated in provided web data; the FindMyChip listing references 'GREEN' packaging for the related ATMEGA168P-20PU, but this product's RoHS/REACH status must be confirmed on the Microchip product page.