A crystal is one of the few components where the datasheet frequency is conditional. The part is cut and trimmed to oscillate at 16.000 MHz with a specific load capacitance, usually 8, 10 or 12 pF. Change the load and the frequency moves. The circuit designer controls the load, so the designer controls the error.
This is why two boards with the same crystal can have clocks 60 ppm apart, and why a design copied from a reference schematic sometimes runs at the edge of a bus tolerance.
The formula, and the mistake
The load capacitance seen by the crystal is the series combination of the two load capacitors plus the stray capacitance of the traces and pins:
```
CL = (C1 * C2) / (C1 + C2) + Cstray
```
With equal capacitors this becomes C1 divided by two plus stray. Turning it around, for a target load capacitance and an assumed stray of 4 pF:
```
C1 = C2 = 2 * (CL - Cstray)
```
A crystal with CL of 8 pF and 4 pF of stray needs 8 pF on each side. A crystal with CL of 12 pF needs 16 pF on each side.
The common mistake is to put the load capacitance value on each side. That gives an effective load of half the intended value plus stray, which pulls the frequency high or low depending on the crystal cut, and it is a mistake that survives because the oscillator still starts and still produces a clock. It is just not the clock the datasheet promised.
Stray capacitance is not a guess to be taken lightly at these values. A short trace on an inner layer with a ground plane underneath contributes 1 to 2 pF. A socket adds more. Long traces to a crystal placed far from the chip can add 5 pF, which at 8 pF load is a 25 percent error in the capacitor calculation.
What the error actually costs
Pullability, sometimes called trim sensitivity, is the change in frequency per picofarad of load capacitance. For a small MHz crystal in a 3.2 by 2.5 mm package it is typically 10 to 30 ppm per pF, and it rises with the square of the frequency for a given crystal cut.
So 2 pF too much load on a 25 ppm per pF part is 50 ppm low. Add the crystal's own tolerance of plus or minus 10 or 20 ppm, the temperature drift of another 10 to 30 ppm over the industrial range, and aging of 3 to 5 ppm per year, and a part specified as 20 ppm is running at 90 ppm in year three.
Whether that matters depends entirely on the interface:
| Interface | Tolerance | What 90 ppm does |
|---|---|---|
| UART, asynchronous | about 2 to 3 percent total | nothing |
| CAN bus | about 0.5 percent | nothing |
| USB full speed | 2,500 ppm | nothing |
| USB high speed | 500 ppm | uses a fifth of the budget |
| Ethernet RMII | 50 ppm at the PHY | fails |
| RF synthesizer reference | depends on loop | may fail adjacent channel |
Ethernet is the one that catches people. An RMII PHY that needs a 50 ppm reference and gets a crystal with 30 ppm tolerance, 30 ppm temperature drift and 20 ppm of load error will not link reliably, and the failure appears as occasional packet loss under temperature rather than a clean no-link.
The ppm budget is a column, not a number
Engineers often compare a crystal's tolerance figure to the interface requirement and stop. The tolerance figure is measured at 25 degrees with the specified load. It is one line in a budget with four or five.
| Source | Typical value | Notes |
|---|---|---|
| Crystal tolerance at 25 C | plus or minus 10 to 30 ppm | the headline number |
| Temperature drift | plus or minus 10 to 30 ppm | over the operating range, from the curve |
| Load capacitance error | 0 to 50 ppm | your layout, your capacitors |
| Aging, first year | 1 to 5 ppm | cumulative, logarithmic |
| Supply voltage variation | 1 to 5 ppm | small but not zero |
Add them linearly for a conservative estimate, or root-sum-square if the sources are independent and you want the statistical answer. For a 50 ppm interface, a part with 30 ppm tolerance and 30 ppm temperature swing is already over budget before the load error.
That is the argument for an oscillator instead of a crystal. A packaged oscillator contains the crystal and the circuit, is trimmed at the factory, and specifies the whole error over temperature in one number, typically 20 to 50 ppm. It costs more and takes more board area, and for anything with a tight clock requirement it removes a variable the layout would otherwise control.
Negative resistance and starting
Frequency is the visible specification. Starting is the one that fails in the field.
The oscillator amplifier has a negative resistance, and the crystal needs the loop gain to exceed its losses. The rule of thumb is that the negative resistance should be at least three to five times the crystal's maximum equivalent series resistance over temperature. Below that, the circuit may start at room temperature and fail at minus 20, or start slowly enough that the microcontroller's clock monitor trips.
Negative resistance is reduced by the load capacitors, because they are part of the resonant tank. Larger capacitors for a lower load capacitance target, which is the mistake described earlier, also slow the start and reduce the margin. This is the second reason the capacitor calculation matters.
Measuring it is not hard. Insert a resistor in series with the crystal, increase it until oscillation stops, and the value at which it stops is the negative resistance. Compare that against the crystal ESR from the datasheet, at the temperature you care about, and keep the ratio above three.
Drive level is the other limit. Too much power through a small crystal accelerates aging and can crack the blank. Datasheets give a maximum, often 100 or 500 microwatts for small SMD parts. The oscillator circuit sets the drive, and if the chip has a programmable drive strength, the highest setting is not automatically the right one.
The 32.768 kHz case
Watch crystals are a separate discipline. Frequency is 32,768 Hz, load capacitance is usually 6, 7 or 12.5 pF, and the pullability is tiny, so a capacitor error moves the clock by a fraction of a ppm. Getting the load wrong here does not usually cause a timekeeping error you would notice.
What it does cause is a failure to start. A tuning fork crystal has ESR of 30 to 70 kilo-ohms, sometimes more, and the oscillator is a micropower circuit with limited gain. Oversized load capacitors, contamination on the board, or flux residue across the pins can all stop it. The symptom is a real-time clock that works on the bench and loses time in the field, or one that starts only after the board warms up.
Two practical rules. Keep the crystal and its capacitors as close to the chip as the layout allows, with a guard ground and no signals routed underneath. And clean the board, because the leakage path across a contaminated 32 kHz node is comparable to the crystal impedance.
Crystal or oscillator, and when the difference pays
The two parts do the same job and are priced differently, which makes the choice look simple in the wrong direction.
A crystal costs tens of cents and needs two capacitors, a layout that keeps traces short, and a chip with an oscillator amplifier. A packaged oscillator costs a dollar or two, needs power and a clean ground, and produces a clock without any tuning. For a product built in thousands, the difference is real money.
The case for the oscillator is not the component cost, it is the engineering and the risk. An oscillator specifies total stability over temperature, supply and load in one number, usually 20 to 50 ppm, sometimes 10 for a TCXO. There is no load capacitance to calculate, no negative resistance to verify, no stray capacitance to estimate from a layout that does not exist yet. For a first prototype, or for a design with a tight clock budget, that removes a whole class of failure.
The case for the crystal is where the clock budget is loose. A microcontroller running from its internal PLL, a UART, a low speed bus: none of these care about 60 ppm. A crystal plus two C0G capacitors is the cheapest way to get a stable clock that does not depend on the internal RC oscillator's five percent tolerance.
Places where the oscillator usually wins: Ethernet PHYs with a 50 ppm requirement, USB high speed, RF synthesizers, anything with a clock that leaves the board, and anything where the product will be built by a contract manufacturer who will not measure the load capacitance. Places where the crystal wins: cost-sensitive digital boards, battery devices where the oscillator quiescent current matters, and designs already qualified around a crystal.
Measuring the clock instead of trusting it
Frequency is one of the few parameters a small team can verify completely with a bench instrument, and it is worth doing once per design rather than once per batch.
A frequency counter with 1 ppm accuracy, or a scope with a good time base and a long gate, will show the actual output. Measure at room temperature first, then at the extremes of the operating range. The number to compare against is the interface tolerance, not the crystal tolerance, because the interface is what fails.
Measuring at the crystal itself is harder than measuring the output, because the probe capacitance adds to the load and shifts the frequency as you measure. A FET probe with 1 pF or less is the right tool; a standard 10 pF probe will pull a 8 pF load design by more than 20 percent and the reading will be meaningless.
For a design with a programmable clock output, the simplest check is to route the clock to a pin and measure there. It costs a test point and it turns an invisible parameter into a number on a screen.
The one measurement teams skip is startup at cold. Put the board in a freezer for an hour, power it up, and confirm the clock starts within the time the microcontroller expects. A marginal negative resistance passes every room temperature test and fails the one condition the product will actually see in winter.
Buying the right part
A crystal order needs five attributes, and leaving one out is how a wrong part arrives:
- Frequency, to six or seven digits, since 14.318 MHz and 14.31818 MHz are not the same part
- Load capacitance, in picofarads
- Frequency tolerance at 25 degrees, in ppm
- Operating temperature range and the drift over it
- Package and, for tuning fork parts, ESR
The load capacitance is the one most often omitted, because it looks like a detail. It is not a detail. It is the condition under which the frequency is true.
Second-sourcing a crystal is where this bites. A distributor cross-reference may match frequency, package and tolerance and miss the load capacitance, or match all four and miss the temperature range. A 12 pF part substituted for an 8 pF part will oscillate and will be off frequency, and no incoming inspection short of a frequency counter at the right load will catch it.
If a design is sensitive, specify the load capacitance on the bill of materials, not just the frequency. And if a substitute is proposed, ask for its load capacitance before approving it. The two numbers that matter are on the first page of the datasheet, and they are usually read one at a time.