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 ATMega88 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 V-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.atmega88.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
46 # TARGET=atmega88 HFUSE=0xdd LFUSE=0xff
49 Start Windows and connect USBasp to the system. When Windows asks for a
50 driver, choose "bin/win-driver". On Win2k and WinXP systems, Windows will
51 warn that the driver is is not 'digitally signed'. Ignore this message and
52 continue with the installation.
53 Now you can run avrdude. Examples:
54 1. Enter terminal mode with an AT90S2313 connected to the programmer:
55 avrdude -c usbasp -p at90s2313 -t
56 2. Write main.hex to the flash of an ATmega8:
57 avrdude -c usbasp -p atmega8 -U flash:w:main.hex
61 Supply target with 5V (USB voltage). Be careful with this option, the
62 circuit isn't protected against short circuit!
63 J2 Jumper for firmware upgrade (not self-upgradable)
64 Set this jumper for flashing the ATMega(4)8 of USBasp with another working
67 If the target clock is lower than 1,5 MHz, you have to set this jumper.
68 Then SCK is scaled down from 375 kHz to about 8 kHz.
71 BUILDING AND INSTALLING FROM SOURCE CODE
74 To compile the firmware
75 1. install the GNU toolchain for AVR microcontrollers (avr-gcc, avr-libc),
76 2. change directory to firmware/
77 3. run "make main.hex"
78 4. flash "main.hex" to the ATMega(4)8. E.g. with uisp or avrdude (check
79 the Makefile option "make flash"). To flash the firmware you have
80 to set jumper J2 and connect USBasp to a working programmer.
81 You have to change the fuse bits for external crystal, (check the Makefile
85 AVRDUDE supports USBasp since version 5.2.
86 1. install libusb: http://libusb.sourceforge.net/
87 2. get latest avrdude release: http://download.savannah.gnu.org/releases/avrdude/
89 5. configure to your environment:
90 ./bootstrap (I had to comment out the two if-blocks which verify the
91 installed versions of autoconf and automake)
93 6. compile and install it:
97 Notes on Windows (Cygwin):
98 Download libusb-win32-device-bin-x.x.x.x.tar.gz from
99 http://libusb-win32.sourceforge.net/ and unpack it.
100 -> copy lib/gcc/libusb.a to lib-path
101 -> copy include/usb.h to include-path
103 ./configure LDFLAGS="-static" --enable-versioned-doc=no
106 Notes on Darwin/MacOS X:
107 after "./configure" I had to edit Makefile:
108 change "avrdude_CPPFLAGS" to "AM_CPPFLAGS"
109 (why is this needed only on mac? bug in configure.ac?)
112 To use USBasp as non-root, you have to define some device rules. See
113 bin/linux-nonroot for an example.
115 FILES IN THE DISTRIBUTION
117 Readme.txt ...................... The file you are currently reading
118 firmware ........................ Source code of the controller firmware
119 firmware/usbdrv ................. AVR USB driver by Objective Development
120 firmware/usbdrv/License.txt ..... Public license for AVR USB driver and USBasp
121 circuit ......................... Circuit diagram in PDF and EAGLE format
122 bin ............................. Precompiled programs
123 bin/win-driver .................. Windows driver
124 bin/firmware .................... Precompiled firmware
125 bin/linux-nonroot ............... Linux device rule file
130 For more information on USBasp and it's components please visit the
133 USBasp .......................... http://www.fischl.de/usbasp/
135 Firmware-only V-USB driver ...... http://www.obdev.at/products/vusb/
136 avrdude ......................... http://www.nongnu.org/avrdude/
137 libusb .......................... http://libusb.sourceforge.net/
138 libusb-win32 .................... http://libusb-win32.sourceforge.net/
141 2011-05-28 Thomas Fischl <tfischl@gmx.de>