Pages: [1]   Go Down
Author Topic: Bootloader for 8MHz ATMEGA328  (Read 512 times)
0 Members and 1 Guest are viewing this topic.
Germany
Offline Offline
Faraday Member
**
Karma: 49
Posts: 2741
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 ? )
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 71
Posts: 3511
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 106
Posts: 6373
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)
Logged

Germany
Offline Offline
Faraday Member
**
Karma: 49
Posts: 2741
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: