ATMEGA164A-PU - 8-bit AVR MCU 16KB Flash 20MHz | Microchip
MPN: ATMEGA164A-PU β Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $4.26 | $4.26 |
| 10 | $3.98 | $39.80 |
| 100 | $3.65 | $365.00 |
| 500 | $3.4 | $1,700.00 |
| 1,000 | $3.15 | $3,150.00 |
ATMEGA164A-PU Overview
An 8-bit microcontroller is an integrated circuit that combines a processor core, memory, and peripherals such as timers, UARTs, and ADCs on a single chip, forming the highest-volume tier of the embedded systems hierarchy (MCU -> embedded processor -> semiconductor). The AVR architecture executes most of its powerful instruction set in a single clock cycle, achieving throughput near one MIPS per MHz, so designers can trade clock speed directly against power consumption.
Key features of the ATMEGA164A include 32 general purpose I/O lines, 32 general purpose working registers, two USARTs, SPI and two-wire (I2C) interfaces, an 8-channel 10-bit ADC, a real-time counter, three flexible timers with compare modes and PWM, and internal calibrated oscillator. It operates from 2.5 V to 5.5 V with operating grades for industrial (-40C to +85C) temperature ranges.
Technically, the device is built on AVR enhanced RISC architecture with single-cycle execution, read-while-write Flash for self-programming, and multiple sleep modes plus power-down/power-save operation for battery designs. DebugWIRE on-chip debugging is supported through the RESET pin with a single-wire interface.
Typical applications include industrial control and automation, instrumentation, and hobby/prototyping projects where the through-hole PDIP package simplifies hand soldering, socketing, and breadboarding.
Design consideration: for maximum reliability, decouple VCC and AVCC separately and use the external crystal option when you need UART timing accuracy beyond the internal oscillator tolerance.
This page synthesizes distributor pricing, drop-in alternatives within the ATmega164A/324A/644A/1284 family, and practical design notes not found in the manufacturer datasheet.
Drop-in alternatives for ATMEGA164A-PU β 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 ATMEGA164A-PU (same form factor and footprint) β differing in Package, EEPROM, Serial Interfaces, Core Architecture, Mounting Type.
Quick Comparison Tool β Select alternative parts for side-by-side comparison:
ATMEGA164PA-PU
β Drop-Inπ Reference alternative (not in catalog)
ATMEGA324A-PU
β Drop-Inπ Reference alternative (not in catalog)
ATMEGA644A-PU
β Drop-Inπ Reference alternative (not in catalog)
ATMEGA1284P-PU
β Drop-Inβ In Stock
$6.05 / Unit
View Datasheet βATMEGA16-16PI
β Drop-In β οΈ εζ°εΎ ιͺθ―β In Stock
$3.72 / Unit
View Datasheet βATMEGA32A-PU
β Drop-In β οΈ εζ°εΎ ιͺθ―π Reference alternative (not in catalog)
ATMEGA164A-PU Maximum Ratings & Electrical Characteristics
| Core Architecture | AVR 8-bit RISC |
| Flash Memory | 16 KB (8K x 16) In-System Programmable |
| SRAM | 1 KB |
| EEPROM | 512 bytes |
| Maximum Clock Frequency | 20 MHz |
| Supply Voltage Range | 2.5 V to 5.5 V |
| General Purpose I/O | 32 lines |
| Working Registers | 32 x 8-bit |
| Timers/Counters | 2 x 8-bit, 1 x 16-bit |
| USART Interfaces | 2 |
| ADC | 8-channel 10-bit |
| Serial Interfaces | USART x2, SPI, TWI (I2C) |
| Package | 40-PDIP (0.600 in, 15.24 mm) |
| Mounting Type | Through-Hole |
| On-Chip Debug | DebugWIRE (single-wire via RESET) |
| Sleep Modes | Multiple including Power-down and Power-save |
| RoHS Status | Compliant |
ATMEGA164A-PU Pin Configuration
| 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 |
| Pin 3 | PB2/AIN0/INT2 β Port B bit 2 / Analog comparator input 0 / External interrupt 2 |
| Pin 4 | PB3/AIN1/OC0 β Port B bit 3 / Analog comparator input 1 / Timer0 output compare |
| 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/OC0A/OC1C β Port B bit 7 / SPI clock / Timer output compare PWM |
| Pin 9 | RESET β Reset input; also DebugWIRE interface |
| Pin 10 | VCC β Digital supply voltage (2.5 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 |
| Pin 15 | PD1/TXD0 β Port D bit 1 / USART0 transmit |
| Pin 16 | PD2/INT0/RXD1 β Port D bit 2 / External interrupt 0 / USART1 receive |
| Pin 17 | PD3/INT1/TXD1 β Port D bit 3 / External interrupt 1 / USART1 transmit |
| Pin 18 | PD4/XCK1/OC1B β Port D bit 4 / USART1 external clock / Timer1 output compare B |
| Pin 19 | PD5/OC1A β Port D bit 5 / Timer1 output compare A (PWM) |
| Pin 20 | PD6/ICP1 β Port D bit 6 / Timer1 input capture |
| Pin 21 | PD7/OC2A β Port D bit 7 / Timer2 output compare A (PWM) |
| Pin 22 | PC0/SCL β Port C bit 0 / TWI clock |
| Pin 23 | PC1/SDA β Port C bit 1 / TWI 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 RTC crystal) |
| Pin 29 | PC7/TOSC2 β Port C bit 7 / Timer oscillator output |
| Pin 30 | AVCC β Analog supply for ADC (connect to VCC through low-pass filter) |
| Pin 31 | GND β Ground (analog ground reference) |
| 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
ATMEGA164A-PU is suitable for 6 applications: Industrial Control and Automation, Instrumentation and Measurement, Hobby, Education and Prototyping, Embedded Communication Nodes, Motor Control and PWM Actuation, Consumer Appliance Control.
Industrial Control and Automation
The ATMEGA164A-PU fits industrial control nodes because it combines a 20 MHz AVR core with dual USARTs for RS-485/Modbus links, SPI and TWI for module expansion, and a 10-bit ADC for sensor feedback - all with the industrial -40C to +85C temperature grade. In a PLC-style remote I/O board, the 32 GPIO lines directly drive relays and optocoupled inputs, while the three timers generate PWM for actuators. Running from a 5 V industrial rail (2.5-5.5 V supply range) removes the need for a separate regulator stage. The through-hole 40-PDIP package also allows socketed replacement in the field, reducing maintenance downtime in retrofit installations where soldered SMD MCUs complicate repairs.
Recommended
Instrumentation and Measurement
For benchtop meters, data loggers, and sensor conditioning units, the ATMEGA164A-PU offers an 8-channel 10-bit ADC on Port A with an internal reference and AREF pin (pin 32) for external precision references, enabling multi-sensor scanning at moderate sample rates. The 16 KB Flash accommodates averaging, calibration, and linearization firmware, while 1 KB SRAM buffers sample arrays before transmission over one of the two USARTs. AVCC (pin 30) can be filtered separately from the digital rail to reduce ADC noise coupling, a common technique in the family datasheet's ADC application notes. The PDIP package eases prototyping on breadboards during instrument bring-up, and the TWI interface connects displays and EEPROM calibration stores.
Recommended
Hobby, Education and Prototyping
The 40-PDIP through-hole package is the defining advantage for hobbyists, students, and repair technicians: the ATMEGA164A-PU can be inserted into a ZIF socket, hand-soldered with a basic iron, and breadboarded without adapters. Community toolchains support it directly - the MCUdude MightyCore Arduino package covers the ATmega164, giving Arduino IDE compilation and ISP bootloading. Single-unit pricing around $4.26 (as of 2026-09-16) keeps experimentation affordable, and the 2.5-5.5 V supply range tolerates simple USB or battery supplies. Educational kits favor this part because the DIP-40 footprint makes pin mapping physically visible: Port A pins 33-40, Port B pins 1-8, aiding classroom instruction on MCU architecture.
Recommended
Embedded Communication Nodes
With two independent USARTs, the ATMEGA164A-PU bridges protocols natively - one port to a host or RS-232 debug console and the other to an RS-485 field bus through an external transceiver. The 20 MHz core provides roughly 20 MIPS (about 1 MIPS per MHz per the family datasheet), sufficient for software UART framing checks and CRC computation. TWI (I2C) handles RTC and EEPROM peripherals, while SPI drives Ethernet controllers or RF modules. Interrupt-driven receive buffers make efficient use of the 1 KB SRAM. Power-save sleep modes allow battery-backed gateways to wake on USART or timer events, and the picoPower ATMEGA164PA-PU variant drops in when ultra-low standby current is a requirement.
Recommended
Motor Control and PWM Actuation
The ATMEGA164A-PU's three timers - two 8-bit and one 16-bit - provide multiple PWM channels with compare modes suited to DC motor speed control, servo positioning, and LED dimming. The 16-bit timer supports input capture for RPM measurement from hall or encoder signals, closing the control loop with the 10-bit ADC reading current or position feedback. At 20 MHz, PWM resolution of 8 bits runs at 78 kHz, inaudible in motor applications. Dead-time control for half-bridge drivers is implemented in firmware using complementary compare outputs. The 32 GPIO lines interface directly to gate-driver logic, and the -40C to +85C grade suits motor-mounted enclosures exposed to elevated ambient temperatures.
Recommended
Consumer Appliance Control
In appliance boards - coffee machines, heaters, small pumps - the ATMEGA164A-PU delivers adequate compute (20 MHz AVR, ~20 MIPS), plenty of GPIO for buttons, LEDs, and relays, and a 10-bit ADC for NTC temperature sensing. The internal calibrated oscillator removes the crystal and its cost in non-critical timing applications, while read-while-write Flash supports in-field firmware updates through self-programming. Power-down sleep current keeps standby consumption low for always-plugged products, and the 2.5-5.5 V supply range accommodates capacitor-dropper or linear supplies common in appliance designs. The PDIP package also suits low-volume regional assembly lines without reflow equipment, and 512 B EEPROM retains user settings across power cycles.
Recommended
Recommended Products Summary
Engineering reference data for ATMEGA164A-PU β comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | ATMEGA164PA-PU | ATMEGA324A-PU | ATMEGA644A-PU | ATMEGA1284P-PU | ATMEGA16-16PI |
|---|---|---|---|---|---|---|
| Package | 40-PDIP (0.600 in) | 40-PDIP (0.600 in) - same | 40-PDIP (0.600 in) - same | 40-PDIP (0.600 in) - same | 40-PDIP (0.600 in) - same | 40-PDIP (0.600 in) - same |
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Flash Memory | 16 KB | 16 KB | 32 KB | 64 KB | 128 KB | 16 KB |
| SRAM | 1 KB | 1 KB | 2 KB | 4 KB | 16 KB | 1 KB |
| EEPROM | 512 bytes | 512 bytes | 1 KB | 2 KB | 4 KB | 512 bytes |
| Maximum Clock Frequency | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 16 MHz |
| Supply Voltage Range | 2.5 V to 5.5 V | 1.8 V to 5.5 V | 2.5 V to 5.5 V | 2.5 V to 5.5 V | 1.8 V to 5.5 V | 4.5 V to 5.5 V |
| Power Technology | Standard AVR (ATmega164A) | picoPower (lower sleep current) | Standard | Standard | picoPower | Legacy |
| Lifecycle Status | Active | Obsolete/replacement suggested (per DigiKey forum, Nov 2024) | Active | Active | Active | Active (legacy family) |
Key Differentiators
- Currently active production vs obsolete picoPower sibling (vs ATMEGA164PA-PU)
- 20 MHz maximum clock (vs ATMEGA16-16PI)
- Cost-optimized memory tier in a pin-compatible family ladder (vs ATMEGA324A-PU)
Design Notes
Decouple VCC (pin 10) and AVCC (pin 30) independently: place a 100 nF ceramic within 5 mm of each pin plus a 10 uF bulk capacitor per rail. The family datasheet recommends connecting AVCC to VCC through a low-pass filter (e.g., 10 uH inductor or 100-ohm resistor with 100 nF) when ADC accuracy matters, since digital switching noise on AVCC directly degrades the 10-bit converter's effective resolution. Keep the 5.5 V absolute maximum in mind for unregulated supplies.
For crystal reliability, mount the resonator between XTAL1 (pin 13) and XTAL2 (pin 12) within 10 mm of the device and keep crystal load capacitors' ground return short and direct to GND (pin 11). If using the 32.768 kHz RTC crystal on TOSC1/TOSC2 (pins 28-29), guard these traces from fast digital edges - the timer oscillator is sensitive to coupling. When the internal calibrated RC oscillator suffices, both crystal pins can be repurposed, freeing board area in PDIP-based designs.
Do not exceed the speed-versus-voltage curve: at 3.3 V, running 20 MHz is outside the safe operating envelope per the family datasheet; scale the clock down (approximately 13 MHz at 3.3 V). When substituting ATMEGA164PA for ATMEGA164A on existing boards, verify fuse settings - extended fuse defaults differ between revisions and can disable DebugWIRE or misconfigure brown-out detection. ISP programming requires the SPI pins (5-8) free of heavy loads; series resistors of 1-10 kohm protect shared peripherals during programming.
Compliance Information
RoHS compliant per DigiKey product listing. REACH, halogen-free, and conflict-minerals status not stated in provided data.