Features High Performance, Low Power Atmel AVR 8-Bit Microcontroller Advanced RISC Architecture 130 Powerful Instructions Most Single Clock Cycle Execution 32 8 General Purpose Working Registers Fully Static Operation Up to 16 MIPS Throughput at 16 MHz On-Chip 2-cycle Multiplier High Endurance Non-volatile Memory segments 16 Kbytes of In-System Self-programmable Flash program memory 512 Bytes EEPROM 8-bit 1 Kbytes Internal SRAM (1)(3) Write/Erase cyles: 10,000 Flash/100,000 EEPROM Microcontroller (2)(3) Data retention: 20 years at 85C/100 years at 25C Optional Boot Code Section with Independent Lock Bits with 16K Bytes In-System Programming by On-chip Boot Program True Read-While-Write Operation In-System Programming Lock for Software Security JTAG (IEEE std. 1149.1 compliant) Interface Boundary-scan Capabilities According to the JTAG Standard Programmable Extensive On-chip Debug Support Programming of Flash, EEPROM, Fuses, and Lock Bits through the JTAG Interface Flash Peripheral Features Two 8-bit Timer/Counters with Separate Prescaler and Compare Mode One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture Mode Real Time Counter with Separate Oscillator ATmega165P Four PWM Channels 8-channel, 10-bit ADC ATmega165PV Programmable Serial USART Master/Slave SPI Serial Interface Universal Serial Interface with Start Condition Detector Programmable Watchdog Timer with Separate On-chip Oscillator On-chip Analog Comparator Preliminary Interrupt and Wake-up on Pin Change Special Microcontroller Features 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 54 Programmable I/O Lines 64-lead TQFP and 64-pad QFN/MLF Speed Grade: ATmega165PV: 0 - 4 MHz 1.8V - 5.5V, 0 - 8 MHz 2.7V - 5.5V ATmega165P: 0 - 8 MHz 2.7V - 5.5V, 0 - 16 MHz 4.5V - 5.5V Temperature range: -40C to 85C Industrial Ultra-Low Power Consumption Active Mode: 1 MHz, 1.8V: 330 A 32 kHz, 1.8V: 10 A (including Oscillator) Power-down Mode: 0.1 A at 1.8V Power-save Mode: 0.6 A at 1.8V(Including 32 kHz RTC) Notes: 1. Worst case temperature. Guaranteed after last write cycle. 2. Failure rate less than 1 ppm. 3. Characterized through accelerated tests. 8019KAVR11/10ATmega165P 1. Pin Configurations Figure 1-1. Pinout ATmega165P DNC 1 PA3 48 (RXD/PCINT0) PE0 2 PA4 47 INDEX CORNER (TXD/PCINT1) PE1 3 PA5 46 PA6 (XCK/AIN0/PCINT2) PE2 4 45 (AIN1/PCINT3) PE3 5 PA7 44 (USCK/SCL/PCINT4) PE4 6 43 PG2 (DI/SDA/PCINT5) PE5 7 42 PC7 (DO/PCINT6) PE6 8 41 PC6 (CLKO/PCINT7) PE7 9 40 PC5 (SS/PCINT8) PB0 10 39 PC4 (SCK/PCINT9) PB1 11 PC3 38 (MOSI/PCINT10) PB2 PC2 12 37 (MISO/PCINT11) PB3 13 PC1 36 PC0 (OC0A/PCINT12) PB4 14 35 (OC1A/PCINT13) PB5 15 34 PG1 (OC1B/PCINT14) PB6 16 33 PG0 Note: The large center pad underneath the QFN/MLF packages is made of metal and internally con- nected to GND. It should be soldered or glued to the board to ensure good mechanical stability. If the center pad is left unconnected, the package might loosen from the board. 1.1 Disclaimer Typical values contained in this datasheet are based on simulations and characterization of other AVR microcontrollers manufactured on the same process technology. Min and Max values will be available after the device is characterized. 2 8019KAVR11/10 17 64 AVCC (OC2A/PCINT15) PB7 18 63 (T1) PG3 GND 19 62 AREF (T0) PG4 RESET/PG5 20 61 PF0 (ADC0) 21 60 PF1 (ADC1) VCC GND 22 PF2 (ADC2) 59 23 (TOSC2) XTAL2 PF3 (ADC3) 58 (TOSC1) XTAL1 24 PF4 (ADC4/TCK) 57 25 PF5 (ADC5/TMS) (ICP1) PD0 56 (INT0) PD1 26 PF6 (ADC6/TDO) 55 27 PF7 (ADC7/TDI) PD2 54 PD3 28 GND 53 PD4 29 52 VCC PD5 30 51 PA0 PD6 50 PA1 31 PD7 49 32 PA2