By using USBasp, we are able to download the program directly to the Arduino Duemilanove board or others AVR microcontroller without pre-program bootloader. AVR USBasp is a USB in-circuit programmer and it can use to program most of the ATmel AVR controllers. It simply consist of an ATMega8 and a couple of passive components such as resistors, capacitors, LEDs and ect. The programmer uses a firmware-only USB driver and there is no special USB controller is needed. In this tutorial, we will show how to modified the Arduino Software so that you can use it to program AVR microcontrollers without pre-program bootloader.
How to use it
By using AVR USBasp, we need to have a PC and a Atmel AVR controller’s board. The USB type A of the AVR USBasp is connect to the PC and the 10 ways programmer pins connect to the microcontroller’s board. After that, we can load the program to the microcontroller from the PC through AVR USBasp.
There is a lot of project that you can use this programmer, in this stage, we will shows how to program a LED blinking using this programmer to load the program from the PC to Arduino Duemilanove board. The steps is given below:
1. The first is to modified the software that we need to use which is the arduino software. For arduino software, you can download it on this website: http://arduino.cc/en/Main/Software. After you have installed the arduino software to your PC, do not open the software first. Goto C:, click Tools > Folder Opetion > View, and tick the column which show “show hidden files and folder” then click apply and ok.Afterthat, go to C:\Documents and Settings\”user”\Application Data\Arduino. Open the file preferences.txt. Find the sentence upload.using = bootloader, and change it to upload.using = usbasp.
After replace it, save it and close it. next, open the folder of the software arduino which you have installed at the beginning. Open Folder …\hardware\arduino. Then open the text file programmers.txt and add another 2 lines at below of the last sentence in the text file:
The last step is save and close the text file, then open back the arduino softare “Arduino.exe” and you can write your program in it and load it to your microcontroller using AVR USBasp.
2. After the modification of the software, we can now program the LED blinking in to the Arduino Duemilanove board.( during the process of burning the program in the microcontroller of the board, we do not need to use the bootloader’s program in it )
First, do some wiring on the connection of AVR USBasp with Arduino Duemilanove board. The female to female jumper connectors are not include in the product AVR USBasp. The female to female jumperconnectors are selling in Cytron, you can visit this website
Secondly, connect the AVR USBasp to the USB port of the PC.
Thirdly, open the arduino software “Arduino.exe” to load the program into the Arduino Duemilanove board. Normally, when we want to program the programming into Arduino board, we need to program the bootloader progrmming first, but for this case, we are using the programmer of AVR USBasp, so we will no need to program the bootloader program into the Arduino board and direct program the LED programming into it. There are several steps show how to use USBasp to program the board of Arduino Duemilanove.
a. Open the arduino software “Arduino.exe”
b. Next, we need to call out the example of the source code by click on the Files > Examples > Basics > Blink. Then the source code of LED blinking will pop out in few seconds.
c. The last step is to click on the Upload which appears on the page of LED blink’s source code to load the program to the microcontroller.
d. This is the output of LED blinking on the Arduino board.
For more information, you can refer to the reference below.
* If you needed faster response from author, please do post your inquiry/suggestion in our technical forumas we seldom check tutorial comment section.