Spark Logic

ATtiny45 / ATtiny85 pinout

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

PackageContactsDetails
PDIP-8 8 8 numbered contacts. See the individual package drawings for footprint dimensions.
SOIC-8 8 8 numbered contacts. See the individual package drawings for footprint dimensions.
TSSOP-8 8 8 numbered contacts. See the individual package drawings for footprint dimensions.
QFN/MLF-20 21 20 numbered contacts. The underside pad appears below the contact map. See the individual package drawings for footprint dimensions.

Microchip Technology

Device variants · PDIP-8

DeviceFlashSRAMEEPROMSupplyMax clockTemperature
ATtiny45 4 KiB 256 B 256 B — — —
ATtiny45V-10PU 4 KiB 256 B 256 B 1.8–5.5 V 10 MHz -40 to +85 °C
ATtiny45-20PU 4 KiB 256 B 256 B 2.7–5.5 V 20 MHz -40 to +85 °C
ATtiny85 8 KiB 512 B 512 B — — —
ATtiny85V-10PU 8 KiB 512 B 512 B 1.8–5.5 V 10 MHz -40 to +85 °C
ATtiny85-20PU 8 KiB 512 B 512 B 2.7–5.5 V 20 MHz -40 to +85 °C

PDIP-8 pinout

PDIP-8 · Marking side · Pin 1 at the upper left
Selected pin details

1 · PB5

Input / I/O · Reset / preset

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).

Wiring requirements

  • Serial programming (ISP). Hold RESET (PB5) low during programming. The programmer drives MOSI into PB0 and SCK into PB2. PB1 drives MISO back to the programmer.

  • RESET, GPIO or ADC0 on PB5. RESET is active by default. GPIO use requires disabling RESET via RSTDISBL and keeping debugWIRE inactive. For ADC0, check the reset threshold and internal pull-up while RESET is enabled. Active debugWIRE also uses this pad.

  • Unused GPIO. Give unused GPIO inputs a defined level. Enable the internal pull-up or use an external pull-up or pull-down if a defined level is needed during reset. Avoid a direct rail connection that could short an accidental output.

2586Q · Pinout and peripheral signal descriptions

Electrical limits · Link to this pin

Power and reset

  • Target rail
    • Bench supply positive
  • Ground
    • Bench supply return
  • Reset
100 nF per supply pair between Target rail and GroundTarget rail100 nF per supply pairGround
10 kΩ between Target rail and ResetTarget rail10 kΩReset

Connection guide

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 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

Manufacturer 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.