One click project with USBasp programmer

UASBASP is an efficient programmer for Atmel AVR microcontrollers that works under multiple operating systems, including Linux, Mac OS X, and windows. How to assemble this simple programmer read the previous article on this site or go to the original website of Thomas Fischl.

USBasp programmer

As it was mentioned, USBasp has two available programming frequencies – high when the jumper disconnected and low when connected. These frequencies are 375kHz and 8kHz. To use 375kHz speed, target MCU’s clock frequency must be at least 1.5MHz – four times higher than SCK. If the target is clocked with a low-speed oscillator like 32kHz, then the jumper has to be connected as it gives 8kHz SCK, which is also 4*8kHz=32kHz.

Building and preparing this programmer should not be a problem as it uses very few components. If you use 6 PIN ISP programming header, then you need a 10 to 6 adapter — Flash Atmega8 with the newest firmware found on the authors’ site. Right now latest firmware is 2007-10-23. For other details, read in the readme file.

If the device was soldered correctly, then it’s time to put it on action; first of all, connect the USBASP adapter directly to the PC USB port – avoid hubs! Install the necessary driver like it was described here. Then connect the ISP header to the target board and power it up. Now we are all set.

working USBASP adapter

Programmer supports open-source AVRDUDE programmer since version 5.2. So your latest WinAVR tolls set has it. Now let’s try to run a programmer in terminal mode. For this, go to the command line by pressing Start->Run and type cmd. In command line type:

avrdude -c usbasp -p atmega16 -P usb -t

and press enter key and see what’s happening:

USBasp_terminal_mode

Programmer reads targets signature and waits for further commands. To exit terminal mode, type quit.

When we are sure that the programmer works OK, lest set up the WinAVR project to compile and flash code just in one click. For this, you need to edit the makefile. Just use Mfile editor, which comes with WinAVR installation, and edit the following lines:

AVRDUDE_PROGRAMMER = usbasp

AVRDUDE_PORT = usb

That’s it for setting a programmer. Now select [WinAVR] Program from Programmers Notepad Tools menu and enjoy the rest – make.exe takes care of the rest: compiling, flashing, and verifying.

Last notice. Don’t expect high programming speed as it uses a firmware-only USB driver. The maximum of this programmer is up to 5kBytes/s. And it seemed that it is a little bit faster when compared to my LPT ISP programmer. I think not to speed is the primary key here, but the ability to use USB port which is the only choice in some computers, especially laptops.

6 Comments:

  1. Hi Guys,
    I have the avrdude GUI version updated for USBASP programmer, which works for windows. if intrested please post a mssg.

    Thanks.

    ~SwK

  2. I have purchased a “Atmel usbasp” programmer from Micro4you in Tiwian It was supposed to be a plug into my usb port and be used with my jeepersdx program to program an Atmega 128 card. So far I can only get my computer to reconeize that it is connected and the lite on the unit will light up but I am not able to hav the Jeepers program talk to the card. I am not that technical so I need some help. Any ideas? Please contact me via my email address.
    Thanks
    Roger

  3. Does this programmer work with AVR studio or codevision?

  4. Nice tutorials,
    🙂

    You can also use eXtreme Burner – AVR in place of avrdude because it is GUI and easy to use.

    Download it from here
    http://extremeelectronics.co.in/avr-tutorials/gui-software-for-usbasp-based-usb-avr-programmers/

Leave a Reply