# ATtiny2313 20-Pin 8-Bit AVR Microcontroller

- **Manufacturer**: Microchip / Atmel
- **Type**: Chip
- **Year**: 2003
- **URL (German)**: https://pinoutdb.org/component/attiny2313
- **URL (English)**: https://pinoutdb.org/en/component/attiny2313
- **Description**: 20-pin low-power CMOS 8-bit AVR microcontroller with 2KB In-System Programmable Flash, 128 bytes EEPROM, 128 bytes SRAM, full duplex USART, and SPI master/slave.
- **Datasheets & Links**:
  - [Microchip ATtiny2313A Datasheet (PDF)](https://ww1.microchip.com/downloads/en/DeviceDoc/doc8246.pdf) (datasheet)

## View: DIP-20 Top View (Package: dip)

| Pin | Signal Name | Type | Alternative Functions / Description |
| :--- | :--- | :--- | :--- |
| 1 | PA2 (~RESET) | Digital | Port A Bit 2 / Master Reset (Active Low) / debugWIRE [Reset] |
| 2 | PD0 (RXD) | Digital | Port D Bit 0 / USART Receive Data Input [Digital] |
| 3 | PD1 (TXD) | Digital | Port D Bit 1 / USART Transmit Data Output [Digital] |
| 4 | PA1 (XTAL2) | Digital | Port A Bit 1 / Crystal Oscillator Pin 2 [Clock] |
| 5 | PA0 (XTAL1) | Digital | Port A Bit 0 / Crystal Oscillator Pin 1 / Clock Input [Clock] |
| 6 | PD2 (INT0) | Digital | Port D Bit 2 / External Interrupt 0 [Digital] |
| 7 | PD3 (INT1) | Digital | Port D Bit 3 / External Interrupt 1 [Digital] |
| 8 | PD4 (T0) | Digital | Port D Bit 4 / Timer 0 Clock Input [Digital] |
| 9 | PD5 (OC0B/T1) | Digital | Port D Bit 5 / Timer 0 Compare Match B / Timer 1 Clock [Digital] |
| 10 | GND | Ground | System Ground (0V) [Ground] |
| 11 | PD6 (ICP) | Digital | Port D Bit 6 / Timer 1 Input Capture Pin [Digital] |
| 12 | PB0 (AIN0) | Analog | Port B Bit 0 / Analog Comparator Positive Input [Analog] |
| 13 | PB1 (AIN1) | Analog | Port B Bit 1 / Analog Comparator Negative Input [Analog] |
| 14 | PB2 (OC0A) | Digital | Port B Bit 2 / Timer 0 Compare Match A [Digital] |
| 15 | PB3 (OC1A) | Digital | Port B Bit 3 / Timer 1 Compare Match A Output [Digital] |
| 16 | PB4 (OC1B) | Digital | Port B Bit 4 / Timer 1 Compare Match B Output [Digital] |
| 17 | PB5 (MOSI) | Digital | Port B Bit 5 / SPI Master Out Slave In / USI Data Input [Digital] |
| 18 | PB6 (MISO) | Digital | Port B Bit 6 / SPI Master In Slave Out / USI Data Output [Digital] |
| 19 | PB7 (SCK) | Digital | Port B Bit 7 / SPI Serial Clock / USI Clock [Clock] |
| 20 | VCC | Power | Supply Voltage (+1.8V to +5.5V) [Power] |


---
Source: PinoutDatabase (https://pinoutdb.org). Verify against the manufacturer datasheet before production use.
