How Clock Oscillator Connects to an Microcontroller

Crystal, Resonator and Oscillators, what’s the difference ?

Today, We are going to discuss about the basic differences between Crystal, Resonator and Oscillator. Most of the people are confused about the fine line of differences between three of them. Let me tell you these 3 are different things for almost same purpose, that purpose is to generate Clock signal of some fixed frequency.

Its not only me, Digikey also stocks these things under 3 different categories…

Digikey Listing under Category Crystals & Oscillator

This is what Crystals Looks like at Digikey

and Oscillator at Digikey 

and Finally Resonators at Digikey 

So, Visually also they are very different





Functionality Wise also they are different, though the purpose is same almost all the time.

  1. Both ceramic resonators and quartz crystals work on the same principle: the vibrate mechanically when an AC signal is applied to them. Quartz crystals are more accurate and temperature stable than ceramic resonators. Both Quartz Crystal and Ceramic resonator has two legs with no specific pin orientation that means you can solder/plug it into the circuit either way.
  2. Ceramic Resonator and Quartz Crystal are Passive devices, They are meant to generate clock signals but they alone can not generate Stable clock signal, both of them need some external circuitry around them to sustain oscillations. Like you must have seen the two PF capacitors around Quartz Crystals. On the other hand Clock Oscillators are Active devices and can generate clock independently without and external circuitry.
  3. Since most of the chips and Micro controllers (which require external clock) have clock stabilization circuitry inside them, So all you need to do is plug in the Quartz Crystal or Resonator of appropriate value in the Two terminal and the Chip itself oscillates the Quartz Crystal or Resonator. The benefit is both Quartz Crystal and Resonator are very Cheap to buy and easily available, While clock oscillators are expensive and not easily available.
  4. When using clock Oscillator you need not to use OSC_OUT pin of the Micro controller, You can directly feed the output of Clock Oscillator into the OSC_IN pin of the MCU and you are done. No need to tell that Ground must be common.
  5. Clock generated by clock Oscillator is much more stable than either of Quartz Crystal or Ceramic Resonator.

Circuitry inside MCU to support Quartz Crystal or Ceramic Resonator

In Other words, Oscillators are stand alone Clock Generating circuits while Quartz Crystal or Ceramic Resonators are just one part of the whole Oscillator Design. Quartz Crystal or Ceramic Resonator makes an Clock Oscillator when a feedback mechanism is incorporated with them. Like as shown in the Figure above where the feedback circuitry is actually exists inside the MCU itself. This kind of feedback circuit is necessary to achieve sustained oscillations.

A Clock Oscillator (One with 4 leg metal casing) has a Quartz Crystal as oscillating element and Feedback mechanism and Capacitors for sustained oscillations inside it, which makes it a stand alone clock generator.

How Clock Oscillator Connects to an Microcontroller


  • Ali Raza

    awesome article :) keep it up the good work :)

  • Bojan

    Very well explained subject. I enjoyed reading it.

  • Tom Rodgers

    Can anyone explain how it is that the microprocessor can keep track of real time regardless of what the clock rate of the external timer circuitry is? How does the “delay()” command work correctly at 8, 16, and 20 MHz? If the chip doesn’t need to be reconfigured based on the external timer, how does it know how many clock “ticks” add up to a microsecond?

  • anil

    hello, can you tell me how crystal oscillator works with two caps. i m trying to find this answer but it is nowhere. no one write about it and what circuit our micro controller holding for crystal to get dc pulses and how it divides this in its inside. i hope u r able to answer my question.
    thank you