ATMEGA168P-20MQR - 16KB AVR MCU, 20MHz, VQFN-32 | Microchip
MPN: ATMEGA168P-20MQR β Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $1.9 | $1.90 |
| 10 | $1.72 | $17.20 |
| 100 | $1.5138 | $151.38 |
| 500 | $1.4 | $700.00 |
| 1,000 | $1.31 | $1,310.00 |
ATMEGA168P-20MQR Overview
An 8-bit AVR microcontroller is a self-contained computing device that integrates a RISC processor core, program memory, data memory, and peripherals such as timers, ADC, and serial interfaces on a single chip. Within the embedded systems hierarchy, the ATmega family sits under the broader AVR MCU line, which belongs to Microchip's microcontroller and digital signal processing portfolio, and is programmed through the In-Circuit Serial Programming (ICSP) interface using tools such as the MPLAB SNAP.
Key features include 131 powerful instructions with mostly single-cycle execution, 32 general purpose working registers, full static operation, and read-while-write FLASH capability for reliable firmware updates. The picoPower technology delivers extremely low sleep-mode consumption, making the device well suited to battery-operated designs. Peripherals include three flexible timer/counters with compare modes, an 8-channel 10-bit ADC, byte-oriented Two-Wire Interface (I2C), SPI serial port, and a programmable USART.
Technically, the AVR advanced RISC architecture achieves throughput near 1 MIPS per MHz, allowing system designers to trade clock speed against power dissipation. Operating voltage spans 1.8V to 5.5V; full 20MHz operation requires a supply of 4.5V to 5.5V per the datasheet speed-versus-voltage curves, while lower voltages constrain maximum clock frequency.
Typical applications include industrial sensor nodes, consumer appliance control boards, battery-powered metering, and hobby/embedded prototyping platforms compatible with Arduino-style ecosystems.
For design, note that the ATMEGA168PA is the manufacturer-recommended newer device for new designs; the P variant remains in production but the PA offers lower active current at equivalent performance.
This page synthesizes distributor pricing from DigiKey, Mouser, LCSC and Octopart, drop-in alternatives, and practical design notes not found in the manufacturer datasheet.
Drop-in alternatives for ATMEGA168P-20MQR β 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 ATMEGA168P-20MQR (same form factor and footprint) β differing in Package, ADC, Connectivity, Flash Memory, Number of ADC Channels.
Quick Comparison Tool β Select alternative parts for side-by-side comparison:
ATMEGA168PA-20MUR
β Drop-Inπ Reference alternative (not in catalog)
ATMEGA168P-20MU
β Drop-Inβ In Stock
$1.38 / Unit
View Datasheet βATMEGA168-20MQR
β Drop-Inβ In Stock
$2.38 / Unit
View Datasheet βATMEGA168A-MU
β Drop-Inβ In Stock
$1.38 / Unit
View Datasheet βATMEGA328P-20MUR
β Drop-Inπ Reference alternative (not in catalog)
ATMEGA48-20MU
β Drop-Inπ Reference alternative (not in catalog)
ATMEGA168P-20MQR Maximum Ratings & Electrical Characteristics
| Core | AVR 8-bit RISC |
| Core Size | 8-bit |
| Speed | 20 MHz |
| Flash Memory | 16 KB (8K x 16) |
| EEPROM | 512 B |
| SRAM | 1 KB |
| Instructions | 131 powerful instructions, most single-cycle |
| General Purpose I/O | 23 |
| Working Registers | 32 |
| Timers/Counters | 3 flexible timer/counters |
| ADC | 8-channel 10-bit |
| Operating Voltage | 1.8 V to 5.5 V |
| Voltage - Supply (Vcc/Vdd) | 1.8 V to 5.5 V (20 MHz at 4.5 V to 5.5 V) |
| Operating Temperature | -40C to +85C |
| Package | 32-VQFN (5x5 mm) with exposed pad |
| Mounting Type | Surface Mount |
| Programming Interface | ICSP (In-Circuit Serial Programming) |
| Technology | picoPower low-power |
| RoHS Status | RoHS3 compliant (per distributor data) |
| Newer Device Available | Yes - ATMEGA168PA |
ATMEGA168P-20MQR Pin Configuration
| Pin 1 | PC6/RESET β Port C bit 6 / Reset input (active low); also debugWIRE pin |
| Pin 2 | PD0/RXD β Port D bit 0 / USART receive input |
| Pin 3 | PD1/TXD β Port D bit 1 / USART transmit output |
| Pin 4 | PD2/INT0 β Port D bit 2 / External interrupt 0 input |
| Pin 5 | PD3/INT1/OC2B β Port D bit 3 / External interrupt 1 / Timer2 output compare B |
| Pin 6 | PD4/T0/XCK β Port D bit 4 / Timer0 counter input / USART external clock |
| Pin 7 | VCC β Digital supply voltage |
| Pin 8 | GND β Ground |
| Pin 9 | PB6/XTAL1/TOSC1 β Port B bit 6 / Crystal oscillator pin 1 / Timer oscillator input |
| Pin 10 | PB7/XTAL2/TOSC2 β Port B bit 7 / Crystal oscillator pin 2 / Timer oscillator output |
| Pin 11 | PD5/T1/OC0B β Port D bit 5 / Timer1 counter input / Timer0 output compare B |
| Pin 12 | PD6/AIN0/OC0A β Port D bit 6 / Analog comparator positive input / Timer0 output compare A |
| Pin 13 | PD7/AIN1 β Port D bit 7 / Analog comparator negative input |
| Pin 14 | PB0/ICP1/CLKO β Port B bit 0 / Timer1 input capture / System clock output |
| Pin 15 | PB1/OC1A β Port B bit 1 / Timer1 output compare A |
| Pin 16 | PB2/SS/OC1B β Port B bit 2 / SPI slave select / Timer1 output compare B |
| Pin 17 | PB3/MOSI/OC2A β Port B bit 3 / SPI master data out / Timer2 output compare A |
| Pin 18 | PB4/MISO β Port B bit 4 / SPI master data in |
| Pin 19 | PB5/SCK β Port B bit 5 / SPI serial clock |
| Pin 20 | AVCC β ADC supply voltage |
| Pin 21 | AREF β ADC analog reference input |
| Pin 22 | GND β Ground |
| Pin 23 | PC0/ADC0 β Port C bit 0 / ADC channel 0 |
| Pin 24 | PC1/ADC1 β Port C bit 1 / ADC channel 1 |
| Pin 25 | PC2/ADC2 β Port C bit 2 / ADC channel 2 |
| Pin 26 | PC3/ADC3 β Port C bit 3 / ADC channel 3 |
| Pin 27 | PC4/ADC4/SDA β Port C bit 4 / ADC channel 4 / Two-Wire data line |
| Pin 28 | PC5/ADC5/SCL β Port C bit 5 / ADC channel 5 / Two-Wire clock line |
| Pin 29 | GND β Ground (VQFN-32 corner pin) |
| Pin 30 | GND β Ground (VQFN-32 corner pin) |
| Pin 31 | GND β Ground (VQFN-32 corner pin) |
| Pin 32 | GND β Ground (VQFN-32 corner pin) |
Typical Applications
ATMEGA168P-20MQR is suitable for 6 applications: Industrial Sensor Nodes, Battery-Powered Metering, Consumer Appliance Control, Embedded Prototyping and Maker Boards, Motor and Actuator Control, IoT Edge Sensing and Lighting Control.
Industrial Sensor Nodes
The ATMEGA168P-20MQR fits industrial sensor nodes because its 23 GPIO lines, 8-channel 10-bit ADC, and -40C to +85C industrial temperature rating cover analog signal acquisition and digital control in harsh factory environments. The picoPower Power-down sleep mode allows battery-backed nodes to idle at microamp-level current between periodic ADC sampling of pressure, temperature, or proximity signals. Data is transmitted over the on-chip USART or Two-Wire Interface (I2C) to a gateway, while the 16KB FLASH accommodates protocol stacks with read-while-write support for field firmware updates via ICSP.
Recommended
Battery-Powered Metering
In battery-powered metering applications, the ATMEGA168P-20MQR's picoPower technology and six sleep modes let designers duty-cycle the 20MHz core so that average current stays within coin-cell budgets. The 10-bit ADC samples energy or flow signals, the 512B EEPROM stores calibration constants across power cycles without external NVM, and the 1.8V low-voltage operation extends usable battery life as cells discharge. Wake-up via asynchronous timer from Power-save mode supports periodic logging, while the 16KB FLASH holds compensation algorithms and communication firmware with headroom to spare.
Recommended
Consumer Appliance Control
Consumer appliance control boards benefit from the ATMEGA168P-20MQR's low cost, 5V tolerance, and integrated peripherals that eliminate external components: three timer/counters drive buttons, buzzer tones, and PWM-dimmed displays; the USART communicates with main boards; and the 8-channel ADC reads thermistors and potentiometers. The 32-VQFN 5x5 mm exposed-pad package conserves PCB area in compact housings, and the industrial -40C to +85C rating tolerates kitchens and garages. With 131 mostly single-cycle instructions, the AVR core executes control loops deterministically at modest clock rates, reducing EMI and power.
Recommended
Embedded Prototyping and Maker Boards
The ATMEGA168P-20MQR is widely used in embedded prototyping platforms because the AVR architecture is the core family behind Arduino-compatible boards, supported by mature open-source toolchains (avrdude, Arduino IDE) and the ICSP interface compatible with MPLAB SNAP and AVR ISP mkII programmers. The 16KB FLASH hosts a bootloader plus application code, the 1KB SRAM handles sensor libraries, and 23 GPIO breakout lines enable shields and rapid prototyping. Engineers value the datasheet's register-level documentation and the pin-compatibility path to ATMEGA328P for scaling designs to production.
Recommended
Motor and Actuator Control
For small motor and actuator control, the ATMEGA168P-20MQR's three flexible timer/counters generate PWM with phase-correct and fast-PWM modes plus input capture for encoder feedback, all without CPU overhead. The 20MHz/20 MIPS throughput executes PI control loops deterministically, the 10-bit ADC samples current shunts and potentiometer setpoints, and interrupts on PORTB/PD pins handle limit-switch events with microsecond latency. The 5.5V maximum supply allows direct operation from unregulated 5V rails, and the VQFN exposed pad provides a solid ground reference for switching-noise immunity in drive circuits.
Recommended
IoT Edge Sensing and Lighting Control
In IoT edge nodes and connected lighting, the ATMEGA168P-20MQR acts as the low-power sensor and actuation front end that wakes from Power-down via watchdog or pin-change interrupt, samples ambient light or occupancy through the 10-bit ADC, and relays status over SPI or I2C to a wireless SoC. The 16KB FLASH accommodates comms framing and OTA update stubs, while picoPower sleep modes keep average draw compatible with energy-harvesting supplies. PWM timers drive LED dimming channels with flicker-free resolution, and the industrial temperature range suits outdoor luminaires and unconditioned enclosures.
Recommended
Recommended Products Summary
Engineering reference data for ATMEGA168P-20MQR β comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | ATMEGA168PA-20MUR | ATMEGA168-20MQR | ATMEGA328P-20MUR | ATMEGA48-20MU |
|---|---|---|---|---|---|
| Package | 32-VQFN (5x5) exposed pad | 32-VQFN (5x5) - same | 32-VQFN (5x5) - same | 32-VQFN (5x5) - same | 32-VQFN (5x5) - same |
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Flash Memory | 16 KB | 16 KB | 16 KB | 32 KB | 4 KB |
| SRAM | 1 KB | 1 KB | 1 KB | 2 KB | 512 B |
| EEPROM | 512 B | 512 B | 512 B | 1 KB | 256 B |
| Maximum Clock | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz |
| picoPower Low-Power Die | Yes | Yes (lowest power) | No | Yes | No |
Key Differentiators
- picoPower die with lowest sleep current (vs ATMEGA168-20MQR)
- 16KB FLASH is the memory sweet spot (vs ATMEGA48-20MU)
- Cost-optimal versus larger memory (vs ATMEGA328P-20MUR)
Design Notes
Observe the speed-versus-voltage derating: the datasheet guarantees 20MHz only at 4.5V-5.5V. At 3.3V, limit the clock to approximately 13.3MHz or use the internal 8MHz RC oscillator. Decouple VCC and AVCC separately with 100nF ceramics placed within 5mm of each pin, and connect AVCC to VCC through an LC filter when ADC accuracy matters - noise on AVCC directly degrades 10-bit ADC effective resolution.
The exposed pad on the 32-VQFN must be soldered to a grounded copper pour - it is the primary ground return, and pins 29-32 are corner GND pins only. Use a 3x3 via array under the pad for thermal and electrical performance. Keep the crystal (PB6/PB7) traces under 10mm with ground guard traces, and route ADC traces away from PWM and USART lines to preserve analog signal integrity.
RESET/PC6 doubles as the debugWIRE and ICSP line: do not add heavy capacitive loading or a pull-down here, as it breaks programming. If using PB6/PB7 as GPIO instead of a crystal, disable the external clock fuse options first or the device may become inaccessible. For long-term supply security, prefer the ATMEGA168PA (the manufacturer-designated successor) for new designs per the Microchip datasheet recommendation.
Compliance Information
Distributor data indicates RoHS3 compliance and Pb-free matte-tin lead finish for the MQ build. REACH and conflict mineral status per Microchip product pages.