Skip to content
My Account

Guide

ATtiny85 Pinout

The complete pin reference for the ATtiny85: an 8-pin AVR chip with 6 GPIOs, 3 ADC channels, and no onboard USB, so it’s programmed over ISP rather than plugged straight into a computer.

  • ATtiny
  • Safety notes
  • 3 min read
No ratings yet, be the first.

Overview

The ATtiny85 is a tiny 8-bit AVR chip from Microchip (formerly Atmel), designed for minimalistic projects where size, power efficiency and simplicity matter most. It has no onboard USB or voltage regulator, just the bare chip, so it’s programmed with an external ISP programmer rather than a USB cable.

Only 6 GPIOs PB0–PB5, and PB5 doubles as RESET by default, reclaiming it needs a fuse change.
No dedicated I2C or SPI Both run over the USI (Universal Serial Interface) instead, a shared, lower-level peripheral.
Ultra-low-power sleep modes Combined with an internal oscillator, this chip can run for a long time on a coin cell.

Getting started

You’ll need an ISP programmer, either a dedicated USBasp/USBtinyISP, or another Arduino board running the “ArduinoISP” example sketch.

1. What you need An ISP programmer (or an Arduino board running ArduinoISP), 4 jumper wires, and a breadboard.
2. Install the software Install the free Arduino IDE, then add ATtiny support via Boards Manager (search “attiny”, ATTinyCore by Spence Konde is the most maintained option).
3. Upload your first sketch Select ATtiny25/45/85 as the board, pick “8 MHz internal” as the clock, choose your programmer, then “Upload Using Programmer”, not the normal Upload button.

Hello World: blink an LED

The microcontroller equivalent of “Hello World”: PB0 toggles once a second. Wire an LED (with a resistor) to physical pin 5 (PB0), Arduino pin 0 in ATTinyCore’s standard numbering.

#include <avr/io.h>
#include <util/delay.h>

int main(void)
{
    DDRB |= (1 << PB0);   // PB0 as output
    while (1) {
        PORTB |= (1 << PB0);   // on        _delay_ms(1000);
        PORTB &= ~(1 << PB0); // off        _delay_ms(1000);
    }
}

AVR-GCC: build with avr-gcc and flash with avrdude over ISP. Arduino IDE: select “Upload Using Programmer”, see “Getting started” above.

Specifications

Official specifications for the ATtiny85.

Compute

CPU8-bit RISC AVR, up to 20 MHz
Flash8 KB
SRAM512 B
EEPROM512 B

Peripherals

ADC3 channels, 10-bit
Timers1× 8-bit, 1× 16-bit, PWM output
I2C / SPIVia USI (no dedicated hardware)

Physical

Operating voltage2.7V – 5.5V
PackageDIP-8, SOIC, QFN
Internal clock1, 8 or 16 MHz
ATtiny85 SOIC-8 package dimensioned top view: 10.16 by 4.83 mm body, 7.11 mm lead span, 8-pin header at 2.54 mm pitch

Pinout diagram

The DIP-8 pinout with every alternate function per pin.

ATtiny85 pinout diagram

Pin reference

Pin Name Functions
1 PB5 RESET, ADC0, dW (debugWire), digital I/O
2 PB3 ADC3, CLKI, digital I/O
3 PB4 ADC2, digital I/O
4 GND Ground
5 PB0 MOSI, PWM (OC0A), digital I/O
6 PB1 MISO, PWM (OC0B), ADC1, digital I/O
7 PB2 SCK, ADC1, INT0, digital I/O
8 Vcc Power supply (2.7V – 5.5V)

Programming (ISP)

The 6-pin ISP header maps to these ATtiny85 pins.

Function Pin Description
MOSIPB0Programmer → chip
MISOPB1Chip → programmer
SCKPB2Clock signal
RESETPB5Controls flash programming mode

Safety notes

Before you wire anything up

  • PB5 is RESET by default, using it as a plain GPIO requires disabling reset via a fuse, which then means you need a high-voltage programmer to ever reprogram the chip again.
  • PB0–PB2 are shared with the ISP header, avoid connecting anything to them that would interfere with programming (like a always-on pull-down).
  • This chip runs from 2.7V to 5.5V, check your programmer’s logic level matches what you intend to run the chip at.
Advertisement
All guides

More guides

Keep building.

From ESP32 HomeKit accessories to Arduino and ATtiny reference guides, there’s more where this came from.

All guides