From RepRap
Jump to: navigation, search
Crystal Clear action run.png

Release status: working.

Usbasp CCBYv2 shokai-Flickr.jpg
Description A cheap and simple Atmel AVR programmer.
License GPL
Author Thomas Fischl
Based-on Delta
Categories Electronics, Development.
CAD Models none
External Link

The USBasp is a cheap and simple USB programmer for Atmel AVR's. It basically consists of an ATMega88 or ATMega8, a handful of passive components and as such easily etched and assembled.

ATmega programmer

By selfsourceing a Sanguinololu one sooner or later have to provide a raw ATmega 644P with a sanguino bootloader, which enables uploading of firmwares through the USBconnection. There are several ways to do this. Its not often I burn a bootloader, but when I do, I make it easy for myself as I am:

  • Lazy. (Haul a computer with a parallel port from my storagespace etc, arduino as isp with a fiddly breadboard.)
  • Not enough funds to buy another kit from dear Joem (Author of Sanguinololu).
    (Furthermore, USBasp on ebay was cheaper than a USBtinyisp ebay, the difference I do not know, both work for this application.)
  • YMMV of course.

Hardware Ver1 and Ver2

At first I th

Headline text

ought: "Oh Hey, that's easy as pie"

(USBasp V1 -> Sanguinololu ISPheader)
9 - 1
2 - 2
7 - 3
1 - 4
5 - 5
4 - 6
(USBasp V2 -> Sanguinololu ISPheader)
9 - 1
2 - 2
7 - 3
1 - 4
5 - 5
8 - 6

Which did not work (yet again, YMMV). Luckily for me, I had bought a USBasp earlier on and after some searching and asking on IRC.
This is what "I" came up with:


As I already had it delivered from ebay, I used three computer chassi-cables that I apparently had laying around. Whereupon I proceeded to solder these wires in a rather brutish fashion to their respective pins, N.B before the 10pin header, made sure there were no solder-bridges and ran the software.
Alt text


AVRDUDE(AVR Downloader/UploaDEr) is available through most, if not all package management systems for GNU linuxdistributions. Also downloadeble for apple and windows.

Usage: Linux;

sudo avrdude -p atmega644P -c usbasp -U flash:w:Sanguino/bootloaders/atmega644p/ATmegaBOOT_644P.hex

You should be able to use it as an ordinary user, with membership in the right groups.

Another option is to simply use the Arduino IDE (v1.0). To do this simply open Arduino, go to tools, and under the "programmer" list choose "USBasp". After choosing the correct board (in this case Sanguino W/ ATmega644P [if you don't see this option download the newest sanguino drivers from their site and paste them into arduino's hardware folder]) simply click "burn bootloader" from "tools".


At first I got these errors:

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: programm enable: target doesn’t answer. 1
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override this check.
avrdude done. Thank you.

This indicates that it does not connect at all and as I did not bother checking the cable I made, it is possible that the device/cable was a bit fiddly before my mentioned harsh solution or so I like to believe.

The Great Success

Anyhow, this is what it should look like when it works as it should:

Alt text
All in all less breadboards/soldering, works as with a USBTiny, but cheaper AFAIK.