Skip to main content

How to program an ATTINY 85/45 using an Arduino Uno 2017

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-
And also Leonardo Miliani for making the Attiny cores that we used above-
David A Mellis was the first one to make the Attiny cores which were modified and adopted by many other programmers.

Hope this helps!                                                                


Popular posts from this blog

5 Effective Online Tools that will Spice up your Arduino Projects!

Arduino has made electronics projects easier than ever. The question now is- Can we make the process of building projects faster and more enjoyable? Let's have a look at some of the interesting softwares/online tools developed for the Maker Community to make tinkering more effective and documenting projects easier!

1. TinkerCad

TinkerCAD's recently created circuit simulator allows you to arrange your Arduino/Attiny circuits in an easy 'drag and drop' environment and test them virtually without having to make them. This can be really helpful, for testing projects that use components which you are yet to buy. And after all, who doesn't like tinkering?

Try out Tinkercad-Circuits here!

But that's not what Tinkercad is famous for. It offers an amazingly easy to use 3D design tool for Makers, once again in a simple 'Drag and Drop' interface! You can directly download the CAD file, once you're done designing. If you've ever thought of making your own uniqu…

TV Remote Controlled Servo Motor-Using Arduino!

We use our TV remotes to control the functions of the TV's, but when the TV is not in use, they're absolutely useless. Today, we are going to learn how to add more functionality to ordinary IR based remotes, in this one we shall see how to control servo motors. There are so many (SO MANY) different applications of this project that one can think of. Using the following tutorial, you can make one yourself!

1. Watch the video tutorial-

2. Things you will need-

Note that you may use a different IR receiver other than TSOP1738, if it isn't available. Usually you can find this on websites like amazon and ebay.
3. The circuit diagram!

4. The IR Remote Library
5. The Arduino Code- Just copy paste this code into your Arduino IDE

// Written by Siddharth Kothari, Enjoy your journey Exploring Arduino!#include <IRremote.h>#include <IRremoteInt.h>#include <Servo.h>intRECV_PIN=11;//IR receiver pinintgndIR=10;/…

NetBeans Java project- TIC TAC TOE (AI) - logic explained

This article covers the basic concept of how you can implement basic AI in you game, i.e allow the computer to compete with you, giving it equal chances of winning. It's worth a thought what makes the computer invincible in a human vs computer chess game?

A common notion is that programmers code for every single possibility in the game considering all permutations and combinations etc. However this is far from reality. We can instead make the computer go by the 'Human thought process ' for every move. Lets consider a simpler approach to the popular TIC-TAC-TOE game.

Try out TIC TAC TOE here. (500 Kb executable .jar file)

Coming to the TIC-TAC-TOE GAME. This project is a great exercise for beginners to get a hang of basic logic used in games and other applications.
The logic behind the computer's moves is simpler than you think. To begin with, lets see the logical flow of code before getting into the 'code'.
Here's how the code works-

After every move yo…