Microchip Technology

ATMEGA164P-20PU - 8-bit AVR MCU 16KB Flash 20MHz DIP-40 | Microchip

MPN: ATMEGA164P-20PU βœ“ Active
In Stock Ships in 1-3 business days
2.7 V to 5.5 V Vdss 40-PDIP (DIP-40) through-hole Package 20 MHz Speed 16 KB (8K x 16) ISP FLASH Memory
From $1.55 USD / Unit
MOQ: 1 |
Price updated: 2026-09-15
Volume Pricing
Qty Unit Price Extended
1 $2.23 $2.23
10 $2.05 $20.50
100 $1.86 $186.00
500 $1.7 $850.00
1,000 $1.55 $1,550.00
ℹ️ All prices are in USD

ATMEGA164P-20PU Overview

The Microchip Technology ATMEGA164P-20PU is a picoPower 8-bit AVR RISC microcontroller with 16 KB ISP FLASH memory, 20 MHz maximum clock frequency, and 2.7 V to 5.5 V supply range, housed in a 40-pin PDIP (DIP-40) through-hole package.

An 8-bit AVR microcontroller is a Harvard-architecture RISC processor that executes most instructions in a single clock cycle. Within the power-management IC hierarchy, it sits at the embedded-control level: microcontroller -> embedded processor -> system-on-chip. The ATmega family is widely used for standalone embedded control, hobby and educational systems, and industrial sensing nodes.

Key features include 16 KB of self-programmable ISP FLASH with read-while-write capability, 512 B EEPROM, 1 KB internal SRAM, and 32 general-purpose I/O lines. The picoPower technology delivers low active and sleep current consumption, making the device suitable for battery-powered designs. Peripherals include two USARTs, a byte-oriented Two-Wire Interface (TWI/I2C), an SPI interface, an 8-channel 10-bit ADC, three flexible timers/counters with compare modes and PWM, a real-time counter, and on-chip JTAG debug/programming.

The Advanced RISC Architecture provides 131 powerful instructions, most executing in a single clock cycle, with 32 general-purpose working registers fully connected to the ALU. Executing one instruction per clock at 20 MHz yields up to 20 MIPS throughput. In-system programmability via SPI, plus JTAG boundary-scan per IEEE 1149.1 methodology support, simplifies manufacturing and field updates.

Typical applications include industrial control panels, sensor and data-logging nodes, motor and LED control, and educational/embedded platforms where through-hole DIP mounting allows easy prototyping and socketed replacement.

A key design consideration: the P (picoPower) variant has a newer die revision, the ATMEGA164PA, which is drop-in compatible and recommended for new designs; also note the device supports VCC down to 2.7 V, but full 20 MHz operation requires approximately 4.5 V to 5.5 V per AVR speed-grade curves.

This page adds distributor pricing, drop-in alternatives, complete DIP-40 pinout, and design notes not consolidated in the manufacturer datasheet.

Drop-in alternatives for ATMEGA164P-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 ATMEGA164P-20PU (same form factor and footprint) β€” differing in Package, ADC, Flash Program Memory, Instructions, Operating Temperature.

Microchip Technology
Package: 40-PDIP (0.600 in, 15.24 mm)
Flash Program Memory: 16 KB (8K x 16)
Instructions: 131 powerful instructions, mostly single-cycle
Compare with ATMEGA164P-20PU β†’
Microchip Technology
Package: 40-PDIP
ADC: 8-channel 10-bit
Flash Program Memory: 16 KB (8K x 16) In-System Programmable
Compare with ATMEGA164P-20PU β†’

Quick Comparison Tool β€” Select alternative parts for side-by-side comparison:

ATMEGA164PA-PU

βœ… Drop-In
πŸ“¦ DIP-40
newer PA die revision, same 16 KB/20 MHz/memory set and pinout; Microchip lists ATMEGA164PA as the newer device

πŸ“‹ Reference alternative (not in catalog)

ATMEGA324P-20PU

βœ… Drop-In
πŸ“¦ DIP-40
FLASH 32 KB vs 16 KB (+100%), SRAM 2 KB vs 1 KB (+100%), same pinout per AVR505

πŸ“‹ Reference alternative (not in catalog)

ATMEGA644P-20PU

