ATMEGA168P-20PU - 8-Bit AVR MCU 20MHz 16KB Flash | Microchip
Référence : ATMEGA168P-20PU ✓ Actif| Qté | Prix unitaire | Total |
|---|---|---|
| 1 | $3.2 | $3,20 |
| 10 | $2.88 | $28,80 |
| 100 | $2.56 | $256,00 |
| 500 | $2.3 | $1 150,00 |
| 1 000 | $2.05 | $2 050,00 |
ATMEGA168P-20PU Présentation
An 8-bit AVR microcontroller is a Harvard-architecture RISC processor that executes most instructions in a single clock cycle. Within the power-management hierarchy, it integrates the CPU, program memory, data memory, timers, communication peripherals, and analog-to-digital converter on a single chip, making it a complete embedded control solution without external components. The ATmega168P family sits between the smaller ATmega48 and the larger ATmega328 in the AVR flash microcontroller lineup.
Key features include 16KB of in-system-programmable flash with read-while-write support, a 10-bit ADC with up to 8 multiplexed channels (TQFP/QFN packages; 6 channels on PDIP), three flexible timer/counters with compare modes, and debugWIRE on-chip debugging. The picoPower technology enables low-power sleep modes for battery-operated designs, and supply voltage spans 2.7V to 5.5V.
Architecturally, the AVR core uses 32 general-purpose working registers directly connected to the ALU, allowing one-cycle execution of most instructions - 133 powerful instructions in total. On-chip peripherals include USART, SPI, and two-wire (I2C-compatible) serial interfaces, plus a watchdog timer, brown-out detection, and power-on reset.
Typical applications include hobbyist and Arduino-compatible boards, industrial sensor nodes, consumer appliance control, and low-power battery products where the through-hole PDIP package simplifies prototyping and rework.
A key design consideration is clock selection: full 20 MHz operation requires 4.5V-5.5V; at 2.7V the maximum safe frequency is lower, so set fuse bits accordingly.
This page synthesizes distributor pricing, pin-compatible drop-in alternatives, and practical design notes not found in the manufacturer datasheet.
Alternatives de remplacement direct pour ATMEGA168P-20PU — même boîtier, compatible broche à broche. Les références à boîtier différent nécessitant une retouche du PCB sont exclues.
Variantes de cette série
Modèles de la même série directement compatibles avec ATMEGA168P-20PU (même facteur de forme et même empreinte) — différant par Working Registers, Package, Instructions, Timers/Counters, EEPROM.
Outil de comparaison rapide — sélectionnez des références alternatives pour une comparaison côte à côte :
ATMEGA168PA-PU
✅ Remplacement direct✓ En stock
$1.86 / unité
Voir la fiche technique →ATMEGA168A-PU
✅ Remplacement direct📋 Alternative de référence (hors catalogue)
ATMEGA168-20PU
✅ Remplacement direct✓ En stock
$3.78 / unité
Voir la fiche technique →ATMEGA328P-PU
✅ Remplacement direct ⚠️ Spécifications non vérifiées✓ En stock
Contactez-nous pour le prix
Voir la fiche technique →ATMEGA8A-PU
✅ Remplacement direct ⚠️ Spécifications non vérifiées✓ En stock
$1.86 / unité
Voir la fiche technique →ATMEGA168P-20PU Valeurs maximales et caractéristiques électriques
| Core Processor | AVR 8-bit RISC |
| Core Size | 8-Bit |
| Fréquence d'horloge maximale | 20 MHz |
| Flash Memory | 16 KB (8K x 16) |
| SRAM | 1 KB |
| EEPROM | 512 B |
| Supply Voltage Range | 2.7 V to 5.5 V |
| Number of I/O | 23 |
| ADC Resolution | 10-bit |
| ADC Channels | 8 (6 on PDIP package) |
| Timers/Counters | 3 (two 8-bit, one 16-bit) |
| Communication Interfaces | USART, SPI, I2C (TWI) |
| Instructions | 133, most single-cycle |
| Température de fonctionnement | -40C to +85C (industrial) |
| Boîtier | 28-PDIP (0.300 inch, 7.62 mm) |
| Type de montage | Through Hole |
| Programmability | ISP (In-System Programmable), debugWIRE |
| Statut RoHS | Compliant (GREEN) |
| Statut du cycle de vie | Active (newer device ATMEGA168PA available) |
Configuration des broches de ATMEGA168P-20PU
| Broche 1 | PC6 (RESET) — Reset input (active low); also PC6 I/O if RSTDISBL fuse programmed |
| Broche 2 | PD0 (RXD) — Port D bit 0; USART receive data |
| Broche 3 | PD1 (TXD) — Port D bit 1; USART transmit data |
| Broche 4 | PD2 (INT0) — Port D bit 2; external interrupt 0 |
| Broche 5 | PD3 (INT1/OC2B) — Port D bit 3; external interrupt 1 / Timer2 PWM output B |
| Broche 6 | PD4 (T0/XCK) — Port D bit 4; Timer0 external clock / USART external clock |
| Broche 7 | VCC — Digital supply voltage (2.7V to 5.5V) |
| Broche 8 | GND — Ground |
| Broche 9 | PB6 (XTAL1/TOSC1) — Port D... Port B bit 6; crystal oscillator input / Timer oscillator |
| Broche 10 | PB7 (XTAL2/TOSC2) — Port B bit 7; crystal oscillator output / Timer oscillator |
| Broche 11 | PD5 (OC0B/T1) — Port D bit 5; Timer0 PWM output B / Timer1 external clock |
| Broche 12 | PD6 (OC0A/AIN0) — Port D bit 6; Timer0 PWM output A / analog comparator positive input |
| Broche 13 | PD7 (AIN1) — Port D bit 7; analog comparator negative input |
| Broche 14 | PB0 (ICP1/CLKO) — Port B bit 0; Timer1 input capture / system clock output |
| Broche 15 | PB1 (OC1A) — Port B bit 1; Timer1 PWM output A |
| Broche 16 | PB2 (OC1B/SS) — Port B bit 2; Timer1 PWM output B / SPI slave select |
| Broche 17 | PB3 (MOSI/OC2A) — Port B bit 3; SPI master output / Timer2 PWM output A |
| Broche 18 | PB4 (MISO) — Port B bit 4; SPI master input |
| Broche 19 | PB5 (SCK) — Port B bit 5; SPI serial clock |
| Broche 20 | AVCC — ADC supply voltage; connect to VCC through low-pass filter or directly |
| Broche 21 | AREF — ADC analog reference voltage |
| Broche 22 | GND — Ground (ADC ground reference) |
| Broche 23 | PC0 (ADC0) — Port C bit 0; ADC channel 0 |
| Broche 24 | PC1 (ADC1) — Port C bit 1; ADC channel 1 |
| Broche 25 | PC2 (ADC2) — Port C bit 2; ADC channel 2 |
| Broche 26 | PC3 (ADC3) — Port C bit 3; ADC channel 3 |
| Broche 27 | PC4 (ADC4/SDA) — Port C bit 4; ADC channel 4 / I2C data |
| Broche 28 | PC5 (ADC5/SCL) — Port C bit 5; ADC channel 5 / I2C clock |
Applications typiques
ATMEGA168P-20PU convient pour 6 applications: Arduino-Compatible Hobbyist and Maker Boards, Industrial Sensor Nodes and Data Loggers, Low-Power Battery-Operated Devices, Consumer Appliance and Home Control, Prototyping, Education, and Legacy Through-Hole Systems, Motor Control and PWM Actuation.
Arduino-Compatible Hobbyist and Maker Boards
The ATMEGA168P-20PU is a natural fit for Arduino-compatible through-hole boards because it shares the exact DIP-28 pinout, fuse map, and bootloader workflow of the Arduino Uno's ATmega328P. Its 16KB ISP flash accepts the standard optiboot bootloader, and the 20 MHz clock delivers 20 MIPS for typical sketch workloads. The removable PDIP package lets makers swap or reprogram chips in a ZIF socket without desoldering, a key advantage over QFN/TQFP parts. Designers should budget sketch size against the 16KB flash (roughly half the Uno's 32KB) and reserve 512B EEPROM for calibration or user settings.
Recommandé
Industrial Sensor Nodes and Data Loggers
In industrial monitoring, the ATMEGA168P-20PU combines a 10-bit ADC (6 channels available on the PDIP pinout), the two-wire I2C interface for digital sensors, and picoPower sleep modes that cut consumption to microamp levels between samples. Supply operation from 2.7V to 5.5V allows direct powering from 3.3V or 5V rails common in PLC-adjacent hardware, and the -40C to +85C industrial rating covers unconditioned enclosures. A typical node sleeps between ADC conversions of thermistors or potentiometers, wakes via timer or external interrupt, and streams readings over USART or SPI; brown-out detection and the watchdog timer safeguard long-duration deployments.
Recommandé
Low-Power Battery-Operated Devices
PicoPower technology makes the ATMEGA168P-20PU suitable for battery products that spend most of their life asleep: power-down sleep modes drop current to the microamp range while the asynchronous timer or pin-change interrupt provides wake sources. Designers clock the chip from the internal 8 MHz RC oscillator or a 32.768 kHz watch crystal to minimize active energy, and the wide 2.7V-5.5V supply range permits direct use of 3xAA cells or a single lithium cell through a small regulator. The watchdog timer supports periodic wake scheduling, and debugWIRE enables single-wire in-canvas debugging without sacrificing port pins.
Recommandé
Consumer Appliance and Home Control
Appliance interfaces, thermostats, and small home-automation controllers benefit from the ATMEGA168P-20PU's blend of through-hole robustness and integrated peripherals. The three timers with compare modes generate PWM for heater, fan, or lamp dimming control, while USART and SPI link to displays or wireless modules. The 23 I/O lines directly drive keys, relays (via driver transistors), and LEDs, and the internal RC oscillator option removes the crystal from cost-sensitive boards. RoHS-compliant GREEN packaging and the industrial temperature range simplify qualification for globally shipped consumer goods.
Recommandé
Prototyping, Education, and Legacy Through-Hole Systems
The 0.3-inch PDIP package is the decisive factor in education labs, breadboard prototyping, and servicing of legacy through-hole equipment. Students and engineers can insert the ATMEGA168P-20PU directly into breadboards or ZIF sockets, program it via SPI with standard AVR ISP tools, and replace it at pennies if damaged. In repair scenarios, the pin-compatibility across the ATmega8/168/328 DIP-28 family lets technicians substitute whatever family member is procurable. The AVR instruction set, shared across the family and supported by avr-gcc and Microchip Studio, keeps course material and legacy codebases valid for years.
Recommandé
Motor Control and PWM Actuation
The ATMEGA168P-20PU's three timer/counters - two 8-bit and one 16-bit - each support compare-match PWM outputs, enabling simultaneous multi-channel control of DC motors, servos, and LED drivers. High-speed PWM modes allow carrier frequencies above the audible range, and the 16-bit timer provides precise servo pulse timing. Interrupt-driven quadrature decoding on the pin-change interrupt ports supports closed-loop speed control with optical encoders, while the SPI interface connects to dedicated motor-driver configurations. The 20 MIPS core leaves ample headroom for PI control loops running at kilohertz rates.
Recommandé
Récapitulatif des produits recommandés
Données de référence d'ingénierie pour ATMEGA168P-20PU — comparaison, recommandations de conception et informations de conformité.
Guide de sélection
Comparaison avec les alternatives
| Paramètre | Ce produit | ATMEGA168PA-PU | ATMEGA168A-PU | ATMEGA168-20PU | ATMEGA328P-PU |
|---|---|---|---|---|---|
| Package | 28-PDIP | 28-PDIP - same | 28-PDIP - same | 28-PDIP - same | 28-PDIP - same |
| Brand | Microchip Technology (Atmel) | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Flash Memory | 16 KB | 16 KB | 16 KB | 16 KB | 32 KB |
| SRAM | 1 KB | 1 KB | 1 KB | 1 KB | 2 KB |
| EEPROM | 512 B | 512 B | 512 B | 512 B | 1 KB |
| Max Clock Frequency | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz |
| Supply Voltage | 2.7 V to 5.5 V | 1.8 V to 5.5 V | 2.7 V to 5.5 V | 2.7 V to 5.5 V | 1.8 V to 5.5 V |
| picoPower Low-Power Technology | Yes | Yes | No | No | Yes |
| Lifecycle Position | Active (successor ATMEGA168PA designated) | Active - newest revision | Active | Active (older die) | Active - most popular AVR |
Principaux différenciateurs
- picoPower low-power technology (vs ATMEGA168A-PU)
- Designated successor availability (vs ATMEGA168-20PU)
- Cost efficiency versus memory headroom (vs ATMEGA328P-PU)
Notes de conception
Match clock speed to supply voltage: the -20 speed grade (20 MHz) is guaranteed only at 4.5V-5.5V per AVR frequency-versus-voltage derating curves. At 3.3V, keep the system clock at or below roughly 13 MHz (typically a 12 MHz crystal or the internal 8 MHz RC oscillator) to stay within the safe operating region. Decouple VCC and AVCC with 100 nF ceramic capacitors placed within 5 mm of the pins, and tie AVCC to VCC through a 10 uH/10 nF low-pass filter when ADC accuracy matters.
On the PDIP footprint, place the 100 nF decoupling capacitors on the component side directly across pins 7-8 (VCC-GND) and near pin 20 (AVCC). Keep the AREF trace short and decouple it with 100 nF to ground; never connect an external reference without this capacitor or ADC readings will be noisy. For ISP programming, route MOSI/PB3, MISO/PB4, SCK/PB5, and RESET/PC6 to a standard 2x3 100-mil header so AVR ISP and debugWIRE tools connect without rework.
Three frequent mistakes: (1) programming RSTDISBL fuse disables the RESET pin permanently, effectively bricking in-circuit reprogramming - avoid it unless high-voltage parallel programming is available; (2) setting CKDIV8 and clock fuses incorrectly for a 20 MHz crystal can leave the chip running at 2.5 MHz or with no clock at all; (3) forgetting that only 6 ADC channels are bonded out on the PDIP (ADC6/ADC7 exist only on TQFP/QFN) - do not write firmware that samples channels 6-7. Verify all fuse settings in AVR Fuse Calculator before flashing production units.
When driving long wires or cables from port pins, add 33-100 ohm series resistors to limit edge currents and reduce ringing, and keep the 20 MHz crystal within 10 mm of pins 9-10 with appropriate load capacitors (typically 18-22 pF; confirm with the crystal manufacturer's CL specification). For switching loads such as relays, always use a transistor driver with a flyback diode rather than driving directly from an I/O pin, which is limited to the absolute maximum 40 mA per pin.
Informations de conformité
Distributor listings mark ATMEGA168P-20PU as GREEN industrial-temp PDIP, indicating RoHS compliance and lead-free/halogen-free construction. REACH and conflict-minerals declarations available from Microchip compliance portal.