1 This is the README file for USBasp.
3 USBasp is a USB in-circuit programmer for Atmel AVR controllers. It simply
4 consists of an ATMega8 and a couple of passive components. The programmer
5 uses a firmware-only USB driver, no special USB controller is needed.
8 - Works under multiple platforms. Linux, Mac OS X and Windows are tested.
9 - No special controllers or smd components are needed.
10 - Programming speed is up to 5kBytes/sec.
11 - SCK option to support targets with low clock speed (< 1,5MHz).
12 - Planned: serial interface to target (e.g. for debugging).
17 The project is built with AVR USB driver by Objective Development, which is
18 published under a proprietary Open Source license. To conform with this
19 license, USBasp is distributed under the same license conditions. See the
20 file "firmware/usbdrv/License.txt" for details.
26 "circuit/usbasp_5V_circuit.pdf" shows a simple circuit. It doesn't meet the
27 voltage range on the data lines specified in USB 1.1. Also this circuit can
28 only be used for programming 5V target systems. For other systems a level
32 The firmware dosn't support USB Suspend Mode. A bidirectional serial
33 interface to slave exists in hardware but the firmware doesn't support it yet.
36 USE PRECOMPILED VERSION
39 Flash "bin/firmware/usbasp.xxxx-xx-xx.hex" to the ATMega8 with a working
40 programmer (e.g. with avrdude, uisp, ...). Set jumper J2 to activate
41 USBasp firmware update function.
44 Start Windows and connect USBasp to the system. When Windows asks for a
45 driver, choose "bin/win-driver". On Win2k and WinXP systems, Windows will
46 warn that the driver is is not 'digitally signed'. Ignore this message and
47 continue with the installation.
48 Now you can run the precompiled version of avrdude: change in command line
49 mode to "bin/win-avrdude" and start the program. Consult the documentation
50 of avrdude for details. Examples:
51 1. Enter terminal mode with an AT90S2313 connected to the programmer:
52 avrdude -c usbasp -p at90s2313 -t
53 2. Write main.hex to the flash of an ATmega8:
54 avrdude -c usbasp -p atmega8 -U flash:w:main.hex
58 Supply target with 5V (USB voltage). Be careful with this option, the
59 circuit isn't protected against short circuit!
60 J2 Jumper for firmware upgrade (not self-upgradable)
61 Set this jumper for flashing the ATMega8 of USBasp with another working
64 If the target clock is lower than 1,5 MHz, you have to set this jumper.
65 Then SCK is scaled down from 375 kHz to about 8 kHz.
68 BUILDING AND INSTALLING FROM SOURCE CODE
71 To compile the firmware
72 1. install the GNU toolchain for AVR microcontrollers (avr-gcc, avr-libc),
73 2. change directory to firmware/
75 4. flash "main.hex" to the ATMega8. E.g. with uisp or avrdude (check
76 the Makefile option "make avrdude"). To flash the firmware you have
77 to set jumper J2 and connect USBasp to a working programmer.
80 An extension to avrdude (http://www.nongnu.org/avrdude/) was written.
81 To compile the software:
82 1. install libusb: http://libusb.sourceforge.net/
83 2. get the csv version of avrdude:
85 cvs -z3 -d:ext:anoncvs@savannah.nongnu.org:/cvsroot/avrdude co avrdude
86 3. cp usbasp/software/usbasp.* avrdude/
89 patch < ../usbasp/software/avrdude_usbasp.xxxx-xx-xx.patch
90 6. configure to your environment:
91 ./bootstrap (I had to comment out the two if-blocks which verify the
92 installed versions of autoconf and automake)
94 7. compile and install it:
98 Notes on Windows (Cygwin):
99 Download libusb-win32-device-bin-x.x.x.x.tar.gz from
100 http://libusb-win32.sourceforge.net/ and unpack it.
101 -> copy lib/gcc/libusb.a to lib-path
102 -> copy include/usb.h to include-path
104 ./configure LDFLAGS="-static" --enable-versioned-doc=no
107 Notes on Darwin/MacOS X:
108 after "./configure" I had to edit Makefile:
109 change "avrdude_CPPFLAGS" to "AM_CPPFLAGS"
110 (why is this needed only on mac? bug in configure.ac?)
113 FILES IN THE DISTRIBUTION
115 Readme.txt ...................... The file you are currently reading
116 firmware ........................ Source code of the controller firmware
117 firmware/usbdrv ................. AVR USB driver by Objective Development
118 firmware/usbdrv/License.txt ..... Public license for AVR USB driver and USBasp
119 software ........................ Source code of the host software
120 circuit ......................... Circuit diagram in PDF
121 bin ............................. Precompiled programs
122 bin/win-driver .................. Windows driver
123 bin/win-avrdude ................. avrdude compiled for Windows
128 For more information on USBasp and it's components please visit the
131 USBasp .......................... http://www.fischl.de/usbasp/
133 Firmware-only AVR USB driver .... http://www.obdev.at/products/avrusb/
134 avrdude ......................... http://www.nongnu.org/avrdude/
135 libusb .......................... http://libusb.sourceforge.net/
136 libusb-win32 .................... http://libusb-win32.sourceforge.net/
139 2005-04-21 Thomas Fischl <tfischl@gmx.de>