Icon indicating that this is a circuit snippets page.

Crystal Oscillator

    CMOS inverters can be thought of as high gain inverting amplifier. It is possible to build amplifiers with them when they are properly biased. U1 is used in this way. R1 provides the feedback that keeps the inverter biased around operating point. For older logic families (e.g. CD4000 series logic) a value of 10 MΩ will work well. Modern higher speed and lower voltage logic families may need a lower somewhere around 2 MΩ.

Schematic of a crystal oscillator using logic gates.

     With U1 acting as a high gain amplifier, the crystal drive circuit (essentially a Pierce oscillator) is made from R2, the crystal (X1), C1, and C2.  For R2, a good starting value for low frequency crystals is 100 KΩ for older logic families. For higher frequencies (up to 25 MHz) a value as low as 10 KΩ may be required.  For modern logic families a value around 1 KΩ is appropriate.  The parallel value of C1 and C2 should match the capacitive load for the crystal. For instance, if the crystal specifies a capacitive load of 20 pF, C1 and C2 should have a value of 10 pF. Note that the PCB trace, and inverter input capacitance, add to these values which means the values of C1 and C2 will need to be reduced.

    Altering the value of C2 allows the crystal frequency to be "pulled" off frequency by a small amount. In this way the circuit’s frequency can be trimmed to a specific value.

    The use of U2 is optional. If the circuit is driving other gates it can be omitted. If the circuit is driving a load directly then it acts as a buffer. One method to verify that the components are selected properly involves varying the power supply voltage and measuring the frequency output. If the circuit's output frequency is stable (or only increases slightly) with supply variation over the inverters operating range than the component choices are correct.  If it becomes unstable or decreases then some variation in component values may be required.

copyright © 2021 John Miskimins