Building and installing USBASP-USB programmer of AVR microcontrollers

USBASP is well known USB programmer for Atmel AVR microcontrollers originally supported by Thomas Fischl. USB ASP is made of an Atmega8 and few components. The programmer uses a firmware driver that makes this programmer attractive to many amateurs.

Another thin why this programmer is so popular – because it is officially included and supported in WinAVR (now version 20070122).

Once again lets see what this programmer is made off and how to set it up.

Original circuit you will find in authors site: http://www.fischl.de/usbasp/

usb_asp_cir_thumb.png

 

The core of USBASP adapter is Atmega8 microcontroller clocked by 12MHz crystal. Soldered board is ready to be connected via simple USB cable with B type connector (Computer side needs A type of connector). Resistors R2 and R6 are current limiting resistors, that protect computer USB port. Resistor R7 helps computer to recognize device as LS (Low Speed). Diodes D1 and D2 indicates about data transfer. Header SV1 is compatible with STK200/300 just 4 and 6 pins are used for RXD and TXD (may be used for other purposes).

STK200.png

 

SCK signal can work at two frequencies 1.5MHz and 8MHz 375kHz and 8kHz which can be selected by Jumper JP3. If Jumper is unconnected, then SCK speed is 8MHz 375kHz. Low speed SCK is used when MCU is clocked with low speed oscillator like 32kHz.

USB_ASP_block.png

 

Jumper JP1 is used for programming adapter itself via ISP adapter. And last Jumper JP2 is used for powering adapter from USB port (not recommended).

This is how my adapter looks like:

USBASP_Device_close.jpg

 

To make this adapter work you need to program Atmega8 with driver firmware which can be downloaded from http://www.fischl.de/usbasp/ page (usbasp.2006-12-29.tar.gz -118 kB).

Few words about setting up USBASP adapter for work in Windows XP system.

After firmware is uploaded, then connect USB cable to adapter.

  • Connect cable directly to USB port of computer avoiding Hubs (in my case computer didn’t detect adapter connected through hub);

  • Wait for windows information “New Hardware Found USBASP”. If device isnt detected, check the board for errors and reconnect again;

  • After device is detected Driver setup wizard opens. Select where USBASP driver is located. It is in directory you’ve downloaded with firmware. If you unpacked in C: drive, than driver should be in C:\usbasp.2006-12-29\bin\win-driver\ and press next:

instaling_uasbasp.jpg

 

After successful setup you should see following view in device list:

USBASP_Device_ready.jpg

 

When device is unplugged – the device disappears from the device list. This is it with first stage. Now it is time to start programming with usbasp adapter, but this will be discussed later.

You can download various PCB and circuit configurations directly from http://www.fischl.de/usbasp/ site. Good luck.

Blogsphere: TechnoratiFeedsterBloglines
Bookmark: Del.icio.usSpurlFurlSimpyBlinkDigg
RSS feed for comments on this post
 |  TrackBack URI for this post

