How to Correctly Calculate Crystal Load Capacitance for Microcontrollers

How to Correctly Calculate Crystal Load Capacitance for Microcontrollers

When designing a digital system with a microcontroller or FPGA, an external quartz crystal is often required for precise timing. However, the crystal will only oscillate at its stated frequency if the load capacitance is correct. If it's wrong, your clock will drift, which can break UART communications or cause the oscillator to fail entirely.

The Load Capacitance Formula

The total capacitance seen by the crystal (CL) is the series combination of the two external capacitors (C1 and C2), plus stray capacitance from the PCB traces (Cstray). The formula is:

C1 = C2 = 2 * (CL - Cstray)

CL is provided in your crystal's datasheet (e.g., 18pF). Cstray is typically estimated between 2pF and 5pF depending on your PCB layout.

Layout Considerations

Even with the correct capacitors, a bad PCB layout can introduce massive parasitic capacitance. In Altium Designer, keep the crystal and its load capacitors as close to the MCU pins as possible. Ensure there is a solid ground plane directly beneath the oscillator circuit, and avoid routing high-speed digital signals near the crystal traces to prevent capacitive coupling and noise injection.

Use our Crystal Load Capacitance Calculator to quickly determine the exact E-series capacitor values you need for your next design.

Electronics
Back to Blog