Skip to main content

How to Program an ATtiny85 with an Arduino Uno

What is an ATtiny85?

ATtiny85 is a 8-bit AVR microcontroller based on AVR enhanced RISC architecture. It has an 8-pin interface (PDIP) and comes in the category of low-power microcontrollers. This microcontroller is designed and manufactured by Microchip. Know More


Set the Arduino Uno Into ISP Mode

So that the Arduino can act as a device to upload code to ATtiny85. File - Examples - Arduino ISP - ArduinoISP

Add this line #define USE_OLD_STYLE_WIRING to the code before setup()



The pins are not labelled so you will have to refer to the pinout. attiny85_pinout.jpeg Arduino --> ATtiny85

  1. 5V --> Vcc (8)
  2. GND --> GND (4)
  3. Pin 13 --> Pin 2 (7)
  4. Pin 12 --> Pin 1 (6)
  5. Pin 11 --> Pin 0 (5)
  6. Pin 10 --> Reset (1)

Only when you are uploading code to ATtiny85
Put a 10uF capacitor between GND and RESET on Arduino

Adding Attiny85 to Boards Manager

We have to make ATtiny compatible with Arduino IDE first, so that we can choose ATting85 from Tools -> Board Go to Arduino Preference

Copy the below code and paste it into Additional Boards Manager URLs, if you already have a board manager URL just add a comma before pasting. Click OK and restart Arduino IDE.

Additional Boards Manager URLs.png

Go to Tools - Board - Boards Manager, search for ATtiny, then install! attinyBoard.png

Get Started

Before uploading the code, we have to change some settings.

  1. Tools -> Board scroll to the bottom select ATtiny25/45/85
  2. Tools -> Processor--> 8 MHz (internal)
  3. Tools-->Programmer-->Arduino as ISP
  4. Check that all wiring, capacitor, and board selections are correct.


Open up a basic code and upload as usual! If it doesn't work, try Tools - Burn Bootloader