Program ATTiny with arduino as ISP. 

In this post I will describe how to program on ATTiny with Arduino. In this exemple, I’m going to use a ATTiny 45. Anyway the process is the same for ATTiny 85.

Needed Hardware

ArduinoUno_r2_front450px

Arduino Uno

Price: less than $30 (Amazon)

 


ATTiny 45
Price: around $2 (Amazon)

Load the Arduino ISP program to a classical arduino Uno.

open the ArduinoISP example

Capture d’écran 2015-04-30 à 17.57.28

I’m going to use a Arduino Uno as programmer. Choose it from Board Menu

Capture d’écran 2015-04-30 à 17.59.01

Also select the right serial port and then upload the code to the Arduino Uno.

Capture d’écran 2015-04-30 à 18.00.43

Now your Arduino uno is ready to be used as a programmer.

Wire ATTiny45 to the Arduino  Uno

ATTminy45

ATTminy45_schema

10uF capacitor it used to prevent the Arduino Uno from resetting and ensures that the Arduino IDE talks to the ArduinoISP (and not the bootloader) during the upload of the sketches to the ATTiny.

Upload Blink test to the ATTiny

First of all, we need to install ATTiny support to Arduino:

  • Download ATTiny librairies : https://github.com/damellis/attiny/archive/master.zip
  • Unzip this file and copy paste the content you Arduino Sketckbook location in a subfolder called hardware.

Capture d’écran 2015-04-30 à 19.08.36

Capture d’écran 2015-04-30 à 19.10.09

  • restart your arduino IDE
  • look at Tools > board, you can know view ATTiny boards

Capture d’écran 2015-04-30 à 19.10.54

Now, we are going to load the Blink test on ATTiny

Choose ATTiny 45 (1mhtz)

Capture d’écran 2015-04-30 à 19.13.01

Load Blink example

Capture d’écran 2015-04-30 à 19.13.50

Modify it to use the 3 (Pin 13 does not exist on ATTiny45)

Capture d’écran 2015-04-30 à 19.14.38

Select you Arduino AS ISP to program your ATTiny

Capture d’écran 2015-04-30 à 19.16.02

 

Let’s start to load this program. To see it work you have to add a led on ATtiny pin 3:ATTiny45_led

 

Enjoy looking at the blinking led.

 

Sources

http://www.instructables.com/id/Program-an-ATtiny-with-Arduino/?ALLSTEPS

http://42bots.com/tutorials/programming-attiny84-attiny44-with-arduino-uno/

1 Comments

  1. I think you are confused. In this tutorial, you are using the Arduino UNO as an ISP programmer. You are not loading a boot loader on to the Attiny. You are programming the ATtiny with an Arduino Uno.

    Reply

Leave a Comment.