USBasp

From RepRap
Revision as of 11:17, 11 December 2011 by Danielpublic (talk | contribs) (Grammar Hardware)
Jump to: navigation, search
Crystal Clear action run.png
USBasp

Release status: working.

Usbasp CCBYv2 shokai-Flickr.jpg
Description
A cheap and simple Atmel AVR programmer.
License
Author
Contributors
Based-on
[[]]
Categories
CAD Models
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

At first I thought: "Oh Hey, that's easy as pie"

(USBasp -> Sanguinololu ISPheader)
9 - 1
2 - 2
7 - 3
1 - 4
5 - 5
4 - 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:

tl;dr

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

Software

AVR(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.

Errors

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 was a bit fiddly.

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.