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
TSSOP-8 8 contacts

QFN/MLF-20

21 contacts Current package

Microchip Technology · 20 numbered contacts. The underside pad appears below the contact map. See the individual package drawings for footprint dimensions.

8 KiB flash · 512 B SRAM · 512 B EEPROM · 1.8–5.5 V · 10 MHz maximum · -40 to +85 °C

QFN/MLF-20 pinout

Top view · Pin 1 at the upper left · Schematic outline
EP is the exposed center pad on the underside.
Selected pin details

EP · EP

Ground pad · Ground

Solder the exposed center pad to ground as shown in the package pinout notes. Connect the numbered ground contacts too.

2586Q · Package drawing

Electrical limits · Link to this pin

All 21 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).
3DNC ReservedReserved Leave this package contact electrically unconnected.
4DNC ReservedReserved Leave this package contact electrically unconnected.
5PB4 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: ADC2 (ADC), PCINT4 (EXINT), OC1B (TC1).
6DNC ReservedReserved Leave this package contact electrically unconnected.
7DNC ReservedReserved Leave this package contact electrically unconnected.
8GND ReturnReturn Supply return. Connect every ground pin.
9DNC ReservedReserved Leave this package contact electrically unconnected.
10DNC ReservedReserved Leave this package contact electrically unconnected.
11PB0 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: AIN0 (AC), AREF (ADC), SDA (USI), DI (USI), PCINT0 (EXINT), OC0A (TC0), OC1AINV (TC1).
12PB1 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: AIN1 (AC), DO (USI), PCINT1 (EXINT), OC0B (TC0), OC1A (TC1).
13DNC ReservedReserved Leave this package contact electrically unconnected.
14PB2 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: ADC1 (ADC), SCL (USI), USCK (USI), PCINT2 (EXINT), INT0 (EXINT), T0 (TC0).
15VCC SupplySupply Digital supply. Connect every VCC pin and place a local 100 nF ceramic bypass close to each VCC-to-ground pair.
16DNC ReservedReserved Leave this package contact electrically unconnected.
17DNC ReservedReserved Leave this package contact electrically unconnected.
18DNC ReservedReserved Leave this package contact electrically unconnected.
19DNC ReservedReserved Leave this package contact electrically unconnected.
20DNC ReservedReserved Leave this package contact electrically unconnected.
EPEP Ground padGround pad Solder the exposed center pad to ground as shown in the package pinout notes. Connect the numbered ground contacts too.

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
Supply and clock grade1.8–5.5 V · 10 MHz maximum1.8–5.5 V · 10 MHz maximum Up to 4 MHz at 1.8 V and 10 MHz at 2.7 V. 2586Q · Speed grades and ordering information
Ambient temperature grade-40 to +85 °C-40 to +85 °C For this order code. Verify silicon revision and errata in the current manufacturer documentation. 2586Q · Ordering information
Program flash8 KiB8 KiB Nonvolatile program memory. 2586Q · Memory
SRAM512 B512 B Volatile data and stack storage. 2586Q · Memory
EEPROM512 B512 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-10MU
4 KiB flash · 256 B SRAM · 256 B EEPROM · 1.8–5.5 V · 10 MHz maximum · -40 to +85 °C
ATtiny45V-10MUR
4 KiB flash · 256 B SRAM · 256 B EEPROM · 1.8–5.5 V · 10 MHz maximum · -40 to +85 °C
ATtiny45-20MU
4 KiB flash · 256 B SRAM · 256 B EEPROM · 2.7–5.5 V · 20 MHz maximum · -40 to +85 °C
ATtiny45-20MUR
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-10MU
8 KiB flash · 512 B SRAM · 512 B EEPROM · 1.8–5.5 V · 10 MHz maximum · -40 to +85 °C
ATtiny85V-10MUR
8 KiB flash · 512 B SRAM · 512 B EEPROM · 1.8–5.5 V · 10 MHz maximum · -40 to +85 °C
ATtiny85-20MU
8 KiB flash · 512 B SRAM · 512 B EEPROM · 2.7–5.5 V · 20 MHz maximum · -40 to +85 °C
ATtiny85-20MUR
8 KiB flash · 512 B SRAM · 512 B EEPROM · 2.7–5.5 V · 20 MHz maximum · -40 to +85 °C