Programming ATtiny85 with USB ASP Programmer
Overview:
Hi curious Engineers, In this project we are getting started with the AVR microcontroller programming If you are aware of Arduino platform it is just open source hardware build with AVR microcontroller (ATmega328P to be precise). But in this project unlike in arduino programming where we program the ATmega328P microcontroller with serial bootloder that is burned in the flash. we are going to program the ATtiny85 microcontroller by making use of the SPI interface by a technique called ICSP(In Circuit System Programming) using USB-ASP(USB AVR Serial Programmer) programmer. without further due Lets commence
Components Required:
- ATtiny85 Microcontroller
- USB ASP Programmer
- LED
- 470 Ohm Resistor
- Jumper Wires
- Breadboard
Software Requirements:
- AVR Studio 7 / Microchip Studio
- avrdude
Procedure:
- Open Atmel Studio / Microchip Studio and Create a new project File->New Project
- Type the following code and build project
/** ATtiny85_Blink_GCC_simple.c** Created: 24-11-2020 11:23:08* Author : Brinth*/#define F_CPU 1000000UL#include <avr/io.h>#include <util/delay.h>int main(void){/* Replace with your application code */DDRB = 0b00010000;while (1){PORTB = 0b00010000;_delay_ms(1000);PORTB = 0x00;_delay_ms(1000);}}
- Make connections as shown below
- Navigate to the Debug folder in the project and copy the avrdude and avrdude.conf file in the same folder (just to make the file path arguments simple while using avrdude)
- Type the following command
avrdude.exe -C "avrdude.conf" -p t85 -c usbasp-clone -v -U flash:w:''filename.hex':i
- If there is no problem following the steps above you have now successfully programmed your ATtiny85 with the firmware
Comments
Post a Comment