A crystal oscillator is an electronic oscillator circuit that uses the mechanical resonance of a vibrating crystal of piezoelectrial material to create an electrical signal with a very precise frequency. This frequency is commonly used to keep track of time (as in quartz wristwatches), to provide a stable clock signal for digital integrated circuits and to stabilize frequencies for radio transmitters and receivers. The most common type of piezoelectric resonator used is the quartz crystal so oscillator circuits designed around them became known as "crystal oscillators."
Quartz crystals are manufactured for frequencies from a few tens of kilohertz to tens of megahertz. More than two billion (2×109) crystals are manufactured annually. Most are used for consumer devices such as wristwatches, clocks, radios, computers, and cell phones. Quartz crystals are also found inside test and measurement equipment, such as counters, signal generators, and oscilloscopes.
APPLICATION of Quartz crystal
1) In some systems the CPU and bus timing is a limit to the highest and sometimes the lowest CPU clock frequency, so the clock needs to be stable enough to guarantee timing requirements are met according to the design and the specification.
2) In other systems the CPU timing might be used for timing of application tasks. For example, a real time clock, or a counter timer used to measure periods or generate accurate clock ticks may be involved. These need a reference clock that is sufficiently accurate for the needs of that particular application.
3) There are also applications where the clock is deliberately randomised to some extent, to spread interference from the system a little. The crystal oscillator in computers is not always a high precision reference, but a quartz crystal usually has sufficient stability and accuracy for the purpose.
4) A microcontroller/processor needs a stable clock to run. Provided the circuit and external capacitors are set up correctly, and located close to the xtal pins on the micro, the crystal oscillator will oscillate at the specified rate. If the clock isn't stable we could encounter timing problems inside our micro. Violating setup and hold times will cause erratic behaviour.