Diodes Incorporated
Back to Perspective Blog

Crystal Oscillators: Simple, Low-Cost and Highly Accurate Clock Sources

Pierce oscillator using CMOS inverter from Diodes Incorporated

By Qin Zhuang, Applications Engineering Manager


An oscillator is required in many electronic circuits to synchronize activity or provide a frequency reference.

In a microcontroller, for example, clock signals control the movement of data to and from memory, the execution of instructions and the speed of external communication. In a radio system the oscillators provide a fixed frequency that allows the transmitter and receiver to communicate.

As well as frequency, there are several properties of an oscillator that may be important. Accuracy and stability (specified in parts per million, or ppm) are important for communication protocols and timekeeping. For portable or battery-powered applications, low power may be a critical factor. Other characteristics that may need to be considered are cost and whether the frequency can be adjusted.

An oscillator uses feedback around some type of resonant circuit to generate a fixed-frequency output. The resonant circuit can be a resistance-capacitance (RC) or inductance-capacitance (LC) network. These are simple and allow the frequency to be varied over a wide range. On the other hand, they do not provide the accuracy and stability required by many applications.

                                                                                                                                                          Fig 1: Pierce oscillator using CMOS inverter

A crystal, such as quartz, can act as a resonator because of the piezoelectric effect. When pressure is applied to the crystal a voltage is generated across it, and when a voltage is applied, the crystal deforms. This can be used, with feedback, as a highly accurate and stable resonator, where the natural frequency depends on the size of the crystal and how it is cut.


Simple crystal oscillator

The crystal itself is a passive component and needs to be used with an oscillator circuit. This is often integrated into the device that requires the clock signal. For example, a microcontroller typically has two pins to connect the crystal and a couple of external load capacitors. These capacitors need to match the specified load capacitance (CL) of the crystal to ensure it oscillates at the correct frequency.

Changing the value of the load capacitors will change the frequency of oscillation by a small amount. This effect can be exploited in a voltage controlled crystal oscillator (VCXO) where variable-capacitance components (varactors or varicaps) are used to adjust the frequency.

You can build an external oscillator from discrete devices, for example using a transistor or an inverting logic gate to provide amplification and feedback. However, although crystal vendors offer design guides, building a high-quality oscillator from scratch can be complicated.

It is usually more convenient to use an off-the-shelf oscillator module. This oscillator module contains the crystal and the oscillator circuitry – you just need to provide power. Oscillator modules are typically much more accurate than the basic circuits integrated in a target device.

Although crystals are very stable, the frequency of an oscillator can be affected by changes in supply voltage and temperature. These effects can be minimized by using a temperature-compensated crystal oscillator (TCXO) module. TCXO modules include circuitry to adjust the frequency to compensate for the effect of temperature changes. The module will often also include an integrated voltage regulator to reduce the effects of external supply voltage variation. A TCXO can achieve a stability of better than 2ppm.

Crystal oscillators provide simple, low-cost and highly accurate clock sources with a wide range of frequencies that are suitable for many types of applications. You can find out more in our white paper on quartz crystal oscillator technology or check out Diodes Incorporated product pages.