Program ATtiny85 ATtiny45 using Arduino

This post show you how to program the ATtiny micro controller using the Arduino as a ISP and why use a ATtiny instead of the Arduino for your projects. 

What is ATtiny?

The ATtiny is a series of micro-controllers, like the ATmega328 in Arduino UNO. There are many models of ATtiny, some common ones for example ATtiny85 (8 pins) and ATtiny4313 (20 pins). The only different between ATtiny and ATmega is the ATtiny is generally smaller (as the name suggests). Here is a post about how to program the ATtiny2313 and ATtiny4313 using Arduino.

In theory you can replace the Arduino with a ATtiny chip if your project requires only a few simple inputs and/or outputs. The ATtiny cost (only about $3) much less as physical space. However you will need an external hardware programmer to program the this chip. Many people might already own an Arduino and this would be perfect to turn an Arduino into a ATtiny programmer.

Programming ATtiny45, ATtiny85, ATtiny44 or ATtiny84

I found this tutorial very useful, but the following brief instruction worked for me. For a complete instruction go here.

  1. Download and install the latest Arduino software if you haven’t (note that 1.0.2 doesn’t work)
  2. Download ATtiny and Unzip it.
  3. Locate your Arduino sketchbook folder
  4. Create a new sub-folder called “hardware” in the sketchbook folder, if it doesn’t exist already.
  5. Copy the “attiny” folder (not the attiny-master folder) from the unzipped ATtiny to the “hardware” folder. You should end up with this folder structure: Documents > Arduino > hardware > attiny that contains the file boards.txt and another folder called variants.
  6. Restart the Arduino development environment. You should see ATtiny entries in the Tools > Board menu.


Now connect the electronics. They explain the connection in detail here.


And finally we can try and upload a program, we will use the “blink” sketch as an example.

  • Open the Blink sketch.
  • Change the pin numbers from 13 to 0. (Note: the pin number on the ATtiny85 is different from Arduino)
  • Select the appropriate ATtiny IC model from the Tools > Board menu
  • Select “Arduino as ISP” from the Tools > Programmer menu.
  • Upload the sketch.

You should see “Done uploading.” in the Arduino software and no error messages. If you then connect an LED between pin 0 and ground, you should see it blink on and off. Note that you may need to disconnect the LED before uploading a new program.

One thought on “Program ATtiny85 ATtiny45 using Arduino

Leave a Reply

Your email address will not be published. Required fields are marked *

Are you Robot? *

I only check blog comments once or twice a week, if you want a quick reply you can post your question on this forum You might get a faster response from me there (multirotor related only).