[solved] Bootloader and Boards.txt for ATMega328P-PU with 16MHz external quartz

Hi Forum,
I have some question for building a standalone ATMega328P-PU 16MHz external quartz PCB with the code from my Test and Development Arduino UNO R3.

-) Bootloader for a brandnew single ATMega328P-PU
So far I did upload the bootloader simply with the Arduino IDE with no doubts of doing something wrong. I have a Sparkfun AVR ISP Shield

There I put in the new ATMega328P-PU and I attach it on my Arduino UNO Board, load the ArduinoISP sketch into the Arduino, then I switch the "Programmer mode" in the tools to "Arduino as ISP", and then I push "install bootloader.
It seems to work - but I can not verify if it is ok. The LEDs on the Sparkfun Shield signaling ok.

Is this the correct method of burning the bootloader to a ATMega328P-PU which I want to run with an external 16Mhz crystal?

The reason why I am asking is that I am weird reading to much google and people say that not only every µC needs a special bootloader but also if the µC runs on a certain clock (8MHz internal, 8MHz external, 16MHz external, ...)

Then I read something about optiboot which seems to be a cool stuff.What would be the advantage of taking optiboot and how do I know if I burn a "normal" bootloader or a "optiboot" bootloader on my ATMega328P-PU?

What I did is to download the Optiboot directory and put it into the hardware directory.
So now I can choose different Optiboot boards. I attached a screenshot of my available boards in the Arduino IDE.
Is there now a better choice for my ATMega328P-PU chip?

I know that my questions seems to sound stupid, but as always on the beginning of a hobby there are a lot of stupid questions. Saying that I hope that there will come some good answers :slight_smile:

best regards

That is the correct way of bootloading an Atmega328p for use with an external 16mhz crystal.

The Atmel chips we usually work with can usually run either at 1mhz or 8mhz off internal RC, or from an external crystal (typically 16mhz). When you burn the bootloader, it also sets the fuse bits to tell the chip whether to use external crystal.

Each entry in that boards menu corresponds to an entry in a boards.txt file, and that entry lists the bootloader and fuse bits (used to configure clock), and the clock speed (for calculating delay()s), among other things

The default Arduino Uno bootloader is optiboot already.

Nick Gammon's Bare Arduino

An ATmega328p with 16MHz external crystal is effectively an Uno. You can use the Uno boards.txt entry and (optiboot) bootloader, and things should work fine.

Or you can uses "Duemilanove with m328" boards.txt entry, which uses the older (bigger, slower) bootloader. Some of the third party boards (sparkfun, adafruit) are doing this.

Thank you DrAzzy and westfw for telling me clear whats the fact on my problem!
Now I can continue using the "Uno" way without having doubts doing something wrong.

very best regards!!!