Design Feature:July 20, 1995
Marvin A Veeser,
Few electronic products can get by without a sense of timing. A stable frequency source is critical for a range of applications, from generating or detecting radio frequencies to internal logic clocking. Quartz crystals help generate the frequency, but you need active electronics to sustain oscillations to drive an output load.
Traditionally, quartz-crystal oscillators have been self-contained in hybrid oscillator packages or are designed in-house using inverters and stand-alone crystal units. Hybrid oscillators can be costly, and in-house designs can eat up a lot of board space, even if you use SMT (surface-mount-technology) parts.
PICTURE 1
This section of a field-programmable gate array (a) shows the on-chip electronics for a crystal-driven system-clock oscillator. Suggested external component values (b) are as follows: R1=0.5 to 1 M[uom], R2=0 to 1 k[uom], C1 and C2=10 to 40 pF, and Y1=1 to 20 MHz, AT-cut, parallel-resonant. The device shown is a Xilinx XC3020 housed in a 68-pin PLCC. (Courtesy Xilinx Inc)
But the increasing de-mand for new, smaller products, such as disk drives and PCMCIA boards, has prompted ASIC manufacturers to provide all the electronics you need on-chip in standard cells. All you do is select either an AT or a BT cut, a parallel-resonant quartz crystal, and up to four passive parts.
In the field-programmable gate-array (FPGA) example in Fig 1a, the highlighted area in the lower right corner of the die shows the location of a high-speed inverting amplifier and an auxiliary buffer. When the FPGA is configured at runtime, the oscillator connects to the external crystal unit and glue parts first (Fig 1b).
On-chip FPGA programming activates the oscillator circuit early in the configuration process, but the internal clock connection is held off until after the ASIC has completed its configuration. This move gives the oscillator time to stabilize. Stabilized accuracy for quartz crystals in ASIC logic systems is ñ50 ppm.
PICTURE 2
For this version of the commonly used Pierce oscillator, you choose phase-shifting elements C1 and C2; to adjust the output impedance, you also choose RX.
Fig 2 shows the generic form of a Pierce oscillator for quartz crystals. You choose the external phase-shifting elements, C1 and C2. You also choose RX to adjust the output impedance, ZO. Even though RX may wind up being 0ê (a short), you should always provide for it to avoid potential layout problems.
Fig 3 shows four combinations of reactances that can occur with an unloaded tank circuit. To determine if and at what frequencies these combinations oscillate, you write the circuit node equations. Oscillation will occur at the frequency for which the reactive term equals zero. For the Pierce oscillator of Case 1 in Fig 3a, oscillation occurs when
RIN
and the frequency is given by
ê=[sqrt]L3C1C/(C1+C2)
For Case 1, connecting a crystal at Z3 satisfies
the requirements for oscillation at slightly above the indicated
15-MHz fundamental and 45-MHz overtone frequency, because the
crystal appears inductive at those points (Fig 3b).
Note that, over most of the frequency spectrum, the crystal appears
capacitive, preventing oscillation.
PICTURE 3
Four combinations of reactances can occur with an unloaded
tank circuit (a). Case 1 oscillates if Z3 is inductive;
cases 2 and 3 do not oscillate, and case 4 oscillates if Z3
is capacitive. Case 1 is an example of the Pierce configuration.
Over most of the frequency spectrum (b), the crystal appears capacitive,
and, thus, can oscillate only near the indicated fundamental and
harmonic frequencies.
For correct impedance matching, be aware that oscillator circuits
depend on fast rate-of-phase change to govern stability. Perturbations
that result from moisture, component variations, and foreign objects
in proximity to the oscillator can cause dramatic rates-of-phase
change.
During a perturbation, the oscillator cannot satisfy Barkhausen's
phase criteria (see box, "ASIC-cell-oscillator basics")
at the old frequency, so it changes phase until oscillations can
occur. For instance, if a perturbation causes the oscillator to
shift 2ø, effecting a change in output frequency of 6 Hz,
it would make the phase slope equal to 2/6 or 0.333ø/Hz.
You want to try for a much steeper slope--perhaps 40ø/Hz--and
should strive for a large impedance mismatch to maximize the phase
slope.
In Fig 4, a small C2 at the
output of a low ZO ASIC does nothing. But if RX
is added such that RX=XC2, a +45ø
phase shift occurs at the crystal; this phase shift is consistent
with design goals. The crux of this exercise is selecting the
C2 value with respect to the ASIC's output impedance.
If RX is a short, ROUT is directly in parallel
with C2. The Q of the output-matching network is defined
as
Q=(ROUT+RX)/XC2.
Textbooks call for Q=10. Consider compromising, and set Q=2. If
the circuit is operating at 40 MHz and the cell has an output
impedance of 200ê, C2 should be 39 pF.
Using the Thevenin equivalent of the output driver (Fig 4c),
you can see that the phase shift at the output-C2 junction
is a function of the value of C2. Using the Norton
equivalent (Fig 4d), you can see
that the output impedance is directly across C2. Therefore,
if Q<2, increase RX (or C2). Strive to design
the circuit for 2 less than Q less than 5.
ASIC-cell-oscillator basics
The most widely used oscillator today is the MOS-gate oscillator
that uses an unbuffered inverter. Almost all µPs, as well
as many other digital devices, have this circuit built in as a
standard cell--or the µPs are driven from an external oscillator
using this circuit. Oscillator cells have characteristics that
are important to a designer.
ECL has low impedance, in the range of only 7ê. CMOS logic
has much higher output impedance, in the range of 700ê.
Advanced CMOS (ACMOS) technology is in the 50 to 150ê range,
and HCMOS technology is in the 200 to 500ê range. You should
obtain the output-impedance specification from the ASIC manufacturer,
but, if it is unavailable, you can use the simple test circuit
in Fig A to determine it.
FIGURE A
Phase shift is modified by the time delay from input to output
of the amplifier, typically 1 or 2 nsec. Because frequency is
the reciprocal of time, time delay is equated to additional phase
shift of the inverter. The external network must shift 180ø,
minus the delay's equivalent shift, in nanoseconds. The table
shows phase shift for 1- and 2-nsec delays at selected frequencies.
Phase shift
vs gate delay for selected frequencies Frequency
(MHz)Period
(nsec)1-nsec equivalent phase shift 2-nsec equivalent
phase shift 10 100 3.6 7.2 25 40 9 18 50 20 18 36 75 13 27 54 Note:
Phase lag (in degrees)=(time delay)β360/(period of fO).
To provide sustained oscillations, harmonic oscillators must conform
to Barkhausen's criteria for both phase and gain requirements:
The sum of gains around a closed loop must be greater than one,
and the sum of phase shifts around a closed loop must equal nβ360ø,
where n is an integer value.
To meet Barkhausen's phase-shift criteria, the circuit must shift
180ø externally, plus a minimum of 25 additional degrees
in the feedback loop. For a stable oscillator, you should have
fastest rate-of-phase change at the 180ø point.
To get 180ø of phase shift across the ã network,
you need to phase-shift 90ø on both ends of the crystal.
On the ASIC input side, the crystal current flowing into C1
shifts 90ø if RIN is high. On the ASIC output
side, phase shifting should be going through 90ø, less
the effective phase shift from the inverter's time delay.
Consider ASIC drive capability when selecting components.
Capacitor C2's current (i) equals dQ/dt. Therefore,
Q equals the integral of idt, and the voltage is the integral
of idt/C. The ASIC driver must be capable of charging C2
quickly. If C2 is small, it can charge rapidly. If
it's large, and the ASIC driver has limited transconductance (gm),
C2 will not charge significantly, and the voltage developed
across C2 will be limited.
The output signal from the ASIC cell drives C2 as well
as the internal logic elements that produce the system clock.
If this signal is small in amplitude, it could be cause for concern--logic
levels at the ASIC output should switch fully from 20 to 80% of
supply voltage.
You can increase signal level two ways: Either reduce the load
(C2 capacitance) or increase the value of RX.
If the value of RX is equal to XC2, the
signal at the crystal will be one-half the signal going to the
system clock.
Increasing RX reduces crystal drive level, reduces
EMI, and increases rate-of-phase change, all of which result in
a clocking system of greater stability and higher reliability.
(Be sure to measure signals only with a nonloading FET scope probe,
such as the Tektronix Model P6204. Do not use an ordinary 10-pF
passive probe, which will load the circuit.)
Strive for a large signal on the ASIC output--at least 4V p-p
for 5V logic. Increasing the value of RX increases
the output level until the point at which crystal losses cannot
be made up (then signal level begins to fall off).
Now, consider the voltage gain from output to input. The voltage
feeding back from output to input through the passive elements
may be smaller or larger than the signal at the output. It may
seem strange that a signal can be increased by way of passive
elements. However, if the gate input has high resistance, the
output signal is charging a tap on an L-C tank circuit, and the
passive gain is roughly VIN/VOUT=C2/C1.
To verify this passive gain, place a FET scope probe on the input
of the cell at C1; then, remove C1. Observe
that the signal increases until the electrostatic-discharge protection
diodes clamp the signal. Therefore, to ensure an output-to-input
voltage gain sufficient to make up signal losses through the crystal,
select C2 to be between 1.1 and 1.5 times C1.
The feedback resistor of Fig 2 biases the
input of the inverter to make the inverter operate as a Class
A amplifier. The resistor's value should be high enough to prevent
loading of the feedback network and allow the inverter to operate
in the center of its linear range.
For fundamental-mode and overtone oscillators with tank circuits,
the feedback resistor should be 0.5 to 1.0 Mê at 20 MHz
and up and 1.0 to 5.0 Mê below 20 MHz.
Selecting a crystal
Oscillator design for clocking must be simple, inexpensive, and
reliable. The basic AT and BT cuts invented in 1934 are still
the cuts of choice. AT cuts are used in both fundamental and overtone
modes; BT cuts are used in the fundamental mode only.
AT-cut resonators' frequency-vs-temperature curves (Fig A)
follow a third-order curvature with a zero-crossing inflection
point at 25øC. Standard frequency-vs-temperature specs
are ñ50 ppm from 20 to +70øC; stability limits are
ñ10 ppm for the same temperature range.
PICTURE 1
BT-cut resonators' curves follow a parabolic curve with the
maximum frequency nearly room temperature. The frequency decreases
at both higher and lower temperatures.
AT-fundamental strip crystals are inexpensive and are commonly
used for frequencies ranging from 3.5 to 40 MHz. The crystal's
design specifies that the plate's thickness in mils be equal to
66.4 divided by the frequency in megahertz. Strip crystals are
troubled with flexure- and face-shear coupling that must be accounted
for in the width-to-thickness design ratio.
Moreover, process-design limits restrict the upper and lower frequency
limits. At the low end of the spectrum, thickness is almost 0.020
in. and requires special processing, such as unidirectional contouring
and edge tilting. At 40 MHz, the AT strip crystal is only 0.00166
in. thick and must be handled with vacuum picks.
In designing overtone strip crystals, coupling restricts the upper
frequency limits to about 70 MHz. In addition to having the flexure-
and face-shear coupling modes common in fundamental crystals,
there are also couplings to inharmonic (not harmonically related
to the main mode) overtones of both Z- and X-thickness-shear modes.
Overtone design of strip resonators is more complicated than fundamental-mode
design; tighter tolerance requirements for repeatable device performances
are normal.
BT fundamental strip crystals are lower in cost than AT strip
crystals and are 1.521 times thicker. The thicker resonator reduces
the cost of processing. Many strip-crystal units in the 30- to
45-MHz range are fundamental BT plates.
Inverted mesa crystals use an etching technique to produce bilevel
resonators. The thicker, lapped portion is used for mounting support.
The thinner, etched portion contains the electrode. Fundamental
crystals are available from 60 to 120 MHz, and third overtones
are available to 350 MHz.
Fig B shows three common circuits you can employ with AT-
or BT-cut crystals in fundamental or overtone modes.
PICTURE 2
PICTURE 4
Low-resistance crystals are desirable for better stability
and reliability, but they're more costly than high-resistance
parts. For parallel-resonating crystals, the effective series
resistance (ESR) should be specified as
ESR=RM(1+CO/CL)
where RM is motional resistance, CO is static
capacitance, and CL is load capacitance. Specify the
crystal's resistance as low as possible for the price.
Load capacitance is specified as the amount of capacitance placed
in parallel with a crystal's leads that will cause the oscillator
to operate. Stray capacitance around the host pc board and the
ASIC input/output capacitance also contributes to the load.
In Fig 2, C1 and C2
are in series with each other. Proper selection of C1
and C2 requires that stray capacitance be considered
for all calculations. Typical ASIC oscillators have roughly 10
pF of stray capacitance on both the input and output.
For the first design iteration, calculate the load capacitance
with no consideration for stray and input or output capacitance.
Next, add 4 to 7 pF to CL to account for stray, CIN,
and COUT capacitance values as follows:
CL=C1C2/(C1+C2)+5
pF.
Testing should be done on a breadboard that simulates the
final product. Application of starting voltage should include
both ramp and step functions.
During power-supply ramp testing of overtones, you can expect
that operation will be at the fundamental frequency until the
supply reaches about 2.5V (for a 5V design). Corrections for lower
mode starting are often done by decreasing the value of C2
in Fig 2.
Power-supply step-function testing of fundamental and overtone
designs requires instantaneous power applications. This testing
should include all voltages up to the ASIC's absolute maximum,
usually about 7V. During step-function testing at high voltage,
the oscillator may try to jump to the next higher oscillating
mode, which can usually be corrected by increasing the value of
C2.