I know there are lots of similar questions on here, but I've read many of them and am still a little confused.

I'm a student making a board similar to the Arduino Pro Micro, using a Atmega32U4 microcontroller. SparkFun's version shows the crystal circuit as this:

enter image description here

The above iamge shows 22pF capacitors being used, and I'm trying to determine what the load capacitance of the crystal should be.

I found the formula for the capacitors to be: CL = (C1 * C2) / (C1 + C2) + Cs

If I assume the stray capacitance is 5pF (seems to be a somewhat standard assumption) and use 22pF capacitors, then the above equation gives: CL = (22*22)/(22+22) + 5 = 16pF

So if I want to use 22pF capacitors in the circuit, I need a crystal with a load capacitance of 16pF, correct? Looking on Digi-Key, the closest I see is 18pF.

If using an approximate value for the crystal load capacitance (such as 18pF when 16pF is calculated) is unacceptable, then I could go in the other direction, first choosing the crystal and based on it's load capacitance calculate the required capacitors values.

For example, I see a crystal with 8pF load capacitance, so using the above equation I can calculate CL = 6pF. However, every single schematic I see for an Arduino or Atmega circuit shows 18pF, 20pF, or 22pF capacitors being used, which makes me question whether lower capacitor values such as 6pF are acceptable?


There is much misinformation out there on this. The load capacitance specified for the crystal is what should be across the crystal from the crystal's point of view. As a first reaction, that is the series combination of the two caps C2 and C4.

However, there is a lot more going on there and various (usually invalid) assumption are embodied in this common knee-jerk formula. Instead of rules of thumb, look at what is really going on. Two things that can significantly change the apparent capacitive load across the crystal are stray capacitance and the impedance of the driver driving the input signal to the crystal.

Consider how this circuit looks if the impedance of the crystal driver output is 0 (perfect voltage source). The cap on that output is irrelevant, and the load seen by the crystal is the full output cap. To get some idea what impedance range this is relevant for, consider that the impedance magnitude of 22 pF at 16 MHz is 450 Ω. Is the impedance of the output that is driving the crystal 450 Ω or less? Quite possibly yes. However, this is rarely specified, so you have to guess.

You also have to guess what the stray capacitance might be. I'd say you're 5 pF figure is reasonable, given a reasonable layout. So if the crystal driver has infinite impedance, the capacitive load on the crystal is 16 pF. If it has 0 impedance, the load on the crystal is 27 pF. The reality is of course somewhere in between.

In reality, for normal typical microcontroller crystals somewhere around 10 MHz (factor of 2 is close enough), 22 pF caps on both sides is a good bet.

The point to all this is that there are a lot of unknowns you can't account for. This is one place you can't analyze down to small detail. If two 22 pF caps seems to get you in the ballpark, just go with that. That's what I do, and I haven't had any problems. Fortunately crystals have a very sharp frequency curve and a factor of 2 either way from the specified load capacitance is usually fine. If you need better than a few 10s of PPM, then you probably need to do some tests with carefully calibrated instruments.


Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.