Opens in a new tab

ATtiny85 Pinout (DIP-8)

ATtiny85 is an 8-pin AVR for small projects – blinkers, switches, simple sensors. It has 8 kB of flash and six I/O pins, one of which is reset.

It is also known as the heart of the Digispark board, which is programmed directly over USB.

Specifications

  • 8-bit AVR up to 20 MHz, 8 MHz internal oscillator (16 MHz with PLL)
  • 8 kB flash, 512 B SRAM, 512 B EEPROM
  • 6 I/O (PB0–PB5, PB5 is reset), 4 channels of 10-bit ADC
  • USI for I2C and SPI, 2 timers, PWM on PB0, PB1 and PB4
  • 2.7–5.5 V supply (ATtiny85V from 1.8 V)

In the Arduino IDE you get it running with the ATTinyCore core and upload over ISP (USBasp, ArduinoISP). The Digispark uses the Micronucleus bootloader with USB implemented in software on PB3 and PB4.

Pinout and pin table

Hover over a pin in the diagram or a table row; use the filter to highlight a bus. You can download the pinout as PNG or SVG.

Pin names:
ATtiny85 – pinout (DIP-8)ATtiny85 – pinout (DIP-8)chiptron.eu · CC BY 4.0ATtiny85DIP-8 1 PB5 D5 ADC0 RESET 2 PB3 D3 ADC3 3 PB4 D4 PWM ADC2 4 GND 8 VCC ← Power 2.7–5.5 V (ATtiny85V from 1.8 V) 7 PB2 D2 SCL ADC1 INT0 6 PB1 D1 MISO PWM 5 PB0 D0 SDA PWM GPIO Arduino (ATTinyCore) I2C SPI ADC (analog) PWM Power Ground (GND)
Download:PNGSVG
Pin table – ATtiny85 (DIP-8)
PinNameArduino (ATTinyCore)DirectionI2CSPIPWMADCNote
1PB5D5input/outputADC0Reset – usable as GPIO only after programming the RSTDISBL fuse, but then ISP programming no longer works
2PB3D3input/outputADC3Crystal (XTAL1) – not free with an external crystal
3PB4D4input/outputPWMADC2PWM from timer 1 (OC1B); crystal (XTAL2)
4GND–
5PB0D0input/outputSDAMOSIPWMISP MOSI; USI DI / I2C SDA; PWM (OC0A); comparator AIN0; AREF
6PB1D1input/outputMISOPWMISP MISO; USI DO; PWM (OC0B, OC1A); comparator AIN1; LED on the Digispark
7PB2D2input/outputSCLSCKADC1ISP SCK; USI USCK / I2C SCL; external interrupt INT0
8VCCinputPower 2.7–5.5 V (ATtiny85V from 1.8 V)

What to watch out for

  • PB5 is RESET – usable as GPIO only after programming the RSTDISBL fuse, after which the chip can no longer be programmed over ISP (only with a high-voltage programmer).
  • On the Digispark, PB3 and PB4 are used by USB (Zener diodes and resistors) – they behave differently as inputs.
  • I2C and SPI are handled by the USI, so you need a library (TinyWireM or the Wire from ATTinyCore).
  • From the factory the chip runs at 1 MHz – for 8 MHz, set the fuses (in Arduino via “Burn Bootloader”).

More pinouts

See all pinouts on the Pinouts page.

Related Articles