Crystal oscillator is the key in digital circuit design. Usually, in circuit design, crystal oscillator is regarded as the heart of digital circuit. All the work of digital circuit is inseparable from clock signal, and crystal oscillator is the key button that directly controls the normal start of the whole system. It can be said that crystal oscillator can be seen where there is digital circuit design.

一 Definition of crystal oscillator
Crystal oscillator generally refers to quartz crystal oscillator and quartz crystal resonator, and can also be directly called crystal oscillator. Are made by using the piezoelectric effect of Shi Ying crystal.
Its working principle is as follows: when an electric field is applied to two electrodes of the crystal, the crystal will be mechanically deformed; conversely, if a mechanical pressure is applied to both ends of the crystal, the crystal will generate an electric field. This phenomenon is reversible, so taking advantage of this characteristic of crystal and applying alternating voltage across the crystal, the wafer will produce mechanical vibration and alternating electric field at the same time. However, the vibration and electric field generated by crystals are generally very small, but as long as they are at a certain frequency, the amplitude will increase obviously, just like the LC circuit resonance that we circuit designers often see.
二 Classification of crystal oscillator
Passive crystal oscillator is a crystal, generally a 2-pin nonpolar device (some passive crystal oscillators have nonpolar fixed pins). Generally, a passive crystal oscillator can generate an oscillation signal (sine wave signal) by means of a clock circuit formed by a load capacitor.
The active crystal oscillator is an oscillator, usually with four pins. Active crystal oscillator does not need the internal oscillator of CPU to generate square wave signal. An active crystal oscillator can generate a clock signal by supplying power.
Active crystal oscillator has stable signal, good quality, simple connection mode, smaller precision error and more expensive price than passive crystal oscillator.
三 Equivalent circuit of crystal oscillator
In fact, the crystal oscillator acts like a series RLC circuit. The equivalent circuit of the crystal oscillator shows a series RLC circuit, which represents the mechanical vibration of the crystal oscillator, and the parallel connection with a capacitor represents the electrical connection with the crystal oscillator, and the crystal oscillator works towards series resonance.
四 Basic parameters of crystal oscillator
The basic parameters of general crystal oscillator are: working temperature, precision value, matching capacitance, packaging form, core frequency and so on.
Core frequency of crystal oscillator: Generally, the choice of crystal oscillator frequency depends on the requirements of frequency components, such as MCU, which is generally in a range, mostly ranging from 4M to tens of M.
Precision of crystal oscillator: The precision of crystal oscillator is generally within 5 ppm, ±10PPM, 20 ppm, 50 ppm, etc., and the high-precision clock chip is generally within 5 ppm, so it will be selected around 20 ppm in general use.
Matching capacitance of crystal oscillator: usually, the core frequency of crystal oscillator can be changed by adjusting the value of matching capacitance. At present, this method is used to adjust the crystal oscillator with high precision.






