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 ATMega48 or an ATMega8 and a couple of passive components.
5 The programmer uses a firmware-only USB driver, no special USB controller
9 - Works under multiple platforms. Linux, Mac OS X and Windows are tested.
10 - No special controllers or smd components are needed.
11 - Programming speed is up to 5kBytes/sec.
12 - SCK option to support targets with low clock speed (< 1,5MHz).
13 - Planned: serial interface to target (e.g. for debugging).
18 USBasp is distributed under the terms and conditions of the GNU GPL version
19 2 (see "firmware/usbdrv/License.txt" for details).
21 USBasp is built with AVR USB driver by OBJECTIVE DEVELOPMENT GmbH. See
22 "firmware/usbdrv/" for further information.
28 This package includes a circuit diagram. This circuit can only be used for
29 programming 5V target systems. For other systems a level converter is needed.
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.atmega48.xxxx-xx-xx.hex" or
40 "bin/firmware/usbasp.atmega8.xxxx-xx-xx.hex" to the used controller with a
41 working programmer (e.g. with avrdude, uisp, ...). Set jumper J2 to activate
42 USBasp firmware update function.
43 You have to change the fuse bits for external crystal (see "make fuses").
44 # TARGET=atmega8 HFUSE=0xc9 LFUSE=0xef
45 # TARGET=atmega48 HFUSE=0xdd LFUSE=0xff
48 Start Windows and connect USBasp to the system. When Windows asks for a
49 driver, choose "bin/win-driver". On Win2k and WinXP systems, Windows will
50 warn that the driver is is not 'digitally signed'. Ignore this message and
51 continue with the installation.
52 Now you can run avrdude. Examples:
53 1. Enter terminal mode with an AT90S2313 connected to the programmer:
54 avrdude -c usbasp -p at90s2313 -t
55 2. Write main.hex to the flash of an ATmega8:
56 avrdude -c usbasp -p atmega8 -U flash:w:main.hex
60 Supply target with 5V (USB voltage). Be careful with this option, the
61 circuit isn't protected against short circuit!
62 J2 Jumper for firmware upgrade (not self-upgradable)
63 Set this jumper for flashing the ATMega(4)8 of USBasp with another working
66 If the target clock is lower than 1,5 MHz, you have to set this jumper.
67 Then SCK is scaled down from 375 kHz to about 8 kHz.
70 BUILDING AND INSTALLING FROM SOURCE CODE
73 To compile the firmware
74 1. install the GNU toolchain for AVR microcontrollers (avr-gcc, avr-libc),
75 2. change directory to firmware/
76 3. run "make main.hex"
77 4. flash "main.hex" to the ATMega(4)8. E.g. with uisp or avrdude (check
78 the Makefile option "make flash"). To flash the firmware you have
79 to set jumper J2 and connect USBasp to a working programmer.
80 You have to change the fuse bits for external crystal, (check the Makefile
84 AVRDUDE supports USBasp since version 5.2.
85 1. install libusb: http://libusb.sourceforge.net/
86 2. get latest avrdude release: http://download.savannah.gnu.org/releases/avrdude/
88 5. configure to your environment:
89 ./bootstrap (I had to comment out the two if-blocks which verify the
90 installed versions of autoconf and automake)
92 6. compile and install it:
96 Notes on Windows (Cygwin):
97 Download libusb-win32-device-bin-x.x.x.x.tar.gz from
98 http://libusb-win32.sourceforge.net/ and unpack it.
99 -> copy lib/gcc/libusb.a to lib-path
100 -> copy include/usb.h to include-path
102 ./configure LDFLAGS="-static" --enable-versioned-doc=no
105 Notes on Darwin/MacOS X:
106 after "./configure" I had to edit Makefile:
107 change "avrdude_CPPFLAGS" to "AM_CPPFLAGS"
108 (why is this needed only on mac? bug in configure.ac?)
111 FILES IN THE DISTRIBUTION
113 Readme.txt ...................... The file you are currently reading
114 firmware ........................ Source code of the controller firmware
115 firmware/usbdrv ................. AVR USB driver by Objective Development
116 firmware/usbdrv/License.txt ..... Public license for AVR USB driver and USBasp
117 circuit ......................... Circuit diagram in PDF and EAGLE format
118 bin ............................. Precompiled programs
119 bin/win-driver .................. Windows driver
120 bin/firmware .................... Precompiled firmware
125 For more information on USBasp and it's components please visit the
128 USBasp .......................... http://www.fischl.de/usbasp/
130 Firmware-only AVR USB driver .... http://www.obdev.at/products/avrusb/
131 avrdude ......................... http://www.nongnu.org/avrdude/
132 libusb .......................... http://libusb.sourceforge.net/
133 libusb-win32 .................... http://libusb-win32.sourceforge.net/
136 2007-07-23 Thomas Fischl <tfischl@gmx.de>