Features High Performance, Low Power AVR 8-Bit Microcontroller Advanced RISC Architecture 120 Powerful Instructions Most Single Clock Cycle Execution 32 x 8 General Purpose Working Registers Fully Static Operation Up to 20 MIPS Throughput at 20 MHz Data and Non-volatile Program and Data Memories 2/4K Bytes of In-System Self Programmable Flash 8-bit Endurance 10,000 Write/Erase Cycles 128/256 Bytes In-System Programmable EEPROM Microcontroller Endurance: 100,000 Write/Erase Cycles 128/256 Bytes Internal SRAM with 2/4K Bytes Programming Lock for Flash Program and EEPROM Data Security Peripheral Features In-System One 8-bit Timer/Counter with Separate Prescaler and Compare Mode One 16-bit Timer/Counter with Separate Prescaler, Compare and Capture Modes Programmable Four PWM Channels On-chip Analog Comparator Flash Programmable Watchdog Timer with On-chip Oscillator USI Universal Serial Interface Full Duplex USART ATtiny2313A Special Microcontroller Features debugWIRE On-chip Debugging ATtiny4313 In-System Programmable via SPI Port External and Internal Interrupt Sources Low-power Idle, Power-down, and Standby Modes Enhanced Power-on Reset Circuit Programmable Brown-out Detection Circuit Internal Calibrated Oscillator I/O and Packages 18 Programmable I/O Lines 20-pin PDIP, 20-pin SOIC, 20-pad MLF/VQFN Operating Voltage 1.8 5.5V Speed Grades 0 4 MHz 1.8 5.5V 0 10 MHz 2.7 5.5V 0 20 MHz 4.5 5.5V Industrial Temperature Range: -40C to +85C Low Power Consumption Active Mode 190 A at 1.8V and 1MHz Idle Mode 24 A at 1.8V and 1MHz Power-down Mode 0.1 A at 1.8V and +25C Rev. 8246BAVR09/111. Pin Configurations Figure 1-1. Pinout ATtiny2313A/4313 PDIP/SOIC VCC (PCINT10/RESET/dW) PA2 1 20 PB7 (USCK/SCL/SCK/PCINT7) (PCINT11/RXD) PD0 2 19 3 18 PB6 (MISO/DO/PCINT6) (PCINT12/TXD) PD1 4 17 PB5 (MOSI/DI/SDA/PCINT5) (PCINT9/XTAL2) PA1 5 16 PB4 (OC1B/PCINT4) (PCINT8/CLKI/XTAL1) PA0 6 15 PB3 (OC1A/PCINT3) (PCINT13/CKOUT/XCK/INT0) PD2 7 14 PB2 (OC0A/PCINT2) (PCINT14/INT1) PD3 8 13 PB1 (AIN1/PCINT1) (PCINT15/T0) PD4 9 12 PB0 (AIN0/PCINT0) (PCINT16/OC0B/T1) PD5 10 11 PD6 (ICPI/PCINT17) GND MLF/VQFN (PCINT12/TXD) PD1 1 15 PB5 (MOSI/DI/SDA/PCINT5) (PCINT9/XTAL2) PA1 2 14 PB4 (OC1B/PCINT4) (PCINT8/CLKI/XTAL1) PA0 3 13 PB3 (OC1A/PCINT3) (PCINT13/CKOUT/XCK/INT0) PD2 4 12 PB2 (OC0A/PCINT2) (PCINT14/INT1) PD3 5 11 PB1 (AIN1/PCINT1) NOTE: Bottom pad should be soldered to ground. 2 ATtiny2313A/4313 8246BAVR09/11 (PCINT15/T0) PD4 6 20 PD0 (RXD/PCINT11) (PCINT16/OC0B/T1) PD5 7 19 PA2 (RESET/dW/PCINT10) GND 8 18 VCC (PCINT17/ICPI) PD6 9 17 PB7 (USCK/SCL/SCK/PCINT7) (AIN0/PCINT0) PB0 10 16 PB6 (MISO/DO/PCINT6)