Buildup manual On this page you will find all the links that are important for the implementing. Please read step 1, step2 and step 3! Step 1 - Assembling and implementing the assembly kits Step 2 - Installing the bootloader and changing the firmware with the flashtool To be able to change the firmware lateron at any time, the bootloader has to be written into the flash of the ATMega32. As soon as the program is running, the newest version can be downloaded from the internet and installed with the graphical user interface USBprog Flashtool. You can also use usbprog without the flashtool and write the particular .hex or .bin files of the firmware via the ISP interface of the ATMega32 directly to the flash. As with the programming of the bootloader, the reset jumper however has to be set corresponding to the table below. Writing usbprog_base.hex to the flash of the ATMega32 The file can be downloaded here. Now you have to program the ATMega32 on the usbprog PCB for the last time with an external programmer. Therefore, the reset jumper has to be set as shown in the following table. Now the program can be written normally to the flash. Maybe the filesize of exactly 32kbyte amazes, but this results from the fact that the bootloader avrupdate is written to the end of the flash memory. Thus, it may take a little while until avrupdate is in the ATMega32. usbprog 3.0
| usbprog 2.0
|  |  | The reset jumper has to be set, if the ATMega32 shall be programmed externally.
| The jumper has to be set in the direction of the USB socket. Now the ATMega32 can be programmed externally.
|
Now the standard AVR programmer device can connect to USBprog. The configuration of the 10-pole ISP socket matches the standard configuration of Atmel. | | Parallel port | Programmer function | | Pin 7 | AVR /RESET | | Pin 8 | AVR SCK (clock input) | | Pin 9 | AVR MOSI (instruction in) | | Pin 10 | AVR MISO (data out) | | Pin 18 | Signal ground | | Socket configuration on usbprog | simple parallel port cable as external programmer (avrdude -c bsd) | Now the fuse bits have to be set correctly. Low fuse to the value 0xe0 and high fuse to value 0xd9. With AVR Studio Fuse Settings for USBprog (with the bootloader):
With Ponyprog it looks like this (Set BOOTRST also!): Or in a table like this: | Nr. | Fuse | Value | Description | | 1 | BODLEVEL
| 1 | no Brown-Out-Detection
| | 2 | BODEN | 0 | no Brown-Out-Detection | | 3 | SUT0 | 0 | Startup-Time=6 CLK + 64 ms
| | 4 | SUT1 | 1 | Startup-Time=6 CLK + 64 ms
| | 5 | CKSEL3..0 | 0000 | external clock
| | 6 | CKOPT | 1 | external clock
| | 7 | OCDEN | 1 | On-Chip-Debug disable - important for port C (USBN9604)
| | 8 | JTAGEN | 1 | JTAG off
| | 9 | SPIEN | 0 | SPI on
| | 10 | EESAVE | 1 | Chip Erase erases also EEPROM
| | 11 | BOOTSZ1..0 | 00 | Boot start address = $3800
| | 12 | BOOTRST | 0 | Boot reset
| With avrdude and a parallel port cable the procedure looks like this: - flashing the booloader: avrdude -p m32 -c bsd -U flash:w:usbprog_base.hex
- set fuse settings:
avrdude -p m32 -c bsd -t avrdude>write lfuse 0 0xe0 avrdude>write hfuse 0 0xd8 avrdude>quit
Step 3 - Use Bootloader and Flashtools When the bootloader is installed as described in the buildup manual you can easily change the firmware with the graphical uploader USBprog flashtool. Further information on that is available here. |