I bought an Attiny85 IC recently, after watching an amazing tutorial on how to use them by GreatScott on Youtube. However, I had a hard time trying to get a simple blink code to run on it. Finally after a lot (A LOT!) of Googleing, this method is the only one that worked for me. So I decided to make a simple precise tutorial which anyone would be able to understand. Here it is





Things you will need-

1. An attiny85 or attiny45 or whichever attiny

2. An Arduino Uno

3. Some wires (ofcourse)

4. A 10uF capacitor

5. A breadboard





First things first, for this method you will require the Arduino IDE version above 1.6.3. I recommend using 1.8.3. Download it from the link below-

Once you've installed it, open the Preferences dialogue from the file menu.

And in the 'Additional Boards Manager URLs:' Simply Copy and paste this link-





Then click OK twice and then open Tools>Boards>boards manager

Then scroll down till you encounter Attiny extra boards by Leanardo Miliani, and then click on install.

Now, we upload the Arduino ISP sketch from the examples to our Arduino board,just like we would upload another code.

After uploading the code, grab your Attiny and other stuff and set up things this way-

The 10uF capacitor between the reset and gnd pin prevents the Arduino from resetting automatically.

Finally lets get the settings in place-

1. Select your board as Attiny 25/45/85.

2. Select the microcontroller from the tools as Attiny85@ 1MHz(Internal Oscillator, BOD disabled).

3. Select your port to which the Arduino is connected (just the way you always do).

4. Select your programmer -'ARDUINO AS ISP' .

5. Write some code to test it. For eg, The blink code, but we dont have pin 13 on the Attiny so change that to, 1,2 or 3.





That's the pinout for the Attiny IC, so you can decide what to put where for making cool stuff.





Now, there are lots of ways of doing this, but as of now, Only this way worked for me.

The credit for creating this method of using the Arduino as ISP goes to MIT Media Labs-HighLowTech group- http://highlowtech.org/?p=1695

And also Leonardo Miliani for making the Attiny cores that we used above- http://www.leonardomiliani.com/en/

David A Mellis was the first one to make the Attiny cores which were modified and adopted by many other programmers.

Hope this helps!

Cheers

-Siddharth