βœ… Drop-In
πŸ“¦ DIP-40
FLASH 64 KB vs 16 KB (4x), SRAM 4 KB vs 1 KB, same DIP-40 pinout per AVR505 family compatibility

πŸ“‹ Reference alternative (not in catalog)

ATMEGA16-16PI

βœ… Drop-In
Microchip Technology
πŸ“¦ DIP-40
8-bit AVR RISC Β· 16 KB (8K x 16) In-System Programmable Β· 1 KB Β· 512 B Β· 16 MHz Β· Up to 16 MIPS at 16 MHz Β· 131 powerful instructions, most single-cycle Β· 32 x 8-bit

βœ“ In Stock

$3.72 / Unit

View Datasheet β†’

ATMEGA16-16PC

βœ… Drop-In
Microchip Technology
πŸ“¦ DIP-40
AVR Β· 8-bit Β· 16 MHz Β· Up to 16 MIPS at 16 MHz Β· 16 KB (8K x 16) Β· 1 KB Β· 512 B Β· 131 powerful instructions, mostly single-cycle

βœ“ In Stock

$4.48 / Unit

View Datasheet β†’

ATMEGA164P-20PI

βœ… Drop-In ⚠️ 参数待ιͺŒθ―
πŸ“¦ DIP-40
identical die and speed with industrial temperature range (-40C to +85C) vs commercial 0-70C of the PU suffix

πŸ“‹ Reference alternative (not in catalog)

ATMEGA164P-20PU Maximum Ratings & Electrical Characteristics

Core Architecture 8-bit AVR RISC
Flash Memory 16 KB (8K x 16) ISP FLASH
EEPROM 512 B
SRAM 1 KB
Maximum Clock Frequency 20 MHz
Peak Throughput Up to 20 MIPS at 20 MHz
Supply Voltage Range 2.7 V to 5.5 V
General Purpose I/O Lines 32
ADC 8-channel, 10-bit
USART 2
Serial Interfaces TWI (I2C), SPI
Timers/Counters 3 with compare modes and PWM
Debug / Programming JTAG (on-chip debug), ISP
Package 40-PDIP (DIP-40) through-hole
Technology picoPower low-power
Mounting Type Through Hole
Lifecycle Status Active (newer ATMEGA164PA available)

ATMEGA164P-20PU Pin Configuration

DIP-40 Package Pinout Diagram DIP-40 40-pin dual inline, 7.62mm pitch, JEDEC MS-001. 1 40 2 39 3 38 4 37 5 36 6 35 7 34 8 33 9 32 10 31 11 30 12 29 13 28 14 27 15 26 16 25 17 24 18 23 19 22 20 21 DIP-40
Pin 1 PB0 (XCK0/T0) β€” Port B bit 0; USART0 external clock / Timer0 external clock
Pin 2 PB1 (T1) β€” Port B bit 1; Timer1 external clock input
Pin 3 PB2 (INT2/AIN0) β€” Port B bit 2; external interrupt 2 / analog comparator positive input
Pin 4 PB3 (AIN1) β€” Port B bit 3; analog comparator negative input
Pin 5 PB4 (SS) β€” Port B bit 4; SPI slave select
Pin 6 PB5 (MOSI) β€” Port B bit 5; SPI master output / slave input
Pin 7 PB6 (MISO) β€” Port B bit 6; SPI master input / slave output
Pin 8 PB7 (SCK) β€” Port B bit 7; SPI serial clock
Pin 9 RESET β€” Active-low reset input / ISP reset
Pin 10 VCC β€” Digital supply voltage (2.7 V to 5.5 V)
Pin 11 GND β€” Ground
Pin 12 XTAL2 β€” Crystal oscillator output
Pin 13 XTAL1 β€” Crystal oscillator input / external clock input
Pin 14 PD0 (RXD0) β€” Port D bit 0; USART0 receive data
Pin 15 PD1 (TXD0) β€” Port D bit 1; USART0 transmit data
Pin 16 PD2 (RXD1/INT0) β€” Port D bit 2; USART1 receive / external interrupt 0
Pin 17 PD3 (TXD1/INT1) β€” Port D bit 3; USART1 transmit / external interrupt 1
Pin 18 PD4 (XCK1/T0) β€” Port D bit 4; USART1 external clock / Timer0 external clock
Pin 19 PD5 (OC1A) β€” Port D bit 5; Timer/Counter1 output compare A (PWM)
Pin 20 PD6 (ICP1) β€” Port D bit 6; Timer/Counter1 input capture
Pin 21 PD7 (OC2A) β€” Port D bit 7; Timer/Counter2 output compare A (PWM)
Pin 22 PC0 (SCL) β€” Port C bit 0; TWI serial clock
Pin 23 PC1 (SDA) β€” Port C bit 1; TWI serial data
Pin 24 PC2 (TCK) β€” Port C bit 2; JTAG test clock
Pin 25 PC3 (TMS) β€” Port C bit 3; JTAG test mode select
Pin 26 PC4 (TDO) β€” Port C bit 4; JTAG test data output
Pin 27 PC5 (TDI) β€” Port C bit 5; JTAG test data input
Pin 28 PC6 (TOSC1) β€” Port C bit 6; Timer oscillator input (32.768 kHz crystal)
Pin 29 PC7 (TOSC2) β€” Port C bit 7; Timer oscillator output
Pin 30 AVCC β€” Analog supply voltage for ADC and Port A
Pin 31 GND β€” Ground
Pin 32 AREF β€” Analog reference voltage for ADC
Pin 33 PA0 (ADC0) β€” Port A bit 0; ADC channel 0
Pin 34 PA1 (ADC1) β€” Port A bit 1; ADC channel 1
Pin 35 PA2 (ADC2) β€” Port A bit 2; ADC channel 2
Pin 36 PA3 (ADC3) β€” Port A bit 3; ADC channel 3
Pin 37 PA4 (ADC4) β€” Port A bit 4; ADC channel 4
Pin 38 PA5 (ADC5) β€” Port A bit 5; ADC channel 5
Pin 39 PA6 (ADC6) β€” Port A bit 6; ADC channel 6
Pin 40 PA7 (ADC7) β€” Port A bit 7; ADC channel 7

