I'm under the impression that the 16MHz crystal oscillator needs two 22pF capacitors, like this one I'm using:
Today I found out their datasheet (in comments) says 20pF. I'm a bit confused. I thought all parallel(right?) HC49/US crystals at 16MHz need 22pF. Can someone clarify this?
By the way, I did some crude testing and my standalone arduino with this crystal and 22pF caps and timing seems good, not off by like 10% or something. Thanks.
From the crystal's point of view, the two 22 pF capacitors look like they are in series, so they present a total parallel load of 11 pF. There are a few pF more (typically 5-10 pF), due to stray "wiring" capacitance and due to the input pin capacitance on the CPU.
Bottom line: If the crystal is rated for a 20 pF load, and you have 22 pF caps, the actual frequency will (probably) be a little high. In my experience, this will be a few tens of parts per million; maybe as much as a hundred or so parts per million. If you require 50 parts per million or better, then you will probably require some "padding" (small values of capacitors in parallel with the 22 pF caps) to bring the frequency down. Note that the crystals themselves are rated with certain error tolerances that may be on the order of 50 ppm. Note also that the crystal frequency will vary with temperature, so if you confirm its calibration at 20C, it might be somewhat different at 35 C or 5C.
For many (most?) applications, a few hundred parts per million won't create any practical problems. If you want to use an ATmega timer to create a time-of-day clock that remains accurate for many days note that an error of one second per day turns out to be something like 11.5 parts per million.
Bottom line: Just to get the thing up and running, you can use just about anything from 10 pF to 50 pF. If you require extreme accuracy, you will probably have to experiment. You will also need some test equipment that is at least as accurate (probably several times as accurate) as whatever it is that you are testing.
Regards,
Dave
Footnote:
Sixteen MHz crystals are commonly available (off-the shelf) with parallel resonance specifications anywhere from 7 pF through 32 pF. They are also available ground for series resonance (designed to work in a circuit that is not the same as the ATmega's crystal oscillator circuitry). Any of these will "work" with an ATMega chip (yes, even the series-ground one), but the actual frequency may be a little different than what is marked on the device.
If you really require something in the neighborhood of 10 ppm accuracy, the easiest way would be to buy an oscillator and not a crystal. The fuse settings for oscillator use are different than for crystals for the ATmega chips, so your modus operandi might be a little different than the "Pure Arduino Way." (Different bootloader settings for example. Or use the ICSP connection with some external programmer to upload sketches rather than the bootloader going through the ATmega UART. Stuff like that.)
If you need really really good precision go to ebay and search for "Efratom" or "Thunderbolt GPS". This will be more than enough precision for your Arduino
With regard to the standard crystals: crystal deviation is measured in ppm and not in % (1%=10000ppm). The crystal oscillators are usually temperature sensitive. This is because both the crystal and the caps are temperature sensitive. Getting precision below 10ppm is not as trivial as it seems unless you compensate for temperature changes (or control temperature as in in OCXO).