Clarify crystal loading description

Hi all,

Need some clarification of how to go about choosing correct value capacitors for a crystal connected to an MCU.

Cload is mentioned on the crystal datasheet; for example 18pF.
The formula (C1*C2)/(C1+C2)+Cstray is cited as being used to determine the appropriate caps for the crystal based on Cload.
There is no mention of considering the capacitance at the MCU Xin port. Is this important ? Can the MCU Xin capacitance be ignored or should it be added to Cstray or added to C1/C2?
Are there any potential issues when Cload value [of a crystal] is not close to value of Xin_C of the MCU ?

Many thanks,
Bob.

Device pin and stray capacitances are just as much a part of a circuit as any one might plant explicitly, and ideally would be taken into account. “Stray” capacitance can take on several forms however, and one ought be wary about employing unfamiliar formulas if the intended meaning of the terms is not understood.

The typical effect of being off slightly from the target load capacitance is a shift in oscillation frequency. In more extreme cases, other effects may be noted.

1 Like

If you have time to experiment, since Stray is near impossible to calculate/measure a way to create a “Safety Factor” for crystals is to take the value the formula provides you and purchase two of every capacitor value near that formulated value and test the top and bottom limits of when the crystal stops operating with your MCU.

Then take the sum of the top and bottom values and divide by 2 to get an average.

The closest standard value to that average would be the recommended value to use with that crystal. This method is a way to test the formula in real world.

Getting the formula wrong ends up often picking a capacitor value that is on the edge of working (intermittant) and is extremely difficult to troubleshoot.

2 Likes