Typical Applications

ATMEGA164P-20PU is suitable for 6 applications: Industrial Control Panels, Sensor and Data-Logging Nodes, Motor and LED Control, Multi-Channel Serial Communication Gateways, Educational and Hobbyist Embedded Platforms, Battery-Powered Instrumentation.

🏭

Industrial Control Panels

The ATMEGA164P-20PU fits industrial control panels where a through-hole, socket-mounted MCU simplifies maintenance and field replacement. Its 20 MHz AVR core delivers up to 20 MIPS for real-time scanning of discrete inputs, relay outputs, and simple PID loops, while the two independent USARTs allow simultaneous Modbus RTU (RS-485) and operator-console (RS-232) links. The 10-bit ADC with 8 channels reads potentiometer setpoints and analog transducers, and the 512 B EEPROM retains calibration constants across power cycles. The 5.5 V maximum rating supports direct connection to industrially common 5 V logic rails, and the DIP-40 package tolerates the rework environments typical of panel assembly.

🧩

Sensor and Data-Logging Nodes

picoPower technology makes the ATMEGA164P-20PU well suited to battery-backed sensor nodes and data loggers. The device supports multiple sleep modes, including power-save with a real-time counter running from a separate 32.768 kHz crystal on TOSC1/TOSC2 (PC6/PC7), enabling periodic wake-and-measure duty cycles. In each wake event, the 8-channel 10-bit ADC digitizes sensor inputs and results are stored in the 1 KB SRAM buffer or streamed over USART. The 512 B EEPROM safely holds configuration even during battery swaps. Designs should budget clock-frequency derating if running below 4.5 V from a 3-cell or discharging Li-ion supply.

πŸ’‘

Motor and LED Control

Three timers/counters with compare modes and PWM outputs let the ATMEGA164P-20PU drive motors, fans, and LED strings directly. The 16-bit Timer/Counter1 generates high-resolution PWM on OC1A/OC1B (PD5/PD4 area pins), while 8-bit timers handle auxiliary PWM channels and system ticks. At 20 MHz, PWM resolution reaches full 10-bit at roughly 19.5 kHz, above audible range for fan and LED dimming applications. The analog comparator supports zero-cross and current-limit detection. Combined with the 10-bit ADC for back-EMF or current feedback, this makes the MCU a compact closed-loop controller for small DC motors and brightness-controlled LED fixtures.

🌐

Multi-Channel Serial Communication Gateways

