Configure 16Mhz on a standalone 328P chip

There is a tutorial about how to use the 328p chip on a breadboard. https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard
The chip is configured at 8Mhz instead of using 16Mhz as in the Uno board. I have two questions as follows:

  1. Can I configure it to work at 16Mhz clock rate?
  2. If it is possible is there any problem with the accuracy of the CPU clock when work under 16Mhz compared to 8Mhz.
    I read some threads, and know that the clock rate can be changed in the boards.txt file, but it seems not work as my desire after several tests.
    Thank in advance!
  1. Can I configure it to work at 16Mhz clock rate?

Yes.

You do not change the boards.txt file to change an 8MHz 328 to 16MHz. You install a 16MHz crystal and associated 18pf capacitors and burn the correct bootloader which sets the proper fuses for the board to run at 16MHz.

Hi!

The simplest way to do it without messing with the fuses,
is to burn the Arduino Uno bootloader on the standalone chip using an ISP programmer, it'll configure it at 16MHz
and then Ctrl+Shift+U the actual sketch to it.

Works like a charm every time.

Cheers!

redflood:
2. If it is possible is there any problem with the accuracy of the CPU clock when work under 16Mhz compared to 8Mhz.

When running at 16 MHz the accuracy depends on the accuracy of your 16 MHz crystal or resonator. Generally a crystal will have higher accuracy than a resonator. What degree of accuracy did you want? Looks like frequency stability and frequency tolerance are specified separately and range from abut 100 ppm to 10 ppm. Looks like the prices are about the same across the range (Under $1 from DigiKey.com).