Features High performance, low power Atmel AVR 8-bit microcontroller Advanced RISC architecture 131 powerful instructions most single clock cycle execution 32 8 general purpose working registers Fully static operation Up to 20 MIPS throughput at 20MHz On-chip 2-cycle multiplier High endurance non-volatile memory segments 4/8/16 Kbytes of in-system self-programmable flash program memory 8-bit Atmel 256/512/512 bytes EEPROM 512/1K/1Kbytes internal SRAM Microcontroller Write/erase cyles: 10,000 flash/100,000 EEPROM (1) Data retention: 20 years at 85C/100 years at 25C with 4/8/16K Optional boot code section with independent lock bits In-system programming by on-chip boot program Bytes In-System True read-while-write operation Programming lock for software security Programmable QTouch library support Capacitive touch buttons, sliders and wheels QTouch and QMatrix acquisition Flash Up to 64 sense channels Peripheral features Two 8-bit timer/counters with separate prescaler and compare mode ATmega48/V One 16-bit timer/counter with separate prescaler, compare mode, and capture mode Real time counter with separate oscillator ATmega88/V Six PWM channels 8-channel 10-bit ADC in TQFP and QFN/MLF package ATmega168/V 6-channel 10-bit ADC in PDIP Package Programmable serial USART Master/slave SPI serial interface 2 Byte-oriented 2-wire serial interface (Philips I C compatible) Programmable watchdog timer with separate on-chip oscillator On-chip analog comparator Interrupt and wake-up on pin change Special microcontroller features DebugWIRE on-chip debug system Power-on reset and programmable brown-out detection Internal calibrated oscillator External and internal interrupt sources Five sleep modes: Idle, ADC noise reduction, power-save, power-down, and standby I/O and packages 23 programmable I/O lines 28-pin PDIP, 32-lead TQFP, 28-pad QFN/MLF and 32-pad QFN/MLF Operating voltage: 1.8V - 5.5V for Atmel ATmega48V/88V/168V 2.7V - 5.5V for Atmel ATmega48/88/168 Temperature range: -40C to 85C Speed grade: ATmega48V/88V/168V: 0 - 4MHz 1.8V - 5.5V, 0 - 10MHz 2.7V - 5.5V ATmega48/88/168: 0 - 10MHz 2.7V - 5.5V, 0 - 20MHz 4.5V - 5.5V Low power consumption Active mode: 250A at 1MHz, 1.8V 15A at 32kHz, 1.8V (including oscillator) Power-down mode: 0.1A at 1.8V Rev. 2545UAVR11/2015 Note: 1. See Data retention on page 8 for details.ATmega48/88/168 1. Pin configurations Figure 1-1. Pinout Atmel ATmega48/88/168. TQFP Top View PDIP (PCINT14/RESET) PC6 1 28 PC5 (ADC5/SCL/PCINT13) (PCINT16/RXD) PD0 2 27 PC4 (ADC4/SDA/PCINT12) (PCINT17/TXD) PD1 3 26 PC3 (ADC3/PCINT11) (PCINT19/OC2B/INT1) PD3 1 24 PC1 (ADC1/PCINT9) (PCINT18/INT0) PD2 4 25 PC2 (ADC2/PCINT10) 23 PC0 (ADC0/PCINT8) (PCINT20/XCK/T0) PD4 2 (PCINT19/OC2B/INT1) PD3 5 24 PC1 (ADC1/PCINT9) GND 3 22 ADC7 (PCINT20/XCK/T0) PD4 6 23 PC0 (ADC0/PCINT8) VCC 4 21 GND VCC 7 22 GND GND 5 20 AREF GND 8 21 AREF VCC 6 19 ADC6 (PCINT6/XTAL1/TOSC1) PB6 9 20 AVCC (PCINT6/XTAL1/TOSC1) PB6 7 18 AVCC (PCINT7/XTAL2/TOSC2) PB7 10 19 PB5 (SCK/PCINT5) 17 PB5 (SCK/PCINT5) (PCINT7/XTAL2/TOSC2) PB7 8 (PCINT21/OC0B/T1) PD5 11 18 PB4 (MISO/PCINT4) (PCINT22/OC0A/AIN0) PD6 12 17 PB3 (MOSI/OC2A/PCINT3) (PCINT23/AIN1) PD7 13 16 PB2 (SS/OC1B/PCINT2) (PCINT0/CLKO/ICP1) PB0 14 15 PB1 (OC1A/PCINT1) 32 MLF Top View 28 MLF Top View (PCINT19/OC2B/INT1) PD3 1 24 PC1 (ADC1/PCINT9) (PCINT19/OC2B/INT1) PD3 1 21 PC2 (ADC2/PCINT10) (PCINT20/XCK/T0) PD4 2 23 PC0 (ADC0/PCINT8) (PCINT20/XCK/T0) PD4 2 20 PC1 (ADC1/PCINT9) GND 22 ADC7 3 VCC 3 19 PC0 (ADC0/PCINT8) VCC GND 4 21 GND 4 18 GND AREF GND 5 20 (PCINT6/XTAL1/TOSC1) PB6 5 17 AREF VCC 6 19 ADC6 (PCINT7/XTAL2/TOSC2) PB7 16 AVCC 6 (PCINT6/XTAL1/TOSC1) PB6 7 18 AVCC (PCINT21/OC0B/T1) PD5 7 15 PB5 (SCK/PCINT5) (PCINT7/XTAL2/TOSC2) PB7 8 17 PB5 (SCK/PCINT5) NOTE: Bottom pad should be soldered to ground. NOTE: Bottom pad should be soldered to ground. 2 2545UAVR11/2015 (PCINT21/OC0B/T1) PD5 9 32 PD2 (INT0/PCINT18) (PCINT22/OC0A/AIN0) PD6 8 28 PD2 (INT0/PCINT18) (PCINT22/OC0A/AIN0) PD6 10 31 PD1 (TXD/PCINT17) (PCINT23/AIN1) PD7 9 27 PD1 (TXD/PCINT17) (PCINT23/AIN1) PD7 11 30 PD0 (RXD/PCINT16) (PCINT0/CLKO/ICP1) PB0 10 26 PD0 (RXD/PCINT16) (PCINT0/CLKO/ICP1) PB0 12 29 PC6 (RESET/PCINT14) (PCINT1/OC1A) PB1 11 25 PC6 (RESET/PCINT14) (PCINT1/OC1A) PB1 13 28 PC5 (ADC5/SCL/PCINT13) 12 24 (PCINT2/SS/OC1B) PB2 PC5 (ADC5/SCL/PCINT13) (PCINT2/SS/OC1B) PB2 14 27 PC4 (ADC4/SDA/PCINT12) (PCINT3/OC2A/MOSI) PB3 13 23 PC4 (ADC4/SDA/PCINT12) (PCINT3/OC2A/MOSI) PB3 15 26 PC3 (ADC3/PCINT11) (PCINT4/MISO) PB4 14 22 PC3 (ADC3/PCINT11) (PCINT4/MISO) PB4 16 25 PC2 (ADC2/PCINT10) (PCINT21/OC0B/T1) PD5 9 32 PD2 (INT0/PCINT18) (PCINT22/OC0A/AIN0) PD6 10 31 PD1 (TXD/PCINT17) (PCINT23/AIN1) PD7 11 30 PD0 (RXD/PCINT16) (PCINT0/CLKO/ICP1) PB0 12 29 PC6 (RESET/PCINT14) 13 28 (PCINT1/OC1A) PB1 PC5 (ADC5/SCL/PCINT13) 14 27 (PCINT2/SS/OC1B) PB2 PC4 (ADC4/SDA/PCINT12) (PCINT3/OC2A/MOSI) PB3 15 26 PC3 (ADC3/PCINT11) (PCINT4/MISO) PB4 16 25 PC2 (ADC2/PCINT10)