With two full USARTs plus TWI and SPI, the ATMEGA164P-20PU acts as a compact protocol gateway: USART0 on PD0/PD1 can bridge RS-232 field devices while USART1 on PD2/PD3 handles an RS-485 network, and the SPI or TWI interface connects to displays, memories, or sensors on the controller side. Hardware support for multi-processor communication modes and the 20 MIPS core headroom allow concurrent buffering of two traffic streams within the 1 KB SRAM. This peripheral density in a through-hole DIP-40 makes it popular for retrofit gateways in legacy equipment where SMD assembly is impractical.

πŸ”§

Educational and Hobbyist Embedded Platforms

The DIP-40 package, socketed mounting, free AVR GCC toolchain, and ubiquitous ISP programmers (USBasp, AVR ISP mkII) make the ATMEGA164P-20PU a staple of embedded-systems education and hobby projects. Students can breadboard the minimum system with a 16 MHz crystal, program in-system through the SPI header (PB5/PB6/PB7 plus RESET), and debug via the on-chip JTAG port on PC2-PC5 using low-cost JTAG ICE clones. The 32 GPIO lines and rich peripheral set support progressively complex labs, from LED blinking to dual-UART networking, on a single chip costing roughly $2.23 as of 2026-09-16.

πŸ”¬

Battery-Powered Instrumentation

Portable measurement instruments benefit from the ATMEGA164P-20PU's balance of processing power and sleep current. Between measurements the MCU rests in power-down mode with only the asynchronous timer or external interrupt armed, then wakes on a button press or RTC alarm to run a 10-bit ADC conversion sequence. The 2.7 V low end of the supply range allows operation from two alkaline cells through a boost converter or three cells directly at reduced clock frequency. The JTAG interface permits full in-system debug during instrument development without disturbing the analog front end, and the through-hole package eases one-off repairs of field instruments.

Recommended Products Summary

