You are on page 1of 6

How to program Arduino by using USBasp without bootloader

http://tutorial.cytron.com.my/2011/09/30/how-to-program-arduino-by-using-avr-usbasp-programmer/

Introduction
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 controllers board. The USB type A of the AVR USBasp is connect to the PC and the 10 ways programmer pins connect to the microcontrollers 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 step 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: USBasp.name=USBasp USBasp.protocol=usbasp 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 bootloaders 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 jumper connectors are selling in Cytron, you can visit this website http://www.cytron.com.my/viewProduct.php?pcode=WR-JWFF10&name=Female%20to%20Female%20Jumper%20Wire

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 blinks 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 forum as we seldom check tutorial comment section.

You might also like