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/
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).

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.

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:

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:

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

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 … |

August 3rd, 2007 at 9:13 am
Excellent solution for quick ISP programming with laptops! thanks very much..
September 21st, 2007 at 5:05 pm
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???
September 25th, 2007 at 9:39 am
try to connect it through a USB hub it may solve you problem i don’t know why
December 11th, 2007 at 1:56 am
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).
December 11th, 2007 at 11:12 pm
Thank you M.C. for this notice. That was big mistake in description. Now it is corrected.
December 12th, 2007 at 12:08 am
[...] 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 [...]
March 5th, 2008 at 1:20 pm
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?
March 5th, 2008 at 1:22 pm
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)
March 6th, 2008 at 3:45 pm
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
March 24th, 2008 at 5:18 pm
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. :)
April 21st, 2008 at 4:43 am
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
April 21st, 2008 at 10:53 am
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.
April 21st, 2008 at 3:00 pm
Hi,
When i try to unzip (with winzip) i get “error reading header after processing 0 entries”. could there be a problem?
April 21st, 2008 at 3:11 pm
I downloaded winRAR and was able to untar. Please ignore my winzip question. Thanks for the help and pointers
May 6th, 2008 at 9:26 pm
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
May 15th, 2008 at 11:10 am
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
May 26th, 2008 at 5:44 pm
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,
May 28th, 2008 at 4:30 pm
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
June 7th, 2008 at 6:07 pm
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
November 6th, 2008 at 10:07 pm
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!
November 18th, 2008 at 7:32 am
@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.
November 21st, 2008 at 1:38 pm
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
November 21st, 2008 at 2:34 pm
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.
November 25th, 2008 at 2:01 pm
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 ;).
March 30th, 2009 at 3:05 pm
hi,i see not recognized device on my laptop,but on my desktop it works perfect.
April 13th, 2009 at 4:42 pm
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.
May 9th, 2009 at 11:59 am
i have a USBasp programer with atmega8
can i use this programer to program a atmega8 micro-controller.
May 10th, 2009 at 1:16 pm
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/
May 29th, 2009 at 6:26 am
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…
May 30th, 2009 at 9:32 am
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…
May 30th, 2009 at 9:14 pm
Hi..
Ketan can you tell me about universal programmer.
and how to use it.
Thanks
July 24th, 2009 at 8:02 am
@Rakesh
You have just enabled external crystal oscillator. Just put a crystal (say 12MHz) on XTAL1 and XTAL2 along with 2 22pf capacitor(to GND) and it will start responding again !
:)
August 1st, 2009 at 1:25 pm
please check this
http://dhost.info/bdrelectronics/Tools.html
New HW for the USBasp able to program target device with VCC down to 3v.
the Resistors on the output of the programmer and the protecting diodes
in the target device limit the voltage to the VCC of the target
and for the input to the programmer, the ATmega8 in the circuit see
the voltage from 3 to 5V as a logic high
August 3rd, 2009 at 2:13 pm
in the pc using the usb 1.0 laptop while using usb 2.0, can be overcome by using a usb hub
September 8th, 2009 at 4:34 am
I use usbasp to program AVR in windows. But now I want to use it in Linux (UBUNTU) . I know Avrdude can work with usbasp but avrdude cant find usbasp. Should I install a driver for usbasp in Ubuntu? If yes, How can I download and install it?
September 19th, 2009 at 5:27 pm
A suggestion: I put an alternate power source for the USBasp using 7805 and a 9V battery. I have a switch to select USB power or battery power. My laptop (dell inspiron 1525 recognizez USBasp only when battery powered.
September 29th, 2009 at 6:15 am
Dear Sir:
Could you be so kindly to inform me about the configutations bit for ATMega 48 and ATMega8, my programmer ask me for them (To be able to program the CHIP with firmware)
ATMega8 ATMega48
RSTDISBL
WDTON
SPIEN
CKOPT
EESAVE
BOOTSZ1
BOOTSZ0
BOOTRST
BODLEVEL
BODEN
SUT1
SUT0
CKSEL3
CKSEL2
CKSEL1
CKSEL0
Thanks
October 1st, 2009 at 12:08 am
Hey all.
Could you be so kindly to inform me about the configutations bit for ATMega 48 and ATMega8, my programmer ask me for them (To be able to program the CHIP with firmware)
ATMega8 ATMega48
RSTDISBL
WDTON
SPIEN
CKOPT
EESAVE
BOOTSZ1
BOOTSZ0
BOOTRST
BODLEVEL
BODEN
SUT1
SUT0
CKSEL3
CKSEL2
CKSEL1
CKSEL0
Please, i’m having same problem…not knowing which config bits to program. Please be so kind to help with some info on that matter.
Thanx
October 1st, 2009 at 12:39 am
OK, never mind…LOL. I got it to work!!!!! The config bits in Ponyprog should be set to the following…. TICKED(selected) : CKOPT, BOOTSZ1, BOOTSZ0, BODEN, SUT0. The rest must be left “unticked” Hope this helps you “ARMAGON”
October 14th, 2009 at 1:38 pm
Is it possible to program the avr MCU to enable xtal oscillator when you are using pony prog with the target MCU not using the XTAL oscillator
What should be the value of the fuse bits value to be loaded into the firmware for USBASP.
Can any one please help me with the simple PCB desin for USBASP those in homepage are quite harsh and cannot be made at home.
October 28th, 2009 at 9:06 am
Hi,
this article is very interesting for me but im a newbie too..can someone tell me how to program this usb asp using CodeVision AVR??
thanks before..
December 1st, 2009 at 10:32 am
what is JP1, JP2, JP3
December 13th, 2009 at 8:35 pm
to Sera:
JP means jumper or simply a “switch”
if you connect the JP1, it means you’re supplying target board with 5V voltage from USB
JP2 must be connected IF you want to update the atmega8’s firmware. and JP3 is connected if you want to slow down the programming speed (i don’t know exactly why the speed should be slowed down)
December 13th, 2009 at 9:04 pm
to Richard and other guys who still have problems with usbasp fuse bits settings:
just try to program the firmware with avrdude (you should install winAVR, i suggest the 2009 version)
to program the firmware:
Use parallel port/STK200 programmer to flash your atmega8 in another circuit (breadboard or PCB is OK)
open the command prompt, move to the folder where you put the firmware from Thomas Fischl’s website, and type:
“avrdude -c stk200 -p atmega8 -P lpt1 -U flash:w:main.hex -U hfuse:w:0xC9:m lfuse:w:0xEF:m”
it’s automatically flash the firmware and set the fuse bits.After this, just move the atmega8 to your usbasp circuit, and see what happens when you connect it in your PC/laptop. I’ve tried this and i’m so happy to see the result…
:)
December 25th, 2009 at 7:38 pm
hi all… just build usbasp and so far windows never detect my usbasp, hundred time i try , reprogramming, reconfigure the fuse, still didn’t work…windows wont detect it, i checks nothing wrong in connections , i cant found dioda zener 3.6V here, is that could be my only problem..?? do i have to add dioda to both D+ D- parallel ??
December 26th, 2009 at 2:00 pm
Did you try on different PC?
December 26th, 2009 at 4:02 pm
Yups… i plug it on my Acer travelmate 3000 nothing detect on usb, then i plug it on my desktop computer; detected but system said \usb device malfunction\, unknow usb divice, system don’t ask driver.
Thanks for your response please help me, sorry my english not clear, i am from indonesia.
December 30th, 2009 at 5:44 am
@dodi:
yes, you have to add the 3,6V zener to the D+ and D-, it’s important for adapting the voltage level of the USB system.
The first time i try, i have the same problem with u too. But there’s nothing wrong in my circuit. I’ve added the 3,6V zener. And i asked help to Sajid Muhaimin’s website :
http://sajiduc.blogspot.com/2009/02/my-usb-programmer-is-working-in-vista.html
And he said i have to program the fusebit (hfuse and lfuse) to be 0xc9 and 0xef. And i made it.
January 4th, 2010 at 9:16 am
why my comp not detected new hardware?
January 6th, 2010 at 4:16 pm
hi wibi… now i add 3.6 zener to the D= and D- , but system still not recognice it “usb device malfunction “… how can i program the Hfuse and lFuse on ponyprog…??
-dodi-
January 9th, 2010 at 4:25 pm
Open the Command menu and select “Security and Configuration bits”. There are some checkbox in it but i found no place to write hexadecimal code for the hfuse (0xc9) and lfuse (0xef). So I suggest you to use avrdude or progisp cz it’s easier to write the fusebit settings.
if you have avrdude installed, open the command prompt, go to the folder where you put the “main.hex” file and just type
“avrdude -c stk200 -p atmega8 -P lpt1 -U flash:w:main.hex -U hfuse:w:0xC9:m lfuse:w:0xEF:m”
(if you use the parallel port programmer)
or use progisp software, download it at
http://ftp.qrz.ru/pub/hamradio/microchips/progisp166.rar
January 9th, 2010 at 4:43 pm
sorry i forgot about this.
put “-U” just before “lfuse:w:0xEF:m”
if you can’t download the file, remove the “/progisp166.rar”on the link above, and search the progisp166.rar in the page
January 31st, 2010 at 1:30 pm
OK wibi , my usbasp now detected the problem is on xtal, i use xtal with 14 MHz…. heheh it make serius problem, it make baud rate to usb not corect.
After i replacing the xtal with 12Mhz USBASP detected but when i programming the target chip the problem now is cannot communicate with target chip…any suggest..??
February 7th, 2010 at 4:28 pm
Hi i build my 1st programmer ie USB AVR ISP…..
As discussed above the same problem programmer is not detecting…..What can i do pls explain me clearly….. and also abt H fuse & I fuse……..
February 26th, 2010 at 1:04 pm
I have made an atmega32 board, i have used 8 Mhz external crystal. I am using ponyprog to burn the code. I have also set the frequency in ponyprog as 8 Mhz, but it gives me slow output. I checked, if I wrote codefor it to wait for 1 sec, it waits for approx 10 secs. Please help me out with it.
March 10th, 2010 at 9:03 pm
hey guys. i just built that usbasb programmer and now my laptop with its 32x vista cant recognize it and prompt me this device malfunctions…. im pretty sure that used 2 3.6v zener diods. and q is 12mhz. i tried it on desktop with xp. but its still Not working. can you help me to make it fixed?