How to Make and Use the Arduino As an Isp for an ATtiny 45/85

by TobaTobias in Circuits > Arduino

14278 Views, 76 Favorites, 0 Comments

How to Make and Use the Arduino As an Isp for an ATtiny 45/85

P1050623.JPG
In this instructable I will show you how you can make your own Atting programming shield for the arduino and then use the arduino as a programmer.
Usually If you don't have a shield you can do a breadboard version to program the ATtiny. (Step1)
But here I'll show you how to program it and with a couple of components make a nice shield for the arduino, which makes programming much easier!

For more information on how to program the ATtiny click on: MIT High-Low Tech web page.

Hopefully you will be familiarized with the arduino environment, if not more info at Arduino.cc
And still, it's quite easy to set everything up.





Materials

P1050625.JPG
P1050602.JPG
Well, all the things you will need to make the shield are:

X1 3mm Red LED
X1 3mm Green LED
X1 10uf 50V electrolytic capacitor
X1 8-pin 0.3" socket
X1 SPST tactile switch
X1 220 ohm resistor
X2 Male pin headers
X2 4-pin female sockets
X1 ATtiny 45 or 85

Things you might all ready have and will be needed:

Soldering Iron
Solder
Tweezers

And of course your Arduino, I made it on the Arduino UNO R2.

Explaining the Connections

P1050608.JPG
Screen-shot-2011-06-06-at-1.46.png
ATtiny45-85.png
Basically it's like this:

Green LED goes to 3.3V on the arduino.
Red LED goes to the 220 ohm resistor which goes to pin 13.
Capacitor positive lead goes to one side of the pushbutton which goes to the reset pin.

Pin 1 on the ATtiny goes to pin 10 on arduino.
Pin 4 goes to ground.
Pin 5 goes pin 11.
Pin 6 goes to pin 12 .
Pin 7 goes to pin 13.
Pin 8 goes to 5v.

And well, all negatives go to the convenient ground pin.
I got the last two images from MIT Labs, hope it helps.
 

The Software

ATtiny-Hardware-Folder.png
Start downloading the software from the MIT Webpage. The link is very clear!
Then, remember the folder called "arduino" That is in documents or in PC; My documents? Inside there there should be some sketches. Create a folder called "Hardware" and drag the ATtiny folder you downloaded before into "Hardware".

Then open the arduino environment program. When open go to files/examples/arduinoISP. Upload that sketch and you are almost ready.

*********************************************************************************************************************************************
Then when we finish the shield go to tools/board/ATtiny45/85 ( w/ arduino as ISP)         (depending on your chip)

Downloads

The Shield

P1050587.JPG
P1050586.JPG
P1050589.JPG
P1050593.JPG
P1050600.JPG
P1050606.JPG
P1050609.JPG
P1050611.JPG
P1050610.JPG
First solder the male headers on the sides. (Make shure it fits well on the arduino)
Solder the Red LED to pin 13. (Just a LED)
Solder the 220 Ohm to pin 13. 
Solder the cap to reset and ground.
Solder the push button to reset and ground. (we will use it as our reset button)
Solder the Green LED to 3.3V. (On LED)

************
Solder these pins together. --------- Solder the socket in place, anywhere there is space is ok. (We will put our chip there)
                                             T--------  Solder the female headers next to the socket as in the picture. (For prototyping)

************
Solder with wires the pins from the socket to the male headers. (So it they can travel to the arduino)

Try It

P1050613.JPG
P1050621.JPG
P1050622.JPG
Insert the shield above the arduino.
Insert the ATtiny. (In my case the 85)

After selecting the board as Arduino as ISP for the ATiny. Upload a sketch, the blink sketch. And change the digital pin on the skecth, the example comes on pin 13, but the ATtiny doesn't have pin 13. So choose between pin 1 and 8. Then upload the code.

You will see some error, but don't worry It should have worked fine.
Then on the shield or on the breadboard connect an LED.

Downloads

Wrap Up

P1050623.JPG
P1050622.JPG
So I use the ATiny to make little projects which use digital and analog pins. Because that is what the ATtiny has. It also has less memory and not all the ardunio functions will work.
Any advance on this I will upload.
You can also cut the pcb so it looks cooler on your arduino.

Write in the comments what you did.
 Thanks,
  Tobias 
   :)