16d78dbc26ebd7307ac0da00863d3ff39c7aa424
[pub/USBasp.git] / Readme.txt
1 This is the README file for USBasp.
2
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
6 is needed.
7
8 Features:
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).
14
15
16 LICENSE
17
18 The project is built with AVR USB driver by Objective Development, which is
19 published under a proprietary Open Source license. To conform with this
20 license, USBasp is distributed under the same license conditions. See the
21 file "firmware/usbdrv/License.txt" for details.
22
23
24 LIMITATIONS
25
26 Hardware:
27 This package includes a circuit diagram. That circuit can only be used for
28 programming 5V target systems. For other systems a level converter is needed.
29
30 Firmware:
31 The firmware dosn't support USB Suspend Mode. A bidirectional serial
32 interface to slave exists in hardware but the firmware doesn't support it yet.
33
34
35 USE PRECOMPILED VERSION
36
37 Firmware:
38 Flash "bin/firmware/usbasp.atmega48.xxxx-xx-xx.hex" or
39 "bin/firmware/usbasp.atmega8.xxxx-xx-xx.hex" to the used controller with a
40 working programmer (e.g. with avrdude, uisp, ...). Set jumper J2 to activate
41 USBasp firmware update function.
42 You have to change the fuse bits for external crystal (see "make fuses").
43 # TARGET=atmega8 HFUSE=0xc9 LFUSE=0xef
44 # TARGET=atmega48 HFUSE=0xdd LFUSE=0xff
45
46 Windows:
47 Start Windows and connect USBasp to the system. When Windows asks for a
48 driver, choose "bin/win-driver". On Win2k and WinXP systems, Windows will
49 warn that the driver is is not 'digitally signed'. Ignore this message and
50 continue with the installation.
51 Now you can run avrdude. Examples:
52 1. Enter terminal mode with an AT90S2313 connected to the programmer:
53 avrdude -c usbasp -p at90s2313 -t
54 2. Write main.hex to the flash of an ATmega8:
55 avrdude -c usbasp -p atmega8 -U flash:w:main.hex
56
57 Setting jumpers:
58 J1 Power target
59 Supply target with 5V (USB voltage). Be careful with this option, the
60 circuit isn't protected against short circuit!
61 J2 Jumper for firmware upgrade (not self-upgradable)
62 Set this jumper for flashing the ATMega(4)8 of USBasp with another working
63 programmer.
64 J3 SCK option
65 If the target clock is lower than 1,5 MHz, you have to set this jumper.
66 Then SCK is scaled down from 375 kHz to about 8 kHz.
67
68
69 BUILDING AND INSTALLING FROM SOURCE CODE
70
71 Firmware:
72 To compile the firmware
73 1. install the GNU toolchain for AVR microcontrollers (avr-gcc, avr-libc),
74 2. change directory to firmware/
75 3. run "make main.hex"
76 4. flash "main.hex" to the ATMega(4)8. E.g. with uisp or avrdude (check
77 the Makefile option "make flash"). To flash the firmware you have
78 to set jumper J2 and connect USBasp to a working programmer.
79 You have to change the fuse bits for external crystal, (check the Makefile
80 option "make fuses").
81
82 Software (avrdude):
83 AVRDUDE supports USBasp since version 5.2.
84 1. install libusb: http://libusb.sourceforge.net/
85 2. get latest avrdude release: http://download.savannah.gnu.org/releases/avrdude/
86 3. cd avrdude-X.X.X
87 5. configure to your environment:
88 ./bootstrap (I had to comment out the two if-blocks which verify the
89 installed versions of autoconf and automake)
90 ./configure
91 6. compile and install it:
92 make
93 make install
94
95 Notes on Windows (Cygwin):
96 Download libusb-win32-device-bin-x.x.x.x.tar.gz from
97 http://libusb-win32.sourceforge.net/ and unpack it.
98 -> copy lib/gcc/libusb.a to lib-path
99 -> copy include/usb.h to include-path
100 cd avrdude
101 ./configure LDFLAGS="-static" --enable-versioned-doc=no
102 make
103
104 Notes on Darwin/MacOS X:
105 after "./configure" I had to edit Makefile:
106 change "avrdude_CPPFLAGS" to "AM_CPPFLAGS"
107 (why is this needed only on mac? bug in configure.ac?)
108
109
110 FILES IN THE DISTRIBUTION
111
112 Readme.txt ...................... The file you are currently reading
113 firmware ........................ Source code of the controller firmware
114 firmware/usbdrv ................. AVR USB driver by Objective Development
115 firmware/usbdrv/License.txt ..... Public license for AVR USB driver and USBasp
116 circuit ......................... Circuit diagram in PDF and EAGLE format
117 bin ............................. Precompiled programs
118 bin/win-driver .................. Windows driver
119 bin/firmware .................... Precompiled firmware
120
121
122 MORE INFORMATION
123
124 For more information on USBasp and it's components please visit the
125 following URLs:
126
127 USBasp .......................... http://www.fischl.de/usbasp/
128
129 Firmware-only AVR USB driver .... http://www.obdev.at/products/avrusb/
130 avrdude ......................... http://www.nongnu.org/avrdude/
131 libusb .......................... http://libusb.sourceforge.net/
132 libusb-win32 .................... http://libusb-win32.sourceforge.net/
133
134
135 2006-12-29 Thomas Fischl <tfischl@gmx.de>
136 http://www.fischl.de