New on WinAVR Tutorial
Running TX433 and RX433 RF modules with AVR microcontrollers,
Sometimes in embedded design you may want to go wireless. Might be you will want to log various readi …
Programming AVR ADC module with WinAVR,
Most of AVR microcontrollers have Analog to Digital Converter (ADC) integrated in to chip. Such solut …
New on WinARM Tutorial
What are differences between WinARM and WinAVR,
Everyone who is working with AVR microcontrollers knows this powerful tool – WinAVR (http://win …
LPC2000 watchdog timer,
As in all microcontrollers watchdog timers purpose isto reset microcontroller after reasonable amount …

31 Responses to “Building and installing USBASP-USB programmer of AVR microcontrollers”

  1. Abhijit K Says:

    Excellent solution for quick ISP programming with laptops! thanks very much..

  2. goldenstar Says:

    help me.i make a USBasp from Thomas Fischl pages. but it dont work.WinXP dont recognize device.Win2000 show Unknow Device.who can help me???

  3. hr paul Says:

    try to connect it through a USB hub it may solve you problem i don’t know why

  4. M.C. Says:

    I believe description of SCK frequencies is wrong. USBasp indeed has 2 programming frequencies – high when jumper disconnected and low when connected. These frequencies are 375kHz and 8kHz, however. In order to use 375kHz speed, target MCU’s clock frequency has to be at least 1.5MHz (SCK * 4, same rule for low speed).

  5. scienceprog Says:

    Thank you M.C. for this notice. That was big mistake in description. Now it is corrected.

  6. One click project with USBasp programmer - Scientific, embedded, biomedical, electronics contents. Says:

    [...] systems including Linux, Mac OS X, and windows. How to assemble this simple programmer read previous article in this site or go to original site of Thomas [...]

  7. Delson Says:

    This article is quite interesting and well explained. But I am a newbie, I want to build this programmer. It will be my first ever. But i was quite surprised/confused when i read the following: “To make this adapter work you need to program Atmega8 with driver firmware”.
    How do i program the atmega8? I want to build this circuit to be able to program amtmega’s. If i have to build another programmer then what’s the point?

  8. vivek Says:

    i bought atmega 8L by mistake instead of atmega8.
    Is there a way out to construct the ubasp mentioned above eith atmega 18L? (since they cannot be clocked to 16MHz)

  9. vivek Says:

    delson you need to make a small bsd programmer for it.

    its easy you need to plug in some wires in ur parallel port and connect them to ur atmega8

  10. OvidiuP Says:

    I tried this schematics and didn’t work. my atm8 crashed atfer firmware update :(
    I had a solution for usb (i have a laptop too.. only USBs). My card is suporting programmer, communication and power suply. :)

  11. Isaac Abraham Says:

    Sorry to ask the naiive question:
    (1) how do i unpack the tar files from fischl’s website? command line and switches please.
    (2) Can anyone please explain how to load the ATM8 with the firmware, can it be done from WINDOWS…?
    I’m new to this and would greatly appreciate the help.
    thanks. -isaac

  12. scienceprog Says:

    Hy,
    1)I simply use Total Commander unpack feature. But tar files are supported bu WinRAR program – so there should be no problem to extract simply by clicking right mouse button.
    2)It depends on what programmer you use… if it is simple COM or LPT ISP programmer you can use PonyProg software.

  13. Isaac Abraham Says:

    Hi,
    When i try to unzip (with winzip) i get “error reading header after processing 0 entries”. could there be a problem?

  14. Isaac Abraham Says:

    I downloaded winRAR and was able to untar. Please ignore my winzip question. Thanks for the help and pointers

  15. David Infante Sànchez Says:

    I built this programmer using atmega 8, and this microcontroller was programmed using my AVR Dragon; I’v installed driver, and I’ve checked all connections, but when I try to program a microcontroller with USBASP allways says the same error about “signature bytes” sometimes it reads 0 and F. I’am using slow clock, I don’t know why I can be able to program the microcontroller, Can any body tell what coulb be wrong? Thanks

  16. Sajjad Says:

    Hello,
    This article is useful and well explained !
    I made this project and I installed this on my PC .
    Now I need a little help in bascom-AVR software . I do not know which programmer should I select in Bascom-AVR software ( option >> programmer )

    Please find this picture :
    [IMG]http://i32.tinypic.com/21l7s3n.jpg[/IMG]

    Please tell me and help me to solve this problem .
    Thank You,
    Sajjad

  17. Jean-Christophe Says:

    Hello,
    I have a problem on my laptop: Windows does not detect the programmer (unknown USB peripheral). On the other hand, the programmer well work on my desktop computer… What does it occur ?

    Thank You,

  18. Ashwati Says:

    Thank you for the article. Well put.
    I have a few questions:
    1. Are the jumpers necessary? Can they be over riden with open/shorts according to required settings?

    2. The USB device will be detected even without a target board?

    Thank You

  19. Norbiv8 Says:

    Hello,

    i have a problem with programming atmega8. I use paralel programmer with uisp software. Firmware hex file programming ok, but i dont know values of fuse bits. Somebody can send me the fusebits values?

    Thank you

  20. Omiya Lee Says:

    Hello,
    I have sucessfully made it but encountered a strange phenomenon. I can 100% re-program all chips on hand but could not program any new chips (just bought). Avrdude says “Such chip could not be initialized or recognized”. I could only get it programmed once with other programmer then I can use it with this programmer.
    Thanks a lot for your help!

  21. virgoptrex Says:

    @Omiya Lee,

    Adding an external crystal (Try 3MHz to 8 MHz) may solve your problem. You need to have external crystal there. I think the program sets fuse bits without giving any indication to the user.

  22. SaLIk Says:

    Hi,
    I have made this programmer, but now i have a poblem. On my “desktop” PC programmer work ok (USBasp is detected). On my laptop (with the same drivers) i get message “Unknown device”.

    Any ideas?
    Thanks

  23. SaLIk Says:

    Hi,
    I have a new facts. I was tested the programer in 2 other PC’s (desktop and laptop) and it works fine.

    I think the problem is my Windows.

  24. SaLIk Says:

    Hi,
    problem was solved with adition two zener diodes (3V6) parallelly to data wires (+/- D).

    By the way, for programming a “low speed” AVR (mega8 with using internal 1MHz oscilator) you must short the SCK jumper.

    That’s all. Sorry for my english ;).

  25. jj Says:

    hi,i see not recognized device on my laptop,but on my desktop it works perfect.

  26. Anand Says:

    Hi,

    I have made the circuit as said and inserted in the USB port of my PC. The PC detects it but coudn`t able to install the Device driver properly.
    What can I do? Please suggest me in this regards.

  27. Rakesh Says:

    i have a USBasp programer with atmega8
    can i use this programer to program a atmega8 micro-controller.

  28. avinash Says:

    Hello Every One

    I have recently written a GUI Software for driving USBasp compatible USB Programmers. It is much easier to use than the avrdude or avrdude-gui.

    You can download it free of cost from here

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

  29. Rakesh Says:

    i burn hfuse and lfuse in Atmega8 as HFUSE=0xc9 LFUSE=0xef. now it is not working with usbasp can one tell me the solution…

  30. Ketan Kothari Says:

    Hi Rakesh i can solve your problem for not working of atmega8 because by adjusting the fuse bits you have switched off the spi enable pin of the controller therefore the usbasp is not working
    Know you have to reburn the fuse bits by using a universal programmer and switch on the spien bit then it will start recognizing the device.

    Try it…

  31. Rakesh Says:

    Hi..
    Ketan can you tell me about universal programmer.
    and how to use it.
    Thanks

Leave a Reply