ATMEGA164P-20PQ - 16KB AVR MCU 20MHz PDIP-40 | Microchip
Артикул: ATMEGA164P-20PQ ✓ Активен| Кол-во | Цена за ед. | Итого |
|---|---|---|
| 1 | $4.32 | $4,32 |
| 10 | $3.89 | $38,90 |
| 100 | $3.45 | $345,00 |
| 500 | $3.1 | $1.550,00 |
| 1.000 | $2.81 | $2.810,00 |
ATMEGA164P-20PQ Обзор
A microcontroller (MCU) is a single-chip computer that integrates a processor core, memory, and programmable peripherals on one die. The ATmega164P belongs to the AVR family of 8-bit MCUs, positioned within the broader hierarchy of embedded processors used in countless electronic products. AVR cores execute most of their 131 powerful instructions in a single clock cycle, delivering up to 20 MIPS throughput at 20 MHz.
Key features include 16 KB of in-system self-programmable flash with read-while-write support, 32 general purpose I/O lines, 32 general purpose working registers, a real-time counter, three flexible timer/counters with compare modes and PWM, and two USARTs for dual serial communication channels. The picoPower technology platform enables low-power design with multiple sleep modes.
Technical depth: the enhanced AVR RISC architecture couples a fully static core with byte-oriented Two-Wire Interface (TWI/I2C), SPI, an 8-channel 10-bit ADC, and a programmable watchdog timer with on-chip oscillator. In-system programming via SPI removes the need for external programming voltage, and bootloader flash sections support field firmware updates over UART.
Typical applications include industrial control panels, sensor and data-logging systems, hobby and education platforms (the DIP package is breadboard-friendly), and small appliances requiring two independent UART channels for RS-485 plus debug connectivity.
Design consideration: run the ATMEGA164P-20PQ at 4.5 V to 5.5 V; the P suffix denotes picoPower, so configure brown-out detection and sleep modes properly to realize the datasheet power figures. The extended-temperature PQ grade suits -40C environments.
This page synthesizes distributor pricing, drop-in alternatives, pinout data, and practical design notes not found in the manufacturer datasheet.
Аналоги без доработки для ATMEGA164P-20PQ — тот же корпус, pin-to-pin совместимость. Компоненты в других корпусах, требующие переработки PCB, исключены.
Варианты в этой серии
Модели той же серии, совместимые без доработки с ATMEGA164P-20PQ (тот же форм-фактор и посадочное место) — отличается по Package, Maximum Clock Frequency, Timers/Counters, Mounting Type, Core Architecture.
Инструмент быстрого сравнения — выберите альтернативные компоненты для сравнения бок о бок:
ATMEGA164P-20PI
✅ Прямая замена ⚠️ Характеристики не проверены📋 Справочный аналог (нет в каталоге)
ATMEGA164P-20PN
✅ Прямая замена📋 Справочный аналог (нет в каталоге)
ATMEGA164PA-PU
✅ Прямая замена📋 Справочный аналог (нет в каталоге)
ATMEGA162-16PI
✅ Прямая замена✓ В наличии
$3.55 / шт.
Открыть даташит →ATMEGA162V-1PC
✅ Прямая замена✓ В наличии
$3.4 / шт.
Открыть даташит →ATMEGA16-16PI
✅ Прямая замена✓ В наличии
$3.72 / шт.
Открыть даташит →ATMEGA164P-20PQ Максимальные параметры и электрические характеристики
| Core Architecture | 8-bit AVR RISC |
| Flash Memory | 16 KB (8K x 16) ISP |
| EEPROM | 512 B |
| SRAM | 1 KB |
| Максимальная тактовая частота | 20 MHz |
| MIPS Throughput | Up to 20 MIPS at 20 MHz |
| Напряжение питания | 4.5 V to 5.5 V |
| General Purpose I/O | 32 lines |
| Timers/Counters | 3 flexible timer/counters with compare modes and PWM |
| USART Channels | 2 |
| ADC | 8-channel, 10-bit |
| Serial Interfaces | 2x USART, SPI, TWI (I2C) |
| Корпус | 40-PDIP (0.600 in, 15.24 mm) |
| Тип монтажа | Through Hole |
| Special Features | picoPower, read-while-write flash, real-time counter, watchdog timer, internal oscillator |
| Статус RoHS | Green (per FindIC listing) |
Конфигурация выводов ATMEGA164P-20PQ
| Контакт 1 | PB0 (XCK0/T0) — Port B bit 0 / USART0 external clock / Timer0 external clock |
| Контакт 2 | PB1 (T1) — Port B bit 1 / Timer1 external clock |
| Контакт 3 | PB2 (AIN0/INT2) — Port B bit 2 / analog comparator positive input / external interrupt 2 |
| Контакт 4 | PB3 (AIN1/OC0) — Port B bit 3 / analog comparator negative input / Timer0 output compare |
| Контакт 5 | PB4 (SS) — Port B bit 4 / SPI slave select |
| Контакт 6 | PB5 (MOSI) — Port B bit 5 / SPI master output |
| Контакт 7 | PB6 (MISO) — Port B bit 6 / SPI master input |
| Контакт 8 | PB7 (SCK/OC2) — Port B bit 7 / SPI clock / Timer2 output compare |
| Контакт 9 | RESET — Reset input, active low |
| Контакт 10 | VCC — Digital supply voltage (4.5 V to 5.5 V) |
| Контакт 11 | GND — Ground |
| Контакт 12 | XTAL2 — Inverting oscillator amplifier output |
| Контакт 13 | XTAL1 — Inverting oscillator amplifier input / external clock input |
| Контакт 14 | PD0 (RXD0) — Port D bit 0 / USART0 receive |
| Контакт 15 | PD1 (TXD0) — Port D bit 1 / USART0 transmit |
| Контакт 16 | PD2 (RXD1/INT0) — Port D bit 2 / USART1 receive / external interrupt 0 |
| Контакт 17 | PD3 (TXD1/INT1) — Port D bit 3 / USART1 transmit / external interrupt 1 |
| Контакт 18 | PD4 (XCK1/OC1B) — Port D bit 4 / USART1 external clock / Timer1 output compare B |
| Контакт 19 | PD5 (XCK1/OC1A) — Port D bit 5 / USART1 external clock / Timer1 output compare A |
| Контакт 20 | PD6 (ICP1) — Port D bit 6 / Timer1 input capture |
| Контакт 21 | PD7 (OC2A) — Port D bit 7 / Timer2 output compare A |
| Контакт 22 | PC0 (SCL) — Port C bit 0 / TWI clock |
| Контакт 23 | PC1 (SDA) — Port C bit 1 / TWI data |
| Контакт 24 | PC2 (TCK) — Port C bit 2 / JTAG test clock |
| Контакт 25 | PC3 (TMS) — Port C bit 3 / JTAG test mode select |
| Контакт 26 | PC4 (TDO) — Port C bit 4 / JTAG test data output |
| Контакт 27 | PC5 (TDI) — Port C bit 5 / JTAG test data input |
| Контакт 28 | PC6 (TOSC1) — Port C bit 6 / Timer oscillator input (32.768 kHz) |
| Контакт 29 | PC7 (TOSC2) — Port C bit 7 / Timer oscillator output (32.768 kHz) |
| Контакт 30 | AVCC — ADC and port A supply voltage |
| Контакт 31 | GND — Ground |
| Контакт 32 | AREF — ADC reference voltage |
| Контакт 33 | PA0 (ADC0) — Port A bit 0 / ADC channel 0 |
| Контакт 34 | PA1 (ADC1) — Port A bit 1 / ADC channel 1 |
| Контакт 35 | PA2 (ADC2) — Port A bit 2 / ADC channel 2 |
| Контакт 36 | PA3 (ADC3) — Port A bit 3 / ADC channel 3 |
| Контакт 37 | PA4 (ADC4) — Port A bit 4 / ADC channel 4 |
| Контакт 38 | PA5 (ADC5) — Port A bit 5 / ADC channel 5 |
| Контакт 39 | PA6 (ADC6) — Port A bit 6 / ADC channel 6 |
| Контакт 40 | PA7 (ADC7) — Port A bit 7 / ADC channel 7 |
Типичное применение
ATMEGA164P-20PQ подходит для 6 применениеs: Industrial Control Panels, Sensor and Data Logging Systems, Education and Hobby Prototyping, Dual-Channel Communication Gateways, Home Appliance and HVAC Control, Motor Control and PWM Actuation.
Industrial Control Panels
The ATMEGA164P-20PQ fits industrial control panel designs because its extended-temperature PQ grade, watchdog timer with independent on-chip oscillator, and 4.5 V to 5.5 V tolerance match typical 5 V panel electronics. Two hardware USARTs allow one channel to drive an RS-485 Modbus network while the second handles a local HMI or debug console, eliminating software UART bit-banging and its timing jitter. Three timer/counters with compare modes and PWM generate relay sequencing, buzzer tones, and backlight dimming directly in hardware. The 16 KB flash with read-while-write stores parameter tables in the remaining 512 B EEPROM across power cycles, and the through-hole PDIP-40 package simplifies field replacement on legacy-style boards.
Рекомендуется
Sensor and Data Logging Systems
The 8-channel 10-bit ADC makes the ATMEGA164P-20PQ a natural fit for multi-sensor data loggers. Eight analog inputs accept thermistors, potentiometers, or 0-5 V transducer outputs directly, with the internal bandgap reference or the AREF pin setting full-scale. The 1 KB SRAM buffers samples between EEPROM write cycles, while the 512 B EEPROM archives calibration constants that survive power loss. PicoPower sleep modes let the MCU idle between acquisition intervals - in power-down mode the core current drops to microamp levels per Microchip picoPower data - extending battery life in remote installations. The dual USART design permits one UART for GPS or sensor modules and the other for a GSM modem, both at hardware-timed baud rates up to the 20 MHz clock limits.
Рекомендуется
Education and Hobby Prototyping
The 0.600-inch 40-PDIP package of the ATMEGA164P-20PQ is breadboard-friendly and socket-mountable, which is why through-hole ATmega parts dominate university embedded-systems labs and hobby platforms. Students can program the chip in-system with a low-cost SPI ISP programmer using only six wires - VCC, GND, RESET, SCK, MOSI, MISO - with no special programming voltage. The 20 MHz clock gives snappy instruction execution for LED matrices, motor control experiments, and LCD projects, while 32 GPIO lines provide ample I/O for multi-peripheral lab exercises. The internal RC oscillator allows operation with zero external crystal for cost-sensitive coursework, and the extensive AVR documentation base (tutorials, Arduino-compatible cores, and toolchain support in avr-gcc) shortens the learning curve substantially.
Рекомендуется
Dual-Channel Communication Gateways
Designs bridging two serial networks benefit directly from the ATMEGA164P-20PQ's two independent hardware USARTs. A typical gateway translates between an RS-485 field bus on USART0 and an RS-232 service port or radio modem on USART1, with the hardware framing and parity generators offloading the CPU. The 20 MHz clock supports baud rates comfortably above 115200 on both channels simultaneously, and the 16 KB flash leaves room for protocol stacks plus bootloader firmware updated in-field over either UART via the read-while-write flash capability. TWI (I2C) and SPI interfaces add expansion for EEPROMs, RTCs, and displays on the same chip. Brown-out detection and the watchdog timer provide the reset discipline gateways need for unattended operation.
Рекомендуется
Home Appliance and HVAC Control
Appliance and HVAC controllers use the ATMEGA164P-20PQ for its combination of ADC-based temperature sensing, PWM actuator drive, and low standby power. The 8-channel 10-bit ADC reads NTC thermistors on multiple zones, while timer PWM outputs drive triac firing circuits or DC fan speeds without CPU intervention. PicoPower sleep modes cut consumption during thermostat idle periods, and the real-time counter with a 32.768 kHz crystal on the TOSC pins maintains accurate timekeeping while the main core sleeps - useful for scheduled setpoint changes. The 5 V through-hole package suits conventional appliance power supplies and serviceable board designs, and the watchdog timer resets frozen firmware to prevent heating-element faults.
Рекомендуется
Motor Control and PWM Actuation
The three timer/counters of the ATMEGA164P-20PQ provide multiple PWM channels with compare-match interrupts, sufficient for small DC motor speed control, servo positioning, and stepper sequencing. At 20 MHz the 8-bit timers achieve approximately 78 kHz PWM at full resolution, which is above the audible range for fan and pump control. The ADC samples motor current via a shunt for stall detection and closed-loop speed regulation, and the input-capture unit timestamps encoder edges with clock-cycle precision. The watchdog provides fail-safe shutdown if firmware hangs while a motor is energized. Because the PQ grade tolerates elevated enclosure temperatures, it suits sealed gearboxes and pump housings where ventilation is limited.
Рекомендуется
Сводка рекомендуемых товаров
Справочные инженерные данные для ATMEGA164P-20PQ — сравнение, рекомендации по проектированию и информация о соответствии.
Руководство по выбору
Сравнение с аналогами
| Параметр | Этот товар | ATMEGA164P-20PI | ATMEGA164PA-PU | ATMEGA162-16PI | ATMEGA16-16PI |
|---|---|---|---|---|---|
| Package | 40-PDIP (0.600 in, 15.24 mm) | 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 |
| Max Clock Frequency | 20 MHz | 20 MHz | 20 MHz | 16 MHz | 16 MHz |
| Flash Memory | 16 KB | 16 KB | 16 KB | 16 KB | 16 KB |
| SRAM | 1 KB | 1 KB | 1 KB | 1 KB | 1 KB |
| ADC | 8-channel 10-bit | 8-channel 10-bit | 8-channel 10-bit | None | 8-channel 10-bit |
| USART Channels | 2 | 2 | 2 | 2 | 1 |
| Temperature Grade | Extended (PQ) / 5 V green | Industrial (I) | Industrial (U) | Industrial (I) | Industrial (I) |
| picoPower Technology | Yes | Yes | Yes | No | No |
| Lifecycle Recommendation | Active; newer PA device available | Active; newer PA device available | Active (recommended successor) | Legacy ATmega162 family | Legacy ATmega16 family |
Ключевые отличия
- 20 MHz clock headroom over legacy ATmega16 (против ATMEGA16-16PI)
- Integrated 10-bit ADC absent in ATMEGA162 (против ATMEGA162-16PI)
- Extended temperature grade for harsher enclosures (против ATMEGA164P-20PI)
- Trade-off: newer PA die offers lower power (против ATMEGA164PA-PU)
Заметки по проектированию
Decouple VCC (pin 10) and AVCC (pin 30) with 0.1 uF ceramic capacitors placed within a few millimeters of each pin, and tie AVCC to VCC through a low-pass LC filter (e.g., 10 uH plus 0.1 uF) when ADC accuracy matters. Keep AREF (pin 32) decoupled with 0.1 uF to GND; never connect an external reference without a series resistor if the internal reference may also be selected. Estimated: at 5 V and 20 MHz, active current is on the order of 10-15 mA per typical AVR figures - budget regulator headroom accordingly.
The JTAG interface on PC2-PC5 is enabled by default in factory-fresh parts, so port C bits 2-5 will not function as GPIO until the JTAGEN fuse is cleared - a classic source of 'my LEDs do not work' bugs on ATmega164/324/644/1284 boards. Also confirm the CKDIV8 and CKOUT fuse states, and disable the debugWIRE/none-applicable interfaces per the fuse table. When substituting ATMEGA162 or ATMEGA16 parts, note their fuse maps and peripheral sets differ - re-run signature and fuse configuration in your programmer.
Use a crystal with two 12-22 pF load capacitors on XTAL1/XTAL2 (pins 13/12), routing the crystal and caps close to the DIP socket with short traces and a guard ground. For the real-time counter, connect a 32.768 kHz watch crystal between TOSC1/TOSC2 (pins 28/29) with appropriate 12.5 pF load caps. Keep RS-485/USART traces away from the oscillator net, and provide a solid ground plane on multilayer boards or a gridded ground on 2-layer through-hole designs.
The PDIP-40 package in a 5 V, 20 MHz application dissipates only tens of milliwatts (Estimated: ~50-75 mW at 10-15 mA active current), so no heatsink or thermal copper is required in ambient environments up to the extended temperature rating. Avoid continuous operation near maximum VCC with heavy I/O sourcing (40 mA absolute maximum per pin); group high-current loads onto separate drivers rather than driving them directly from multiple GPIO simultaneously.
Информация о соответствии
Distributor data (FindIC) lists ATMEGA164P-20PQ as a GREEN part, indicating Microchip's RoHS/halogen-free flow. Formal REACH and conflict-minerals declarations not found in provided data.