Pages: [1]   Go Down
Author Topic: Trouble uploading sketch to serial arduino board  (Read 899 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: May 13, 2008, 01:51:46 am by pial » Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 205
Don't Panic
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Code:
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.)

Quote
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.
Logged

iDuino - MaxSerial - [url=http://spi

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
« Last Edit: May 13, 2008, 07:58:13 pm by pial » Logged

Pages: [1]   Go Up
Jump to: