Spark Logic

ATtiny45 / ATtiny85 pinout

Package pin assignments for ATtiny45, ATtiny85, with peripheral signals, clock grades and a serial programming guide.

PDIP-8 8 contacts

SOIC-8

8 contacts Current package
TSSOP-8 8 contacts
QFN/MLF-20 21 contacts

Microchip Technology · 8 numbered contacts. See the individual package drawings for footprint dimensions.

SOIC-8 pinout

Top view · Pin 1 at the upper left · Schematic outline
Selected pin details

4 · GND

Return · Ground

Supply return. Connect every ground pin.

2586Q · Pinout and peripheral signal descriptions

Electrical limits · Link to this pin

All 8 pins

PinSignalDirectionFunction
1PB5 Input / I/OInput / I/O Active-low reset input by default. Use as GPIO only where the reset-disable fuse is supported and configured. Alternate assignments: ADC0 (ADC), PCINT5 (EXINT).
2PB3 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT3 (EXINT), OC1BINV (TC1).
3PB4 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: ADC2 (ADC), PCINT4 (EXINT), OC1B (TC1).
4GND ReturnReturn Supply return. Connect every ground pin.
5PB0 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: AIN0 (AC), AREF (ADC), SDA (USI), DI (USI), PCINT0 (EXINT), OC0A (TC0), OC1AINV (TC1).
6PB1 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: AIN1 (AC), DO (USI), PCINT1 (EXINT), OC0B (TC0), OC1A (TC1).
7PB2 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: ADC1 (ADC), SCL (USI), USCK (USI), PCINT2 (EXINT), INT0 (EXINT), T0 (TC0).
8VCC SupplySupply Digital supply. Connect every VCC pin and place a local 100 nF ceramic bypass close to each VCC-to-ground pair.

Signal assignments

Analog comparator

Review each signal assignment and the peripheral enable conditions in the data sheet. AIN1 → PB1 · AIN0 → PB0

Analog-to-digital converter

Select the analog channel and reference in firmware. The reference choice and supply constrain the input range. ADC0 → PB5 · ADC1 → PB2 · ADC2 → PB4 · AREF → PB0

Universal Serial Interface

Firmware sets the Universal Serial Interface to two-wire or three-wire operation and handles protocol state. The programming interface has its own direction assignments. SDA → PB0 · SCL → PB2 · DI → PB0 · DO → PB1 · USCK → PB2

External interrupts

Review each signal assignment and the peripheral enable conditions in the data sheet. PCINT0 → PB0 · PCINT1 → PB1 · PCINT2 → PB2 · PCINT3 → PB3 · PCINT4 → PB4 · PCINT5 → PB5 · INT0 → PB2

Timer/Counter 0

Review each signal assignment and the peripheral enable conditions in the data sheet. T0 → PB2 · OC0B → PB1 · OC0A → PB0

Timer/Counter 1

Review each signal assignment and the peripheral enable conditions in the data sheet. OC1B → PB4 · OC1BINV → PB3 · OC1A → PB1 · OC1AINV → PB0

Electrical limits

ParameterLimitConditions and source
Program flash4 KiB4 KiB Nonvolatile program memory. 2586Q · Memory
SRAM256 B256 B Volatile data and stack storage. 2586Q · Memory
EEPROM256 B256 B Nonvolatile data storage. 2586Q · Memory
Clock and supplyOrder-code dependentOrder-code dependent Use the grade table and the device’s speed-versus-voltage curve. 2586Q · Electrical Characteristics

Models and documents

Each package lists the documented order codes and variants covered by this map. Select the marked model to see its peripheral assignments and memory. Check the exact order code and datasheet revision before laying out a PCB.

ATtiny45
4 KiB flash · 256 B SRAM · 256 B EEPROM. Choose the marked order code for voltage, clock, and temperature.
ATtiny45V-10SU
4 KiB flash · 256 B SRAM · 256 B EEPROM · 1.8–5.5 V · 10 MHz maximum · -40 to +85 °C
ATtiny45V-10SUR
4 KiB flash · 256 B SRAM · 256 B EEPROM · 1.8–5.5 V · 10 MHz maximum · -40 to +85 °C
ATtiny45V-10SH
4 KiB flash · 256 B SRAM · 256 B EEPROM · 1.8–5.5 V · 10 MHz maximum · -40 to +85 °C
ATtiny45V-10SHR
4 KiB flash · 256 B SRAM · 256 B EEPROM · 1.8–5.5 V · 10 MHz maximum · -40 to +85 °C
ATtiny45-20SU
4 KiB flash · 256 B SRAM · 256 B EEPROM · 2.7–5.5 V · 20 MHz maximum · -40 to +85 °C
ATtiny45-20SUR
4 KiB flash · 256 B SRAM · 256 B EEPROM · 2.7–5.5 V · 20 MHz maximum · -40 to +85 °C
ATtiny45-20SH
4 KiB flash · 256 B SRAM · 256 B EEPROM · 2.7–5.5 V · 20 MHz maximum · -40 to +85 °C
ATtiny45-20SHR
4 KiB flash · 256 B SRAM · 256 B EEPROM · 2.7–5.5 V · 20 MHz maximum · -40 to +85 °C
ATtiny85
8 KiB flash · 512 B SRAM · 512 B EEPROM. Choose the marked order code for voltage, clock, and temperature.
ATtiny85V-10SU
8 KiB flash · 512 B SRAM · 512 B EEPROM · 1.8–5.5 V · 10 MHz maximum · -40 to +85 °C
ATtiny85V-10SUR
8 KiB flash · 512 B SRAM · 512 B EEPROM · 1.8–5.5 V · 10 MHz maximum · -40 to +85 °C
ATtiny85V-10SH
8 KiB flash · 512 B SRAM · 512 B EEPROM · 1.8–5.5 V · 10 MHz maximum · -40 to +85 °C
ATtiny85V-10SHR
8 KiB flash · 512 B SRAM · 512 B EEPROM · 1.8–5.5 V · 10 MHz maximum · -40 to +85 °C
ATtiny85-20SU
8 KiB flash · 512 B SRAM · 512 B EEPROM · 2.7–5.5 V · 20 MHz maximum · -40 to +85 °C
ATtiny85-20SUR
8 KiB flash · 512 B SRAM · 512 B EEPROM · 2.7–5.5 V · 20 MHz maximum · -40 to +85 °C
ATtiny85-20SH
8 KiB flash · 512 B SRAM · 512 B EEPROM · 2.7–5.5 V · 20 MHz maximum · -40 to +85 °C
ATtiny85-20SHR
8 KiB flash · 512 B SRAM · 512 B EEPROM · 2.7–5.5 V · 20 MHz maximum · -40 to +85 °C