Home

I built a usbasp recently. It took me around 4 days. I had basically no electrical knowledge, so I've decided to put together a complete collection of information for people who want to build their own, and who are in the same position as I was. Hopefully this guide will help them avoid some problems I had.
I don't want to re-create the official website, because all the information there is correct. Again, the purpose of this web-page is to help people avoid common pitfalls during construction.
The first thing you need to do is be sure that you have all the right parts for the build.
You can infer exactly what kind of component you need by looking at the official usbasp schematics. The only thing to watch out for is the fact that you need zener diodes to limit the voltage on the usb data lines. The programmer avr is powered with 5V from the usb power lines, so the pins on that AVR are also 5V. That means that the voltage from the AVR pins needs to be lowered and the voltage coming in from the data lines shouldn't be touched. The diodes on the usbasp schematic are 3.6V zener diodes and they have to have very low capacitance. If the diodes have a capacitance that is too high then they act as little capacitors and round out the transitions from high to low voltage. I was only able to find one kind of diode that would work and was not a surface mount on digikey. You can use the diodes link above to get more information. You need a zener diode with a power of 500mW or less. I never tried 500mW but I hear that's the upper limit. 250mW is recommended.
Of course you'll also need something to program. Any chip that avrdude supports should work as far as I know. To get a list of supported chips type 'avrdude -p foo -c bsd' and it'll spit a list out at you. (I've never had one fail)...Sorry I can't be more specific than that. I've tested atmega6-16pu and atmega164p-20pu and they both worked. I've heard that they should all work however.
Useful reference information
I would recommend printing this and taking notes on it as you proceed.

Pitfalls

AVRdude
Here is some sample output from avr dude with a working programmer.
chris@Tool ~ $ avrdude -c usbasp -p m164p

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x1e940a

avrdude: safemode: Fuses OK

avrdude done. Thank you.

Here is the lsusb entry for my usbasp:
Bus 002 Device 015: ID 16c0:05dc

Building
I wish there was some meaningful insightful help I could give here, but there isn't. The best advice I can give is to persist and think analytically. Don't make assumptions about what could be working and what isn't. It took me 3 days to get past this point. Turned out I had misread about how diodes worked and had them plugged in backwards. I was surprised to find out that the usbasp seemed to work without them. (That's how I found out that they were in backwards). Another tip would be to look at the various other schematics from the usbasp website and see how your design may differ from it. Looking at the same thing but drawn differently can help give insight on what may have been wired incorrectly. I used a breadboard, it was messy by the end but I was glad I had done it that way because it gave me that chance to wire and rewire and be sure that it worked before soldering. The point is that the website instructions are correct and when you plug a correctly constructed usbasp into the usb port of a computer under windows you should see a "new hardware" dialog. Under Linux you should see a new lsusb entry.
Connecting a target
This part gave me the most trouble. You'll notice that on the official schematics there is no indication as to where the 10 pin connector should eventually go on a target board. I've put the connections at the bottom of the reference pdf sheet. Making those connections directly into a target chip should make it work, no other parts required.

Food for thought.
I still have no idea what pins 4 and 6 are for on the 10 pin connector. It seems to be working just fine without connecting them. If anybody has more insight on these pins, let me know and I'll update this page.
Just for kicks, here is what mine looked like when I first got it going.
Click on it for a much larger version.

And here is the final soldered version.

Comments

Bill Dreschel
11 Oct 2009, 19:07
AZ23C3V6-7-F

Have you seen these 3.6V zener diode pairs at Digikey? These look like a decent USB voltage lock for both lines.

I have been having trouble along these lines also and I just came across these.
Thanks for all the great info.
sashi
09 Sep 2009, 03:33
Where we get microcontroller,
Hello I am electronic enthusiast we dont get avr microcontrollers here in nepal...
How much it cost ,,,, is it Avordable
Chris
26 Aug 2009, 20:57
sanddeep,
Yes you have the change the fuse bits. You have to use make install as well as make fuses to upload the firmware and then set the fuses. Make sure you read the comments in the makefile first. There are a few options you have to set first. Post any other specific questions you may have. I'll make the fuse bit setting section in this page clearer.
sandeep
26 Aug 2009, 06:22
Hello I am electronic enthusiast we dont get avr microcontrollers here in nepal But i have learned programming avr microcontroller in winavr through proteus and datasheet .
I would like to build USBASP and the problem is whilke loading the firmware into mega8 or 48 do we have to change its fuse bits ?
i will try to import those stuffs form india and try to build one Cand you help me with the idea circuits and other tools.
I looked into its homepage but didnot understand much so asking for your help
*Name:
Email:
Notify me about new comments on this page
Hide my email
*Text:
 
Powered by Scriptsmill Comments Script