The Random Thoughts of a Geek heading for Banbury
The Random Thoughts of a Geek heading for Banbury

How to program the ATtiny85 using an Arduino Uno

Programing an ATtiny85 with an Arduino Uno
Programing an ATtiny85 with an Arduino Uno

Normaly I would use a cheap chineese clone, but I had an official Arduino Uno available, The process should be the same no matter which you use.

Now given that an Chineese clone of the Uno is about £3 you may wonder why you would want to use a £1.20 ATtiny85? While the ATtiny85 has a very limited amount of resources available, it is perfect for embedding into tiny projects where there are no requirments for the additional pins, ram, etc.

ATtiny45/85 pinout
ATtiny45/85 pinout

Configuring Arduino Uno as a ISP (In-System Programming)

To program the ATtiny85 we need to first set Arduino Uno in ISP mode. Connect your Arduino Uno to the PC. Open Arduino IDE and open the ArduinoISP example file (File > Examples > ArduinoISP) and upload it.

Adding ATtiny85 Support to Arduino IDE

By default the Arduino IDE doesn’t support ATtiny85,

  1. we need to add the ATtiny boards to Arduino IDE. Open File -> Preferences and in the Additional Boards Manager URLs give this url
  2. After this is done open Tools > Board > Board Manager
  3. After opening Board Manager scroll down the list where it says attiny by Davis A. Mellis. Click on that and install it.
  4. After installing now you would be able to see a new entry in the Board menu.

Connecting ATtiny85 with Arduino Uno

Now with all the above things ready we will start programming the attiny85. Connect the arduino uno to attiny85 using breadboard as below.

Arduino Uno – ATtiny85

  • 5V – Vcc
  • Gnd – Gnd
  • Pin 13 – Pin 2
  • Pin 12 – Pin 1
  • Pin 11 – Pin 0
  • Pin 10 – Reset
Wiring up the ATtiny to the Uno
Wiring up the ATtiny to the Uno

Uploading program to ATtiny85

  1. Now back to Arduino IDE. Select ATtiny25/45/85 under Tools > Board.
  2. Then select ATtiny85 under Tools > Processor.
  3. And select 8 MHz (internal) under Tools > Clock.
  4. Then make sure Arduino as ISP is selected under Tools > Programmer
  5. You will need to Burn the Bootloader. Tools > Burn Bootloader
Neopixle ring on Pin 3
Neopixle ring on Pin 3

Now you will be able to upload any files you want 🙂

I have pluged a little Neopixle ring into ATiny85 Pin 2 / Arduino IDE  Pin 3 and flashed the strandtest code from the Adafruit NeoPixle Library:

Leave a comment

Your email address will not be published.