The ATtiny boards are a great little chips. They're like Arduino boards, only really small. The reason I am making this article is because I will have a bunch of LED light controller totorials coming out that will be built with these controllers. This article will teach you how to program an ATtiny using one of two methods: the TinyProgrammer method, and the Arduino method.
ATtiny boards
There are a lot of boards in the ATtiny family. These are the most common.
The ATtiny45 and 85.
These chips are 8 pin DIP (dual inline pin) chips The ATtiny45 is an 8-bit AVR Microcontroller with 4KB of flash.
The ATtiny85 is the same but with 8KB of flash.
An ATtiny85
The ATtiny44 and 84
These chips are 14 pin DIP (dual inline pin) chips The ATtiny 44 is an 8-bit AVR Microcontroller with 4KB of flash.
The ATtiny84 is the same but with 8KB of flash.
There are low-power versions of each, called the ATtiny44A and ATtiny84A respectively.
The ATtiny84
Others
There are numerous other small microcontrollers that Atmel offers which you can find here.
Getting Ready
To get started, you are going to need the Arduino IDE. I recommend the newest version available here.
You can also follow the tutorial here for programming.
Now we will need to install the ATtiny drivers. Download the zip folder from this page. Extract the folder into the default location. find the folder called arduino 1.6.x in Program Files (x86). There should be a folder called "hardware" inside. From the unzipped folder you downloaded, copy the folder called "attiny" into the "hardware" folder. When you open the Arduino IDE, you should see an entry under the Tools -> Board menu called ATtiny.
We're not done quite yet. Now that you have selected the ATtiny entry, there is some more setup needed. Now that you have selected the ATtiny entry, you should now see the Clock and Processor menus in the tools menu. Select the clock you are using (the default on the board is the internal 1MHz clock), and select the chip you are using in the Processor menu.
Uploading
The TinyProgrammer Method
The TinyProgrammer is a small board used specifically to program the 8 pin DIP microcontrollers. It is a simple USB dongle available here for $20. If you have Windows, you will need the drivers from this page. Under the Tools -> Programmer menu, select the "USBtinyISP" option. Now, simply plug in the chip like in the picture below, plug the programmer into your computer, and upload your code.
The Arduino Method
If you have an Arduino board, you can use it to program an ATtiny chip too. You will need an Arduino board, your ATtiny chip, a 10uF capacitor, a breadboard, and some jumper wires. Now, we need to prepare your Arduino for uploading the sketch. Open the File -> Examples menu and open the sketch "ArduinoISP" sketch. Upload it to the Arduino. Now, using the ATtiny pinout below, connect the Arduino pins to the ATtiny pins with the breadboard. (If you don't know how to use a breadboard, check out this easy tutorial.)
- ATtiny pin 2 to Arduino pin 13
- ATtiny pin 1 to Arduino pin 12
- ATtiny pin 0 to Arduino pin 11
- ATtiny pin RESET to Arduino pin 10
- ATtiny pin 8 to Arduino 5v
- ATtiny pin 4 to Arduino GND
- Also, connect the capacitor between Arduino pin RESET and GND. Make sure to connect it in the right direction.
[Finished connections picture]
Now, open your code ,select all the board options, and upload!
Here is a picture of the pinouts of the rest of the common ATtiny boards.
I look forward to the rest of the tutorials I am going to make including an LED controller controlled with transmitter knobs, an LED controller with red, green, and blue controlled with seperate knobs, and adressable LED controllers. Be on the lookout for those tutorials. (They may take a while to come out with school and stuff. Maybe over the summer.)
Log In to reply
Log In to reply
Log In to reply
Log In to reply
Being a complete nube on the whole Arduino micro controller I am looking forward to this series of articles. Especially being able to turn things on and off with my transmitter. So far you explained every thing in terms that some one who does not have a degree in electronics can understand. Please keep up the good work.
Andre
Log In to reply
Log In to reply
It looks snapped off and there are parts of the remaining "legs"/ pins still on the PCB. Is it possible to buy the above from digikey, find a way to remove the broken off pins in the pcb and install the new one with manual soldering?
It looks like they could be machine installed with contacts that are on the pdb. Im also thinking of simply leave the broken pins that may have been embedded into the pcb, extend them with small guage wires (5 wires) then solder them to a new pin holder or directly into the cable i require.
Advices please?
Log In to reply
Log In to reply
Log In to reply