Crystal Load Capacitor Calculator — MCU Clock Design
External capacitor selection for crystal accuracy
Required Parameters
Waiting for input data...
Quick Answer
Crystal load caps: C_ext = 2 × (CL − C_stray). For CL=12 pF and 3 pF stray → 18 pF per pin. Wrong caps cause UART baud drift.
Crystal Load Capacitor Calculator — Clock Accuracy Guide
Use this crystal load capacitor calculator to size the two external caps that match your crystal's datasheet CL spec. Wrong load caps are the #1 cause of UART baud drift and USB timing failures.
Formula
C_ext = 2 × (CL_crystal − C_stray)
Where:
- CL_crystal — load capacitance from the crystal datasheet (typically 8–20 pF)
- C_stray — pin + trace + IC input capacitance per pin (usually 2–5 pF)
The two external capacitors appear in series to the crystal; each pin gets the same value C_ext.
Worked example — 16 MHz, CL = 12 pF
Assume C_stray = 3 pF per pin:
- C_ext = 2 × (12 − 3) = 18 pF per pin
- Use nearest standard: 18 pF or 22 pF C0G/NP0
- Verify frequency with a counter — expect ±10–50 ppm shift per ~5 pF error
Common MCU crystal choices
| Application | Frequency | Notes |
|---|---|---|
| General MCU | 8 / 16 MHz | Arduino Uno uses 16 MHz |
| USB full-speed | 12 MHz | Exact multiple required |
| UART-friendly | 11.0592 MHz | Zero baud error at 9600–115200 |
| RTC | 32.768 kHz | Divides to exactly 1 Hz |
Layout tips
- Keep crystal traces short (< 5 mm ideal)
- Place load caps adjacent to crystal pins
- Use C0G/NP0 for load caps — X7R drift affects ppm stability
Related tools
- Crystal Load Cap Calculator — interactive sizing
- SMD Capacitor Code Calculator — decode cap markings
- Component Derating Calculator — voltage margin on MLCC load caps
- UART Baud Rate Calculator — verify baud after clock selection
Design Notes
The crystal's load capacitance (CL) is specified by the manufacturer (typically 8-20pF). The two external caps appear in series to the crystal. Stray capacitance includes pin capacitance (~2pF), trace capacitance (~1-3pF), and IC input capacitance. Wrong load caps cause frequency deviation — too much cap = lower frequency, too little = higher.
Common Mistakes
- 1
Using the crystal's CL value directly as the cap value — you need to solve for the series combination.
- 2
Forgetting stray capacitance — it can be 3-7pF, significantly affecting small CL crystals.
- 3
Placing long traces between crystal and IC — adds stray capacitance and may pick up noise.
Engineering Handbox
1. CL from datasheet = 12 pF 2. Stray per pin = 3 pF 3. C_ext = 2 × (12 − 3) = 18 pF per pin
Knowledge Base
How do I calculate crystal load capacitors?
C_ext = 2 × (CL - C_stray), where CL is the crystal's specified load capacitance (from datasheet) and C_stray is the total stray capacitance per pin (typically 2-5pF including IC pin capacitance and PCB traces). For a 16MHz crystal with CL=12pF and 3pF stray: C_ext = 2×(12-3) = 18pF per pin.
What happens if load capacitors are wrong?
Too much capacitance: frequency shifts lower than nominal, increased startup time, higher power consumption. Too little capacitance: frequency shifts higher, potential oscillation instability, may fail to start in some conditions. Typical sensitivity: ±5pF error causes ~10-50ppm frequency shift.
What is crystal load capacitance?
Load capacitance (CL) is specified by the crystal manufacturer (typically 8-20pF). It's the total external capacitance the crystal 'sees' for it to oscillate at its specified frequency. The two external capacitors appear in series to the crystal: CL_effective = (C1 × C2)/(C1 + C2) + C_stray. Usually C1 = C2.
How do I estimate stray capacitance?
Sources: IC oscillator pin capacitance (check datasheet, typically 2-5pF per pin), PCB trace capacitance (~0.5-1pF per cm), via capacitance (~0.5pF each), nearby copper pour coupling. Total stray per pin is typically 2-5pF for compact layouts. Measure with a VNA for precision applications.
What crystal frequency should I choose for my MCU?
Common choices: 8 MHz (STM32, AVR general purpose), 12 MHz (USB full-speed, requires exact frequency), 16 MHz (Arduino Uno), 25 MHz (Ethernet PHY), 32.768 kHz (RTC, divides to exactly 1 Hz). For UART: 11.0592 MHz eliminates baud rate error at standard rates.
Crystal vs MEMS oscillator?
Crystal: lowest cost, ±10-50ppm accuracy, requires external caps, 1-5ms startup. MEMS oscillator: higher cost, ±10-50ppm, no external components, faster startup (<1ms), vibration resistant. Crystal is better for: cost-sensitive, precision timing. MEMS for: vibration environments, PCB space constraints, guaranteed startup.
Related Engineering Tools
555 Timer Calculator
Monostable and astable timing
I²C Pull-Up Resistor Calculator
Optimal pull-up for bus speed and capacitance
UART Baud Rate Error Calculator
Clock divider and baud rate accuracy
ADC/DAC Resolution Calculator
LSB size, ENOB, and dynamic range