Crystal oscillator and external capacitor

I have a couple of questions on the crystal oscillator of atmega328p-au.

According to the spec doc 8271, there are two types of oscillators: low-power and full-swing. This might be decided by a fuse setting CKSEL3...1, such as full-swing fuse value to be 011 (P29-30). My question is: is my ATMEGA328P-AU or PU set to use full-swing? Is the process of bootloading where fuse is set?

Docu8271 rev G:

My other question is: if I want 16MHz, what external capacitor value do I use? I've always used 22pF and the HC49US crystal that has 18pF load capacitance. Now I am moving towards surface mount. This one in seeedstudio has 8pF load capacitance. What external cap should I use?

http://www.seeedstudio.com/wiki/Open_parts_library

Crystal is all the way to the bottom. They have 22pF, 27pF and 8.5pF.

Say if I wanted to test the actual frequency of the oscillation, what testing device would I need?

Thank you!

I've used 22pF all along. Maybe drop down to 12pF. Or leave off to start, so if the board traces provide enough capacitance.
boards.txt has the fuse settings that get used when you bootload.
One of the fuse bits sets PortB0 to output the system clock, can measure it directly there.
I use an oscilloscope, one of the handiest tools around.

CR,

Thank you very much! I looked into the boards.txt for UNO:

uno.bootloader.low_fuses=0xff
uno.bootloader.high_fuses=0xde
uno.bootloader.extended_fuses=0x05

So from the doc8271, low byte being FF means all CKSEL are unprogrammed (1). Then we are using low power oscillator with source "Crystal Oscillator, slowly rising power" (P29 table 9-4), and frequency 8-16MHz (table 9-3), no clock output or dividing crystal frequency by 8. Am I understanding this correctly?

Then extended fuse sets BOD to 2.7V typical with 0B101, why not 4.5V? Table 29-17

My only problem now is not knowing what fuse values the XLoader uses for UNO. The program folder has no fuse information. The website seems to have been filled with spam replies. Not sure if I will reach the author.

http://russemotto.com/xloader/

I'll see if I can find a tool to read the fuse bytes.

I have access to a 200MHz 2GS/s scope. Not sure which number is the maximal frequency :slight_smile:

Try Nick Gammon's sketch for reading the fuses.

4.5V would be kinda high for BOD - that could kick in with 3AA batteries for instance.
Can go as low as 3.8V & work at 16 MHz & be in spec still.

That scope will do.

Great! Thanks!