For the precise application of micro controllers, crystal oscillators are preferred because they have such advantages as precision, compactness, low cost, low power consumption and high frequency generation.
Crystal oscillators use piezoelectric crystals, such as quartz, Rochelle salt, or tourmaline, to produce oscillations. The basic working principle is the inverse piezoelectric effect, in which the AC voltage applied to the crystal surface generates vibration in the crystal. The vibration occurs at the natural frequency of the crystal and is eventually converted into oscillation.
In most microcontrollers, the standard oscillation circuit consists of two parts:
- Inverting amplifier with voltage gain – This is the active part of the oscillator circuit and is on-chip in most microcontrollers.
- Frequency selective feedback path – The frequency selective feedback path is composed of quartz crystal, capacitor and resistor. The feedback path is the external circuit part of the microcontroller oscillator system.
The crystal used in the microcontroller oscillator circuit is usually quartz, because it has good quality factor, stability, small size, low cost and easy availability. The quartz crystal provides the reference frequency, which is used by the on-chip system to provide the system frequency.
The quartz crystal and two capacitors form a tuned proportional integral network, which provides a 180 ° phase shift feedback path. In addition, the capacitance in the external circuit provides some damping effect to stabilize the frequency. The external oscillator circuit has a series resistor that limits the current flowing through the crystal. The selection of series resistance depends on the piezoelectric crystal used and the required resonant frequency.