Electronic – why capacitors are used with crystal oscillator

8051capacitor

I want to learn 8051 programming so I begin from hardware in which crystal oscillator is connected with capacitors. can anyone please explain why capacitors are used and why those 22pF? how they calculated?

Best Answer

Andy has provided a fine answer. Here's another perspective that looks at power dissipated by the crystal...
From Andy's plots, the oscillator isn't likely to oscillate if the two added capacitors (C1 & C2) have small values. In a simulation, a 74HCU04 10 MHz. crystal oscillator would not start when C1 & C2 were much less than 5 pf. In this circuit, no series resistor was added to the HCU04 output pin, as in Andy's example circuit:(R1).
10MHz crystal oscillator
For C1, C2 = 5pf, oscillations were feeble, and the circuit would be unreliable. AC power dissipated in the crystal's R1 (20 ohms) was 1.25 uW, well within the typical crystal power spec around 100uW. Crystal frequency would be somewhat higher than 10.0 MHz, since C1 & C2 are below the crystal manufacturers' spec of 18 pf.

For larger values of C1 & C2, oscillations start more readily, and build more robustly, to finally settle with larger crystal current (and larger power):

  • C1 & C2 = 5.0pf....power 1.25 uW
  • C1 & C2 = 8.0pf....power 6.5 uW
  • C1 & C2 = 20 pf....power 77 uW
  • C1 & C2 = 47 pf....power 314 uW

This last case (C1 & C2 = 47pf) exceeds the recommended manufacturer's power dissipation for the crystal. Oscillator frequency for this case would be on the low-side of 10 MHz. Capacitors C1 & C2 are usually chosen so that oscillator frequency is very close to the crystal manufacturer's target frequency, since frequency is often of prime importance to the circuits that this oscillator drives.
Too little capacitance raises oscillator frequency, and risks a feeble oscillator that refuses to oscillate.
Too much capacitance runs at a lower oscillator frequency, and risks damaging the crystal with too much power. Such a robust oscillator can also potentially run at spurious crystal resonances other than the fundamental frequency. In this simple simulation, only the fundamental crystal resonance is included.