[!] This instruction manual is for ATmega32 [!]
therefore it may need some minor changes on other MCUs.
- The newest version of the bootloader can be found in "Bootloader Test" topic.dimitri wrote:Fuses must be set so that Bootblock size is 1024 words and Atmega32 jumps to Bootblock on reset.
By using avrdude and stk200 compatible programmer you can do it as follows (commandline):- Code: Select all
avrdude -p m32 -c stk200 -e -U hfuse:w:0x12:m -U lfuse:w:0xef:m -U flash:w:bootloader32.hex
If you are using PonyProg, you have to program bootloader32.hex using the following fusebits settings:
On WinPic800 fusebits looks like this:
Remember to disconnect the programmer after programming - otherwise you may have keyboard input problems. - To initiate the firmware update folow these steps: dimitri wrote:This bootloader version is "multiclock" capable.
To enter the bootloader - hold key LEFT pressed while powering up.
While in the bootloader:
To select MCU clock - press key UP. The selection is between 12/16/20/24MHz (16MHz by default). The selected clock will be displayed on an LCD.
To cancel the firmware update - power cycle without pressing any other key.
To start the firmware update - press key DOWN. It will erase an old firmware and wait for Sysex with a new firmware. - To update the firmware using MIDI-OX SySex:dimitri wrote:A MegaDrum firmware file must be modified slightly:
three bytes, 0xF0 0x7F 0x40, must be prepended
and one byte, 0xF7, must be appended
and rename the *.hex file to *.syx.
To easily generate *.syx files from *.hex files you can use my python script (makesyx.py) in the following way:
- Code: Select all
makesyx.py file1.hex file2.hex file3.hex ...
- this will generate *.syx files from specified *.hex files.
- Code: Select all
makesyx.py
- this will generate *.syx files from all *.hex files in current directory.
To use this script you will need a recent version of Python interpreter installed on your operating system. - Finally you can send the firmware by using MIDI-OX:dimitri wrote:Before doing this you MUST set 'Low Level Output Buffers' to at least 40000
(in MIDI-OX menu go Options->Configure Buffers and set Output, NOT Input, Buffers to 40000).dimitri wrote:Now in MIDI-OX go to Actions->Send->SysEx File... and choose the firmware *.syx file you've prepared beforehand. The update will take around 5 seconds and after it's finished MegaDrum will reset itself and boot the new firmware.
When I have done it, it took about 20-30 seconds.
After that you should close MIDI-OX and power cycle the Megadrum.
Good Luck,
shaman
PS. If you find a bug in the script or something is unclear in the description please send me a PM.