The AVR Butterfly comes with a bootloader which uses the self-programming feature in the ATmega169. The bootloader combined with the integrated RS-232 level-converter makes it possible to upgrade the application without any external hardware. It is based on the Application Note AVR109: Self Programming AVR, but uses the new buffer load mode for more efficient data downloading. AVR Prog, which is included in AVR Studio4, is used as PC frontend. The data is transmitted through the RS-232 interface. Connect a serial-cable from the PC to the AVR Butterfly as described in RS232.


Upgrade the ATmega169

A jump to the boot section can be done from the application, Options →Bootloader→Jump to Bootloader, see Figure 3, “Menu system”, or just reset the ATmega169 by shortcut pin 5 and 6 on J403 the ISP connector, (after a reset the ATmega169 will start in the boot section). See Figure 6, “ISP Connector, J403” for the pinout of the ISP-connector. Nothing will be displayed on the LCD while in boot section. Press and hold the joystick in the ENTER-modus while starting AVR Prog. When AVR Prog starts, release the joystick. Find the *.hex file you want to program with the Browse button, and press Program. See that Erasing Device, Programing and Verifying goes OK, this is done automatically. After upgrading the application, press the Exit-button in AVR Prog in order to leave programming mode in the ATmega169 bootloader.


Jump to the application sector

From the Boot Section a jump to the application is done by pressing the joystick in the UP-position.

Fuses and Lock Bits

For the firmware to operate correctly these fuses and lock bits on the ATmega169 are the only ones to be programmed:

Extended Fuse Byte (0xFF)

Fuse High Byte (0x98)

Fuse Low Byte (0xE2)

Lock Bit Byte (0xEF)