MAX485 RS-485 transceiver for Modbus on USART0 Used in: Industrial Control Panels ATMEGA164P-20PI Industrial temperature variant for harsh environments Used in: Industrial Control Panels DS3231 RTC with I2C (TWI) for time-stamped logging Used in: Sensor and Data-Logging Nodes AT24C256 I2C EEPROM expansion for large logs Used in: Sensor and Data-Logging Nodes L293D H-bridge motor driver driven by PWM outputs Used in: Motor and LED Control IRF540N Power MOSFET for LED/PWM load switching Used in: Motor and LED Control MAX232 RS-232 level shifter for USART0 Used in: Multi-Channel Serial Communication Gateways SN75176 RS-485 differential bus driver for USART1 Used in: Multi-Channel Serial Communication Gateways ATMEGA16-16PI Microchip Technology Used in: Educational and Hobbyist Embedded Platforms ATMEGA324P-20PU Pin-compatible upgrade path for larger projects Used in: Educational and Hobbyist Embedded Platforms MCP1702 Low-Iq LDO regulator for battery rail Used in: Battery-Powered Instrumentation DS18B20 Digital temperature sensor for measurement front end Used in: Battery-Powered Instrumentation
What are the key specifications of ATMEGA164P-20PU?
The ATMEGA164P-20PU is an 8-bit AVR RISC microcontroller with 16 KB ISP FLASH, 512 B EEPROM, and 1 KB SRAM. It runs at up to 20 MHz (approximately 20 MIPS), operates from 2.7 V to 5.5 V, and integrates 32 GPIO lines, an 8-channel 10-bit ADC, two USARTs, TWI, SPI, three timers with PWM, and JTAG. It is packaged in a 40-pin PDIP through-hole package. These figures are per the Microchip ATmega164P product page and the Microchip ATmega164A/164PA/324/324A/644/644P family datasheet.
What is the difference between ATMEGA164P and ATMEGA164PA?
The ATMEGA164PA is a newer die revision of the ATMEGA164P with the same 16 KB FLASH, 20 MHz speed, memory set, and pinout. Microchip distributor data explicitly lists ATMEGA164PA as the newer device replacing ATMEGA164P. The PA revision is a die shrink with improved low-power characteristics and extended operating temperature options; code and hardware designs are compatible, so the ATMEGA164PA-PU is the recommended drop-in choice for new designs.
What is the best drop-in replacement for ATMEGA164P-20PU?
The best drop-in replacement is the ATMEGA164PA-PU: identical 40-pin PDIP footprint, same 16 KB/512 B/1 KB memory set, 20 MHz rating, and identical peripheral set, with a newer die revision. For larger memory in the same footprint, the ATmega324P-20PU (32 KB FLASH) and ATmega644P-20PU (64 KB FLASH) are pin-compatible per Microchip application note AVR505, requiring only recompilation and larger flash considerations.
Can ATMEGA324P-20PU replace ATMEGA164P-20PU?
Yes. According to Microchip application note AVR505 (doc8001), the ATmega164P/324P/644P family members are pin-compatible with each other in the same package. The ATmega324P-20PU doubles FLASH to 32 KB and SRAM to 2 KB while keeping the same DIP-40 footprint, USART count, ADC, and JTAG. Firmware must be recompiled, and fuse/settings reviewed, but no PCB change is required.
Where to download ATMEGA164P-20PU datasheet PDF?
The official datasheet is available from the Microchip product page at microchip.com/en-us/product/ATmega164P, which links the family datasheet PDF covering the ATmega164A/164PA/324A/644A/644P devices. Distributors such as DigiKey, Mouser, LCSC, and Octopart also mirror the PDF on their product pages. Avoid third-party datasheet aggregators when possible; the Microchip site always carries the latest revision.
What is the price of ATMEGA164P-20PU?
As of 2026-09-16, ATMEGA164P-20PU is listed at LCSC from approximately $2.23 per unit in single-piece quantity (reference LCSC part C220588). Volume pricing typically steps down into the $1.50-$1.90 range at 100-1000 pieces depending on distributor. Prices fluctuate with stock conditions; check DigiKey, Mouser, and LCSC for real-time quotes before ordering.
Where can I buy ATMEGA164P-20PU online?
ATMEGA164P-20PU can be purchased online from major authorized distributors including DigiKey (product 1245835), Mouser, and LCSC (part C220588), as well as from secondary sources such as Win Source, Avaq, and Rochester Electronics via the DigiKey Marketplace. For production programs, Microchipdirect offers direct ordering with real-time inventory and volume pricing.
Is ATMEGA164P-20PU in stock and what is the lead time?
Stock status varies by distributor: DigiKey and LCSC have historically listed the ATMEGA164P-20PU as an in-stock, ships-today item, while Mouser and Octopart aggregate availability from one or more distributors. As of the 2026-09-16 data pull, distributor listings show stock at LCSC and DigiKey. Lead time for out-of-stock conditions at Microchipdirect is typically [DATA_NEEDED: current lead time], so confirm on the distributor site at order time.
ATMEGA164P-20PU vs ATMEGA644P-20PU - which should I choose?
Choose the ATMEGA164P-20PU when 16 KB FLASH, 512 B EEPROM, and 1 KB SRAM suffice - it is lower cost. Choose the ATMEGA644P-20PU when you need 64 KB FLASH and 4 KB SRAM for larger firmware, more lookup tables, or bigger buffers. Both share the DIP-40 footprint and pinout per Microchip AVR505, so migrating later requires no PCB redesign, only recompilation and possible crystal/fuse review.
When should I choose ATMEGA164P over ATmega32A?
Choose the ATMEGA164P-20PU over the ATmega32A when you need two USARTs, picoPower low-sleep-current technology, and 1 KB SRAM in the same DIP-40 footprint - the ATmega32A has only one USART and 2 KB SRAM but older core power figures. Microchip application note AVR505 documents migration between these families. For purely legacy ATmega32 socket replacement, ATmega32 remains valid, but new designs benefit from the ATmega164P's modern low-power die.
What is the operating voltage of ATMEGA164P-20PU?
The ATMEGA164P-20PU operates from 2.7 V to 5.5 V. According to AVR speed-grade data, the full 20 MHz rating applies near 4.5-5.5 V; operation at 2.7 V requires reducing clock frequency per the frequency-versus-voltage safe operating area in the family datasheet. Above the 5.5 V absolute limit the device may be damaged, so a regulated 5 V rail with adequate decoupling is recommended.
How much program memory and RAM does ATMEGA164P-20PU have?
The ATMEGA164P-20PU contains 16 KB of self-programmable ISP FLASH with read-while-write support, 512 B of EEPROM for non-volatile parameter storage, and 1 KB of internal SRAM for variables and the stack. For perspective, 16 KB of AVR FLASH typically holds 8K-16K assembled instructions, sufficient for moderate control firmware including two-USART communication stacks and a 10-bit ADC processing loop.
What peripherals does the ATMEGA164P-20PU include?
The ATMEGA164P-20PU integrates two USARTs, a byte-oriented Two-Wire Interface (TWI, I2C-compatible), a master/slave SPI interface, an 8-channel 10-bit ADC with internal reference options, three timer/counters (two 8-bit, one 16-bit) with compare modes and PWM, a real-time counter with separate oscillator, analog comparator, and JTAG for on-chip debug and boundary scan. This peripheral set supports multi-channel serial communication and mixed-signal sensing in a single DIP-40 device.
Hey Google, what can replace ATMEGA164P-20PU?
Pin-compatible replacements for the ATMEGA164P-20PU in the 40-pin PDIP package include, in order of preference: ATMEGA164PA-PU (same device, newer die), ATMEGA324P-20PU (32 KB FLASH), ATMEGA644P-20PU (64 KB FLASH), and legacy ATmega16/ATmega32 parts, all documented as pin-compatible in Microchip application note AVR505. All are Microchip AVR devices requiring only firmware recompilation, and the smaller-memory reverse migrations (164P into 16/32 sockets) are covered by AVR083/AVR084 notes.
What is the cross-brand equivalent for ATMEGA164P-20PU?
There is no verified pin-to-pin cross-brand equivalent from Microchip's AVR ecosystem: the DIP-40 pinout, JTAG placement, and AVR ISP protocol are proprietary to the ATmega164P/324P/644P family. Microchip's own cross-reference tools and DigiKey's cross-reference tool return only same-brand ATmega family substitutes. Designs requiring a non-AVR MCU should use a different PCB footprint (for example a Microchip PIC or ST STM8 in TQFP-44) rather than expecting a drop-in swap.
Where can I find the ATMEGA164P-20PU pinout?
The complete 40-pin PDIP pinout is in the Microchip family datasheet summary section. In short: pins 1-8 are PB0-PB7 (including SPI: PB4 SS, PB5 MOSI, PB6 MISO, PB7 SCK), pin 9 is RESET, pin 10 VCC, pin 11 GND, pins 12-13 XTAL2/XTAL1, pins 14-21 are PD0-PD7 (USART0 on PD0/PD1, USART1 on PD2/PD3), pins 22-29 are PC0-PC7 (TWI on PC0/PC1, JTAG on PC2-PC5), pin 30 AVCC, pin 31 GND, pin 32 AREF, and pins 33-40 are PA0-PA7 (ADC0-ADC7).

