In this post we will learn, how to burn hex file in avr microcontroller using programmer and burner software.
List of components/software:
1. USBasp programmer
2. Target circuit board having microcontroller (mine have atmega8)
3. Avrdudes (Burner software)
Prerequisites:
USBasp driver installed in your system.
If it is not installed, then read instructions about installation from my previous post.
USBasp driver installation
Default fuse byte for atmega8a is: HFUSE = 0XC9 and LFUSE = 0X1F
This corresponds to internal rc oscillator having frequency 1 MHz
HFUSE = 0XC6 and LFUSE = 0XE4
The connections from USBasp programmer to target circuit board (atmega 8a is as follows):
List of components/software:
1. USBasp programmer
2. Target circuit board having microcontroller (mine have atmega8)
3. Avrdudes (Burner software)
Prerequisites:
USBasp driver installed in your system.
If it is not installed, then read instructions about installation from my previous post.
USBasp driver installation
Default fuse byte for atmega8a is: HFUSE = 0XC9 and LFUSE = 0X1F
This corresponds to internal rc oscillator having frequency 1 MHz
HFUSE = 0XC6 and LFUSE = 0XE4
We can use interal as well as external oscillator. For the time being, we are using internal rc oscillator having frequency 8 MHz.
First of all generate hex file using avr studio. Now find out the directory of the hex file.
Burner software |
USBasp with target circuit board |
USBasp programmer |
USBASP ATMEGA8A
VCC PIN NO. 7, 20, 21 (VCC, AREF, AVCC)
GND PIN NO. 8, 22 (GND)
RST PIN NO. 1 (RESET)
MOSI PIN NO. 17 (MOSI)
MISO PIN NO. 18 (MISO)
SCK PIN NO. 19 (SCK)
The connection is same for any other microcontroller e.g. atmega 16, atmega 32, etc.
The connection is same for any other microcontroller e.g. atmega 16, atmega 32, etc.
Download avrdudes from the below link:
Thanks for visiting this blog.
Stay tuned for more tutorials
No comments:
Post a Comment