As it turns out the power traces on board 02 are a bit close together. If you are clumsy (as I am) and damage the adjacent power and switch pins on the LM2676 such that they short, vcc goes from 5 to 10 volts and you have a bad day. The silver lining of this cloud is I finally had to figure out putting a bootloader on the mega32. This is how.
First, wire your AVR directly to a parallel port as described here. Basically, on a DB25, 1=SCK 2=MOSI 11=MISO, 16=RESET, 18-25ish=GND. Then do this:
Then, assuming you are using your first usb serial port, upload code by pressing the reset button and then running this within a few seconds:
First, wire your AVR directly to a parallel port as described here. Basically, on a DB25, 1=SCK 2=MOSI 11=MISO, 16=RESET, 18-25ish=GND. Then do this:
uisp -dprog=dapa -dpart=ATmega32 --wr_fuse_h=D8 --wr_fuse_l=DF uisp -dprog=dapa --erase --upload --verify if=stkload_m32_2k32k_16000000.hex uisp -dprog=dapa --wr_lock=EFThe hex file comes from here. These steps set up the fuses correctly for a R02 board, write a boot loader to the 2kw boot section, and set up the lock bits so the app cannot overwrite it accidentally with the SPM (store-program-memory) instruction.
Then, assuming you are using your first usb serial port, upload code by pressing the reset button and then running this within a few seconds:
uisp -dprog=stk500 -dpart=ATmega32 -dserial=/dev/ttyUSB0 if=main.hex --upload --verifyYou need to reset again afterwards because it will not come out of program mode on its own. Theoretically speaking this should make the board Arduino-compatible, but it didn't work on the first try (probably a slightly different bootloader) and I'm not really worried about spending time on that now.