Engineering reference data for ATMEGA164P-20PU β€” comparison, design guidance, and compliance information.

Selection Guide

Choose the ATMEGA164P-20PU when you need a through-hole, 5 V-capable 8-bit MCU with two hardware USARTs, TWI, SPI, an 8-channel 10-bit ADC, and 16 KB FLASH at approximately $2.23 (as of 2026-09-16). Choose the ATMEGA164PA-PU instead for all new designs - it is the same pinout and feature set with a newer die revision explicitly positioned by Microchip as the successor. Choose ATMEGA324P-20PU when firmware approaches the 16 KB ceiling or SRAM-hungry buffers exceed 1 KB; it doubles both memories on the identical footprint. Choose ATMEGA644P-20PU for code bases needing up to 64 KB FLASH. Avoid the legacy ATMEGA16-16PI unless you are repairing an existing ATmega16 socket, since it drops to one USART, 16 MHz, and lacks picoPower. There is no verified cross-brand drop-in equivalent; any non-AVR substitution requires a PCB redesign.

Comparison with Alternatives

Parameter This Product ATMEGA164PA-PU ATMEGA324P-20PU ATMEGA644P-20PU ATMEGA16-16PI
Package DIP-40 (40-PDIP) DIP-40 - same DIP-40 - same DIP-40 - same DIP-40 - same
Brand Microchip Technology Microchip Technology Microchip Technology Microchip Technology Microchip Technology
Flash Memory 16 KB 16 KB 32 KB 64 KB 16 KB
SRAM 1 KB 1 KB 2 KB 4 KB 1 KB
Max Clock Frequency 20 MHz 20 MHz 20 MHz 20 MHz 16 MHz
USART Count 2 2 2 2 1
Technology picoPower picoPower (newer die) picoPower picoPower Legacy (non-picoPower)
EEPROM 512 B 512 B 1 KB 2 KB 512 B
Lifecycle Status Active (newer ATMEGA164PA available) Active (recommended for new designs) Active Active Active / legacy

