USBaspLoader v0.97 stable release
[pub/USBaspLoader.git] / Schematics.txt
1 Default settings are designed for atmega8 (with external 16MHz crystal)
2 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3
4 First you have to bring the USBaspLoader into the MCU by some conventional
5 way, for example by using the traditional LPT1 on an old computer:
6
7 --> avrdude -p m8 -c pony-stk200 -e -U flash:w:bootloaderfirmware.hex <--
8
9 Or via an already existing MCU, flashed with the USBasp Programmer:
10
11 --> avrdude -p m8 -c usbasp -e -U flash:w:bootloaderfirmware.hex <--
12
13
14 If you already have an existing (and spminterface supporting) USBaspLoader
15 flashed and you just want to update the loader to new features/version,
16 you can use its integrated update-feature by flashing the update-firmware.
17 After executing it at least one time, it will replace the old loader with
18 the new one contained within the update. Then you can start flashing other
19 firmwares, again...
20
21
22 Since the atmega8 (used as default) is 5V, the recommended USB-Schematics
23 should use zeners. (for more information see the VUSB designrecommendation
24 with the two 1N4729 zener diodes as level limiter...)
25 Because it is most unlikely to use the atmega8 as analogous comperator
26 (there are much more cheap ICs for this), it is recommended to use those
27 PINs for USB-Interface (this is the default, but it can be changed):
28
29 USBD+ (green) --> PIN4 (PD2) (usually INT0 PIN)
30 USBD- (white) --> PIN13 (PD7, AIN1) (new since Rev.3)
31
32 BUTTON SWITCH --> PIN12 (PD6, AIN0) (new since Rev.3)
33
34 Since the PD6 and PD7 lines were swapped in example board revision 3,
35 it is possible to use the internal analogous comperator module, too.
36 (Since AIN1 can be remapped to an other PIN but AIN0 not.)
37 Now having the BUTTON SWITCH on AIN0 allows external connections to
38 this PIN. Before Rev.3 (Rev2 and older) this was not possible, since
39 USBD- needs to be exclusive and is not routed to an external PIN on
40 the board. (Now USBD- is on AIN1, which can be remapped.)
41
42 The bootloader bootup logic has changed a little bit, compared to the
43 original JUMPER-logic within original USBaspLoader 2010-07-27.
44 However most of the new logic is compatible with old JUMPER schematics:
45
46 When RESET/PowerUP while BUTTON is pressed (PIN12 is low), then bootloader
47 will start. Even if the BUTTON is release after this and PIN12 becomes HIGH,
48 the bootloader stays active and listens to commands as long as the BUTTON
49 will be pressed (and so PIN12 becomes low) again...
50
51 If the BUTTON is NOT pressed at RESET/PowerUP, or pressed again while
52 in bootloader, the user defined firmware is started.
53
54
55
56
57 for default atmega8 recommended MCU-settings are:
58
59 LFUSE: 0x1f
60 HFUSE: 0xc0
61 LOCK : 0x3f (unchanged - the bootsection is proceteced via loader software)