Go Down

Topic: Bootloader for 8MHz ATMEGA328 (Read 705 times) previous topic - next topic

michael_x

I find those bootloaders in my Arduino environment:

C:\arduino-1.0.1\hardware\arduino\bootloaders\optiboot\optiboot_atmega328-Mini.hex
C:\arduino-1.0.1\hardware\arduino\bootloaders\optiboot\optiboot_atmega328.hex

The "-Mini" is not mentioned in README.TXT
Quote
Standard Targets
I've reduced the pre-built and source-version-controlled targets
(.hex and .lst files included in the git repository) to just the
three basic 16MHz targets: atmega8, atmega16, atmega328.



- What's the difference between -Mini and regular (size seems very similar) ?

- Are they both usable for a standalone 8MHz (no external crystal) ATMEGA328P ?
(readme mentions they are all for 16MHz target: do I need to change some stuff and run omake for an 8MHz target, is there a foolproof tutorial on how to do that ? )

Jack Christensen

Those are both 16MHz bootloaders. This one is 8MHz:
ATmegaBOOT_168_atmega328_pro_8MHz.hex

I don't believe an 8MHz version of Optiboot comes with the IDE, but I re-compiled it for 8MHz and uploaded it here:
http://arduino.cc/forum/index.php/topic,101064.msg760450.html#msg760450

When using the internal RC oscillator instead of a crystal, it may or may not run close enough to 8MHz to allow serial comm (and therefore the bootloader) to function without errors. I've had pretty good luck though, and I think others have as well; many of the chips seem to run pretty darn close at least at room temperature. Just be aware that it may be a bit of a crap shoot.
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

westfw

The -mini version is for the Arduino-mini board.  I'm not sure how it's different, it seems to be a slightly older version than he others.

I would say that for an 8MHz chip, make sure the fuses are right,use the 16MHz bootloader hex file, and modify boards.txt to run the uploads at half speed (57600 bps)

michael_x


Those are both 16MHz bootloaders. This one is 8MHz:
ATmegaBOOT_168_atmega328_pro_8MHz.hex

I don't believe an 8MHz version of Optiboot comes with the IDE, but I re-compiled it for 8MHz and uploaded it here:
http://arduino.cc/forum/index.php/topic,101064.msg760450.html#msg760450

When using the internal RC oscillator instead of a crystal, it may or may not run close enough to 8MHz to allow serial comm (and therefore the bootloader) to function without errors. I've had pretty good luck though, and I think others have as well; many of the chips seem to run pretty darn close at least at room temperature. Just be aware that it may be a bit of a crap shoot.


Thanks you very much, Jack.
I understand Bill's (westfw) hint to reduce upload speed aims at helping with clock speed deviations without a crystal. Thanks as well.
What I do not understand is how a prebuilt bootloader sets the serial speed dynamically after a reset ?
Is there a fixed speed dialog first, and then both sides change serial speed according to their initial sync dialog ?

On the other side, as I have the task to load a bootloader first, there's not too much benefit of using a bootloader at all, instead of loading the target hex file directly.

Go Up