Key Differentiators

  • Two independent USARTs in a DIP-40 footprint (vs ATMEGA16-16PI)
  • picoPower low-power die (vs ATMEGA16-16PI)
  • Lowest-cost family entry point (vs ATMEGA324P-20PU)

Design Notes

Respect the AVR speed-versus-voltage safe operating area: the 20 MHz speed grade is guaranteed only near the top of the 2.7 V to 5.5 V range (approximately 4.5 V and above per family datasheet curves). Running at 20 MHz on a 3.3 V rail is out of specification and may cause intermittent failures. Derate clock frequency linearly for lower VCC, or regulate to 5 V for full-speed designs. Estimated: at 5 V and 20 mA average I/O plus core load, power dissipation is roughly 100 mW - negligible thermally in DIP-40.

Place 100 nF ceramic decoupling capacitors directly across VCC/GND (pins 10/11) and AVCC/GND (pins 30/31), keeping AVCC within 0.3 V of VCC at all times - even if the ADC is unused, AVCC must be tied to VCC through a low-pass filter (10 nH ferrite plus 100 nF) for guaranteed port-A operation. Tie AREF to AVCC via a 100 nF capacitor when using the internal reference, and never drive AREF externally while the internal reference is enabled, as this can short the reference amplifier.

Enable JTAG fuse disabling if PC2-PC5 are needed as GPIO - JTAG is enabled by default and holds those four port-C pins in JTAG mode. Also configure the clock-source fuses carefully: selecting an external crystal fuse setting with no crystal fitted can brick the device into an unprogrammable state; recovery requires a controlled-clock ISP rescue. When migrating from ATmega16/32, use Microchip application note AVR505 since register names and fuse maps differ between families despite pin compatibility.

For ISP and JTAG lines keep PB5-PB7 and PC2-PC5 traces short and away from motor/PWM switch nodes; the SPI clock edge rates on a 20 MHz AVR are fast enough to pick up coupling on long breadboard wires. Series 22-100 ohm resistors on XTAL1 and long RESET lines improve noise immunity. For the 32.768 kHz RTC crystal on PC6/PC7, follow the datasheet load-capacitor recommendation and physically isolate the crystal from high-swing digital lines to avoid startup failures.

Compliance Information

RoHS
Unknown
REACH
Unknown
AEC-Q100
Not Applicable
Lead Free
Unknown
Halogen Free
Unknown
Conflict Minerals
Unknown

Compliance status was not stated in the verified web data; modern Microchip ATmega devices are typically RoHS-compliant, but confirm on the Microchip product page before export documentation.

Data verified on: 2026-09-16 β€” data verified and curated by XAIPART's component engineering team

Related Searches

ATMEGA164P-20PU ATMEGA164P-20PU datasheet PDF Microchip ATMEGA164P-20PU price ATMEGA164P-20PU pinout DIP-40 ATMEGA164P-20PU vs ATMEGA324P-20PU ATMEGA164P drop-in replacement ATMEGA164PA vs ATMEGA164P difference 8-bit AVR microcontroller 16KB flash 20MHz DIP-40 ATMEGA164P-20PU buy in stock ATmega164P dual USART industrial control what can replace ATMEGA164P-20PU ATMEGA164P-20PU cross reference equivalent

Related Components & Terms

Microchip Technology ATMEGA164P-20PU ATMEGA164PA-PU ATMEGA324P-20PU ATMEGA644P-20PU ATmega16 AVR 8-bit RISC microcontroller picoPower embedded processor microcontroller unit (MCU) DIP-40 40-PDIP through-hole package JTAG TWI (I2C) SPI USART 10-bit ADC AVR505 application note RoHS 20 MIPS battery-powered sensor node industrial control
Quick Quote RFQ
Fill in complete details β€” our sales team will respond within 24 hours
Part Number Manufacturer Package QTY Target Price Extended
Total: $0.00 USD
βœ“
Quote submitted!

We will respond to your email within 24 hours

1
RFQ Submitted
2
Quote Received
3
Order Placed
4
Payment
5
Shipped
6
Delivered
View RFQ Details