In the previous tutorial, we learned we need the following hardware and software tools to build any application using ATtiny85.
- Arduino IDE software
- USB SPI AVR programmer
- PROGISP software
So let us build the first LED blinking, “hello world” application for the ATtiny85 microcontroller.
- Open Arduino IDE. Open LED blinking example from
file->example->basic->blink - Modify the program as follows:
We use PORTB pin 0 (PB0) – that means digital pin 0 (PIN 5) of ATtiny85.
- Now from the tools menu
- select board: ATtiny25/45/85
- select processor: ATtiny85
- select clock: internal 1 MHz
- To create a HEX file for the program, go to preferences and tick the compilation check box from the file menu. Click OK
- Now compile/verify the program. This will create a HEX file at a particular location in your PC local HDD
- now make the following connection between USB SPI AVR programmer and ATtiny85 microcontroller using jumper wires
- Plug the programmer into the USB port of the PC/laptop
- Now open PROGISP software
- In PROGISP, open the file menu and select load Flash. Get LED blinking program HEX file
- Select chip as ATtiny85 and finally click Auto button to download the program
- Now disconnect all other connections keeping only Vcc and Gnd connection to provide 5 V to chip
- Connect LED to pin 5 as shown in the figure with a current limiting resistor of 330 Ω
You can see the LED will start blinking at a rate of 1 Hz.
We have completed the first application – Hello World – LED blinking using ATtiny85.
And now we all are ready to build different applications using ATtiny85. In all these upcoming tutorials, you will learn:
- to take analog input
- to get analog output
- to interface analog / digital sensor
- to interface RGB LED
- to control DC motor speed
- to interface Bluetooth module HC05 and send and receive data
Just go through them one by one and follow the same above step by step procedure.
You may also like:
Filed Under: Featured Contributions
Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.