ATMEGA168-20MQR - 8-bit AVR MCU 20MHz 16KB Flash | Microchip
MPN: ATMEGA168-20MQR β Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $3.33 | $3.33 |
| 10 | $3.05 | $30.50 |
| 100 | $2.78 | $278.00 |
| 500 | $2.55 | $1,275.00 |
| 1,000 | $2.38 | $2,380.00 |
ATMEGA168-20MQR Overview
An 8-bit microcontroller is a single-chip computer that integrates a processor core, program memory, data memory, and peripherals on one die. Within the power-management hierarchy of embedded systems, the MCU sits at the application layer above analog front ends and power regulation, orchestrating sensors, actuators, and communication. The ATmega168 belongs to the AVR family created by Atmel (now Microchip Technology), renowned for its fast, single-cycle RISC architecture with 32 general-purpose working registers directly connected to the ALU.
Key features include the 16 KB self-programmable flash with read-while-write support, a 10-bit ADC with 8 multiplexed channels (6 external channels plus ADC6/ADC7 available on the 32-pin QFN), and full serial connectivity via one USART, one SPI master/slave interface, and one two-wire (I2C-compatible) TWI interface.
The AVR enhanced RISC core executes most instructions in a single clock cycle, and two flexible 8-bit timer/counters plus one 16-bit timer/counter with compare modes and PWM outputs enable precise motor control, lighting, and timing applications. On-chip debug is performed through in-circuit debugging (ICD) and In-Circuit Serial Programming (ICSP) using only two I/O pins and reset. Brown-out detection, an internal calibrated RC oscillator, and power-saving idle, ADC noise reduction, and power-down modes round out the peripheral set.
Typical applications include industrial sensor nodes and automation control, consumer appliances and HVAC control boards, and embedded hobby/prototyping designs compatible with Arduino-class toolchains, where the 20 MHz speed and 16 KB flash cover mid-complexity firmware.
A key design consideration is supply voltage versus clock speed: full 20 MHz operation requires a 4.5V to 5.5V supply, while lower-voltage 2.7V to 5.5V systems must derate maximum clock speed per the frequency-versus-voltage curve in the manufacturer datasheet.
This page synthesizes distributor pricing, drop-in alternatives across the ATmega48/88/168/328 family, pinout data, and practical design notes not found in the manufacturer datasheet.
Drop-in alternatives for ATMEGA168-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 ATMEGA168-20MQR (same form factor and footprint) β differing in Connectivity, Operating Temperature, EEPROM Size, Package, Program Memory Size.
Quick Comparison Tool β Select alternative parts for side-by-side comparison:
ATMEGA168-20MU
β Drop-Inβ In Stock
Contact for price
View Datasheet βATMEGA168A-MUR
β Drop-In β οΈ εζ°εΎ ιͺθ―β In Stock
$1.85 / Unit
View Datasheet βATMEGA168PA-20MUR
β Drop-In β οΈ εζ°εΎ ιͺθ―π Reference alternative (not in catalog)
ATMEGA328P-MUR
β Drop-In β οΈ εζ°εΎ ιͺθ―π Reference alternative (not in catalog)
ATMEGA88PA-MUR
β Drop-In β οΈ εζ°εΎ ιͺθ―π Reference alternative (not in catalog)
ATMEGA48-20MU
β Drop-Inπ Reference alternative (not in catalog)
ATMEGA168-20MQR Maximum Ratings & Electrical Characteristics
| Core Processor | AVR |
| Core Size | 8-bit |
| Speed | 20 MHz |
| Program Memory Size | 16 KB (8K x 16) FLASH |
| EEPROM Size | 512 B |
| RAM Size | 1 KB SRAM |
| Number of I/O | 23 |
| General Purpose Working Registers | 32 x 8-bit |
| Supply Voltage Range | 4.5 V to 5.5 V (at 20 MHz); 2.0 V min per device family |
| Operating Temperature | -40C to +85C |
| ADC Resolution | 10-bit |
| Number of ADC Channels | 8 (6 external + ADC6/ADC7 on QFN) |
| Peripherals | Brown-out Detect/Reset, POR, PWM, WDT |
| Connectivity | SPI, UART/USART, TWI (I2C-compatible) |
| Timers | 2 x 8-bit, 1 x 16-bit |
| Oscillator Type | Internal (calibrated RC) plus external crystal |
| Package | 32-VQFN (5x5 mm) Exposed Pad |
| Mounting Type | Surface Mount |
| Programming | ISP, ICD, ICSP (2 I/O pins + reset) |
ATMEGA168-20MQR Pin Configuration
| Pin 1 | PD3 (PCINT19/OC2B/INT1) β Port D bit 3; pin-change interrupt 19, PWM output OC2B, external interrupt 1 |
| Pin 2 | PD4 (PCINT20/XCK/T0) β Port D bit 4; pin-change interrupt 20, USART external clock, timer 0 clock input |
| Pin 3 | GND β Ground |
| Pin 4 | VCC β Digital supply voltage |
| Pin 5 | GND β Ground |
| Pin 6 | VCC β Digital supply voltage |
| Pin 7 | PB6 (PCINT6/XTAL1/TOSC1) β Port B bit 6; crystal oscillator input or timer oscillator input |
| Pin 8 | PB7 (PCINT7/XTAL2/TOSC2) β Port B bit 7; crystal oscillator output or timer oscillator output |
| Pin 9 | PD5 (PCINT21/OC0B/T1) β Port D bit 5; pin-change interrupt 21, PWM output OC0B, timer 1 clock input |
| Pin 10 | PD6 (PCINT22/OC0A/AIN0) β Port D bit 6; pin-change interrupt 22, PWM output OC0A, analog comparator positive input |
| Pin 11 | PD7 (PCINT23/AIN1) β Port D bit 7; pin-change interrupt 23, analog comparator negative input |
| Pin 12 | PB0 (PCINT0/CLKO/ICP1) β Port B bit 0; pin-change interrupt 0, system clock output, timer 1 input capture |
| Pin 13 | PB1 (PCINT1/OC1A) β Port B bit 1; pin-change interrupt 1, PWM output OC1A |
| Pin 14 | PB2 (PCINT2/SS/OC1B) β Port B bit 2; pin-change interrupt 2, SPI slave select, PWM output OC1B |
| Pin 15 | PB3 (PCINT3/OC2A/MOSI) β Port B bit 3; pin-change interrupt 3, PWM output OC2A, SPI master data out |
| Pin 16 | PB4 (PCINT4/MISO) β Port B bit 4; pin-change interrupt 4, SPI master data in |
| Pin 17 | PB5 (PCINT5/SCK) β Port B bit 5; pin-change interrupt 5, SPI serial clock |
| Pin 18 | AVCC β ADC supply voltage (connect to VCC through low-pass filter) |
| Pin 19 | ADC6 β ADC input channel 6 (QFN package only) |
| Pin 20 | AREF β Analog reference voltage for the ADC |
| Pin 21 | GND β Ground (also exposed pad on package backside) |
| Pin 22 | ADC7 β ADC input channel 7 (QFN package only) |
| Pin 23 | PC0 (PCINT8/ADC0) β Port C bit 0; pin-change interrupt 8, ADC input channel 0 |
| Pin 24 | PC1 (PCINT9/ADC1) β Port C bit 1; pin-change interrupt 9, ADC input channel 1 |
| Pin 25 | PC2 (PCINT10/ADC2) β Port C bit 2; pin-change interrupt 10, ADC input channel 2 |
| Pin 26 | PC3 (PCINT11/ADC3) β Port C bit 3; pin-change interrupt 11, ADC input channel 3 |
| Pin 27 | PC4 (PCINT12/SDA/ADC4) β Port C bit 4; pin-change interrupt 12, TWI data line, ADC channel 4 |
| Pin 28 | PC5 (PCINT13/SCL/ADC5) β Port C bit 5; pin-change interrupt 13, TWI clock line, ADC channel 5 |
| Pin 29 | PC6 (PCINT14/RESET) β Reset input or Port C bit 6; pin-change interrupt 14 (active-low reset) |
| Pin 30 | PD0 (PCINT16/RXD) β Port D bit 0; pin-change interrupt 16, USART receive data |
| Pin 31 | PD1 (PCINT17/TXD) β Port D bit 1; pin-change interrupt 17, USART transmit data |
| Pin 32 | PD2 (PCINT18/INT0) β Port D bit 2; pin-change interrupt 18, external interrupt 0 |
Typical Applications
ATMEGA168-20MQR is suitable for 6 applications: Industrial Sensor Nodes and Automation Control, Consumer Appliances and HVAC Control, Arduino-Compatible Prototyping and Maker Boards, Battery-Powered Portable Instruments, Motor Control and LED Lighting, Embedded Communication Gateways and Peripherals.
Industrial Sensor Nodes and Automation Control
The ATMEGA168-20MQR fits industrial sensor acquisition and actuator control nodes because its -40C to +85C extended temperature rating survives factory-floor ambient extremes, while the 10-bit ADC with 8 channels digitizes multiple analog sensors such as 4-20 mA loop inputs and thermistor bridges. The TWI (I2C) and SPI interfaces connect external EEPROM, RTC, and display peripherals, and the USART links to RS-485 transceivers for Modbus-style field buses. In typical use the MCU samples sensors with the ADC in noise-reduction mode, executes a PID loop using the 16-bit timer, and drives PWM outputs through the 2 x 8-bit plus 1 x 16-bit timer resources. Running at 20 MHz from a 5V rail provides 20 MIPS of control bandwidth, and the internal brown-out detector plus watchdog timer deliver the fail-safe reset behavior expected in unattended automation equipment.
Recommended
Consumer Appliances and HVAC Control
White-goods, thermostat, and HVAC control boards benefit from the ATMEGA168-20MQR's combination of self-programmable 16 KB flash - enabling field firmware updates through a bootloader - and low-cost integration of touch/rotary encoder inputs on the 23 GPIO lines. The calibrated internal RC oscillator eliminates a crystal in cost-sensitive boards where timing accuracy is adequate for relay and blower control, while XTAL1/XTAL2 remain available when precise UART timing is needed. The 10-bit ADC reads NTC temperature sensors on multiple zones, and hardware PWM from the 16-bit timer drives triac firing or DC blower speed control. Its VQFN 5x5 mm footprint keeps two-layer control PCBs compact, and the extended temperature rating covers attic-mounted or engine-adjacent HVAC environments where commercial-grade 0C to +70C parts like the ATMEGA168-20MU would be marginal.
Recommended
Arduino-Compatible Prototyping and Maker Boards
The ATmega168 is fully supported by the Arduino IDE ecosystem and community hardware packages such as MiniCore, which explicitly covers ATmega8/48/88/168/328, making the ATMEGA168-20MQR a strong choice for custom maker boards in the QFN form factor. The 16 KB flash accommodates the optiboot-class bootloader plus a moderate sketch, and ICSP programming needs only two I/O pins and reset, matching standard 6-pin ISP headers. The FTDI/USB-serial companion connects to the hardware USART for sketch upload and debug prints. Designers should note the full-speed constraint: 20 MHz requires a 4.5V-5.5V supply, so classic 5V Arduino-level I/O compatibility (and 5V sensor shields) is preserved, whereas 3.3V shields require clock derating or a low-voltage PV variant. The exposed QFN pad simplifies hand-reflow prototyping with hot-plate assembly.
Recommended
Battery-Powered Portable Instruments
Portable meters, data loggers, and handheld instruments leverage the ATmega168's five software-selectable sleep modes - including power-down with wakeup on external interrupt or watchdog - to stretch battery life between charges. Although the picoPower PA variants (ATMEGA168PA-20MUR) achieve lower sleep current, the base ATmega168 power-down mode still reaches the microamp class with the watchdog disabled, which is adequate for intermittently sampled instruments. The 10-bit ADC with an internal 1.1V or AVCC reference and the ADC noise-reduction sleep mode deliver clean low-frequency measurements of battery voltage, thermistors, and bridge sensors, while SPI reads external flash or SD-card storage for logged data. The extended -40C to +85C rating permits outdoor and cold-chain instruments, and the 5x5 mm QFN keeps handheld PCB real estate compact.
Recommended
Motor Control and LED Lighting
Small DC motor, stepper, and LED lighting controllers use the ATMEGA168-20MQR's hardware PWM channels generated by two 8-bit timers and one 16-bit timer with output-compare units. At 20 MHz, an 8-bit PWM can run at approximately 78 kHz, placing the switching tone above audible range for fan and LED dimming applications, while 16-bit PWM resolution suits servo positioning. The fast GPIO can directly gate low-side MOSFET drivers, and the ADC monitors current via shunt sensing for closed-loop torque or constant-current regulation. The brown-out detector prevents corrupted PWM states during brown-out events - an important safety feature in motorized equipment. With the 16 KB flash, sensorless commutation tables and communication firmware coexist comfortably, and the extended temperature rating suits motor-adjacent mounting where enclosure temperatures reach +85C.
Recommended
Embedded Communication Gateways and Peripherals
The ATMEGA168-20MQR serves as a protocol-bridge and peripheral controller in embedded communication equipment, using its full-duplex USART at 20 MHz for reliable high-baud UART links, the SPI master for Ethernet controllers or RF modules, and TWI for configuration buses. Read-while-write flash operation lets the device log data to its own program-flash region or update firmware while the serial link stays live - a capability many small MCUs lack. The 23 I/O lines handle board-level housekeeping such as fan control, LED status, and presence detection alongside the data path. In 5V backplane environments the MQR's 5.5V tolerant supply range interfaces directly with legacy TTL-level signaling without level shifters, and the extended temperature rating covers telecom cabinets. Watchdog supervision keeps the link alive through firmware hangs in unattended installations.
Recommended
Recommended Products Summary
Engineering reference data for ATMEGA168-20MQR β comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | ATMEGA168-20MU | ATMEGA168A-MUR | ATMEGA328P-MUR | ATMEGA48-20MU |
|---|---|---|---|---|---|
| Package | 32-VQFN (5x5 mm) Exposed Pad | 32-VQFN (5x5 mm) Exposed Pad - same | 32-VQFN (5x5 mm) Exposed Pad - same | 32-VQFN (5x5 mm) Exposed Pad - same | 32-QFN (MLF) Exposed Pad - same footprint |
| 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 | 0.5 KB |
| EEPROM | 512 B | 512 B | 512 B | 1 KB | 256 B |
| Maximum Clock Speed | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz |
| Operating Temperature | -40C to +85C | 0C to +70C | -40C to +85C | -40C to +85C | 0C to +70C |
| Low-Power Features | Standard sleep modes (idle, ADC NR, power-down, power-save, standby) | Standard sleep modes | Standard sleep modes, 1.8V operation | picoPower low sleep current, 1.8V operation | Standard sleep modes |
Key Differentiators
- Extended temperature range in stock QFN package (vs ATMEGA168-20MU)
- Read-while-write flash enables field firmware updates (vs ATMEGA48-20MU)
- Balanced memory/cost point in the AVR pin-compatible family (vs ATMEGA328P-MUR)
Design Notes
Respect the speed-versus-voltage constraint: the '-20' 20 MHz rating requires a 4.5V to 5.5V supply per the datasheet maximum-frequency-versus-VCC curve. If the board must run at 3.3V, reduce the clock to roughly 8-13 MHz or select the low-voltage PV variant. Decouple both VCC pads (pins 4 and 6) and AVCC (pin 18) with 100 nF ceramic capacitors placed within 2 mm of each pad, and feed AVCC through a 10 uH inductor or ferrite bead plus 100 nF from the digital rail to keep ADC noise low.
The 32-VQFN exposed pad on the die backside is the primary ground connection and must be soldered to a grounded copper pour - it is not optional. Use a 3x3 or 4x4 via array (0.3 mm vias) under the pad to tie the top pour to internal ground planes, reducing thermal and ground impedance. For first-article assembly, a stencil with ~70% pad coverage and divided apertures prevents solder voiding under the pad. Pin 1 is the top-left pad marked by the package dot; verify orientation against the pinout table before reflow.
The RESET pin (PC6, pin 29) is shared with general-purpose I/O; if fused as an I/O pin, ISP programming becomes impossible without high-voltage parallel programming. Keep RESET configured and pull it up with a 10 kOhm resistor. For debug, reserve PB6/PB7 for the crystal only if precise UART timing is needed - otherwise fuse the internal 8 MHz RC oscillator and reclaim two I/O pins. When migrating firmware from ATmega48/88, adjust the register names and fuse defaults, as interrupt vector tables and some register addresses differ between family members.
Estimated: an ATmega168 running at 5V/20 MHz with all I/O active typically dissipates on the order of 50-100 mW (based on typical active supply current figures in the manufacturer datasheet); with the VQFN-32 theta_JA in the 40-50 C/W class on a standard four-layer board, the junction rise stays well under 10 C - no heatsinking is required. Thermal attention is only needed if the board operates continuously near +85C ambient; in that case, verify internal ground-plane stitching under the exposed pad, since the backside pad doubles as the thermal path.
Compliance Information
RoHS/lead-free status per Microchip green-package policy for the MQR suffix; REACH and conflict-minerals declarations not stated in provided data.