I'm doing an experiment with running an independent Atmega1280 chip in a breadboard-Arduino style (sort of). Works great with the default Arduino Mega1280 bootloader, with the chip running @ 5 Volts, 16 Mhz.
However, my idea is to run the chip at 3.3 Volts, and thus with an external crystal of 8 Mhz, going by the allowed frequency suggested by datasheet.
What would I need to change in the boards.txt file and/or other files, in order to burn the Arduino bootloader onto the Atmega1280, and facilitate the 3.3-V/8Mhz instead of the original 5-V/16Mhz?
(Note: I'm using my Uno as the programmer device.)
Currently, the boards.txt file says the following (default):
mega.name=Arduino Mega (ATmega1280)
mega.upload.protocol=stk500
mega.upload.maximum_size=126976
mega.upload.speed=57600
mega.bootloader.low_fuses=0xFF
mega.bootloader.high_fuses=0xDA
mega.bootloader.extended_fuses=0xF5
mega.bootloader.path=atmega
mega.bootloader.file=ATmegaBOOT_168_atmega1280.hex
mega.bootloader.unlock_bits=0x3F
mega.bootloader.lock_bits=0x0F
mega.build.mcu=atmega1280
mega.build.f_cpu=16000000L
mega.build.core=arduino
Well I'm certanly not the bootloader expert around here, but I think by your using an external 8Mhz crystal the only changes you would have to make are:
mega.upload.speed=57600 to mega.upload.speed=28800
and
mega.build.f_cpu=16000000L to mega.build.f_cpu=8000000L
Let us know how it turns out.
Lefty
Almost there! Specifically, bootloader upload worked great...
HOWEVER, now when I try to upload (via standard FTDI-FT232 chip),
the Arduino IDE states:
avrdude: serial_baud_lookup(): unknown baud rate: 28800
How can this 28800 baud rate (different from the standard 19200 or 57600) be made possible in the sketch upload?
In the meantime, I'm trying to look through the Arduino folder for any possible config files that can be edited to allow this baud rate.
giantsfan3:
Almost there! Specifically, bootloader upload worked great...
HOWEVER, now when I try to upload (via standard FTDI-FT232 chip),
the Arduino IDE states:
avrdude: serial_baud_lookup(): unknown baud rate: 28800
How can this 28800 baud rate (different from the standard 19200 or 57600) be made possible in the sketch upload?
In the meantime, I'm trying to look through the Arduino folder for any possible config files that can be edited to allow this baud rate.
That's unfortunate. Seems that AVRDUDE can't use 28800 baudrate. Your bootloader is hardcoded to work at 57600 when running at 16Mhz, so if clocked at 8Mhz only a 28800 baudrate would decode correctly. But if AVRDUDE won't play at 28800 rate your SOL I guess. The bootloader will have to be recompiled to a standard AVRDUDE compatible baudrate I guess, which I can't help you with.
Lefty
Lefty, Problem solved! I was using Arduino-022 earlier but now downloaded Arduino 1.0 which, I think by using the latest version of AVR, allows uploading sketches using non-standard baud rates, including 28800.
Got that fact from this post: Optiboot with FTDI Problems.. - #20 by tim7 - Microcontrollers - Arduino Forum
giantsfan3:
Lefty, Problem solved! I was using Arduino-022 earlier but now downloaded Arduino 1.0 which, I think by using the latest version of AVR, allows uploading sketches using non-standard baud rates, including 28800.
Got that fact from this post: Optiboot with FTDI Problems.. - #20 by tim7 - Microcontrollers - Arduino Forum
That is good news. Good luck on your project.
Lefty