Trouble uploading sketch to serial arduino board

Hi,
I made a Diecimila compatible board following the circuit diagram at http://www.freeduino.org/freeduino_open_designs.html (Freeduino MaxSerial board). I used my atmel stk500 to load the bootloader (ATmegaBOOT.hex from arduino folder). However I didn't do any lock bit/fuse changes. Is that necessary? If so, wich lock bits and/or fuse bits need to be changed and with what values? When I turned on the board, the led on pin 13 blinked for a while and stopped. When I tried to upload a sketch, the LED blinked again but I got the following error:

avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

My OS is: Windows Vista 32bit

Can anyone please help? Does the crystal has to be 16Mhz exact or 12MHz or 20Mhz would also work?

Thanks in advance.

However I didn't do any lock bit/fuse changes. Is that necessary?

Yes, you'll require fuse changes to set the boot-loader size and oscillator settings. The boot-loader makefile contains these.

efuse:0x00
hfuse:0xdd
lock:0x0f


The fuse/lock bits from a brand-new Atmega.


The fuse/lock bits from a Diecimila boot loader. (Amusingly it's destined for a MaxSerial kit.)

Does the crystal has to be 16Mhz exact or 12MHz or 20Mhz would also work?

The crystal must be 16MHz. Otherwise you'll need to recompile the boot loader. If you don't have 16MHz crystals or resonators on hand, you can use the onboard RC clock (@8MHz) and the lilypad boot-loader.

Does the crystal has to be 16Mhz exact or 12MHz or 20Mhz would also work?

The crystal must be 16MHz. Otherwise you'll need to recompile the boot loader. If you don't have 16MHz crystals or resonators on hand, you can use the onboard RC clock (@8MHz) and the lilypad boot-loader.[/quote]


Thanks for your help. I tried to upload the lilypad bootloader but stk500 errored out saying, it was too big to fit on the Atmega8?!! I can recompile the Atmega8 boot loader. Please advice what changes should be made in the code to use a 12MHz crystal. Or even modifly the Atmega bootloader to use internal clock.

Thanks.