======================CRYSTAL_CLOCKS============================= 1 MHz Crystal a good starting point for a discussion: CMOS or HCMOS inverter |\ +--| >0---+----> OUT | |/ | | | +--\/\/\--+ | 1 Mohm | | | | \ | / 2.7 kohms | \ | / | | | 1MHz | parallel resonant +---|[]|--+ _|_ _|_ 55pf ___ ___ 60pf _|_ _|_ \ / \ / V V ---------------------------------------------------------------------------- all crystals series and parallel resonances are closely spaced series mode the crystal shows low impedance at resonant on the order of 100 ohms to a few kohms. parallel mode, crystal together with parallel capacitance normally 30 pF, shows a high impedance at resonant 30 pF value is used regardless of the frequency. All crystals have resonances at the odd harmonics, 3, 5, .. above 25 MHz, crystals often made to operate at one of the harmonics. the external circuit must suppress the wrong harmonics Normally crystals specified forparallel resonance mode. rule of thumb for dvalue of the output to crystal resistor should have same impedance as capacitor ope R:= 1/(2*pi*f*C) For a 32 kHz oscillator this resistor becomes 160 kohm. ---------------------------------------------------------------------------- Crystal 32.768KHz CMOS Oscillator Try a Pierce oscillator, 1/6 4049 or equivalent |\ |\ *--| >0---*----| >0---> | |/ | |/ | | |--\/\/\--| | 15M | | \ | / 330K | \ | / |32.768KHz| ----|[]|--- _|_ _|_ ___10pf ___ 39pf (variable) _|_ _|_ \ / \ / V V ---------------------------------------------------------------------------- 1 MHz Crystal a good starting point for a discussion: CMOS or HCMOS inverter |\ +--| >0---+----> OUT | |/ | | | +--\/\/\--+ | 1 Mohm | | | | \ | / 2.7 kohms | \ | / | | | 1MHz | parallel resonant +---|[]|--+ _|_ _|_ 55pf ___ ___ 60pf _|_ _|_ \ / \ / V V all crystals series and parallel resonances are closely spaced series mode the crystal shows low impedance at resonant on the order of 100 ohms to a few kohms. parallel mode, crystal together with parallel capacitance normally 30 pF, shows a high impedance at resonant 30 pF value is used regardless of the frequency. All crystals have resonances at the odd harmonics, 3, 5, .. above 25 MHz, crystals often made to operate at one of the harmonics. the external circuit must suppress the wrong harmonics Normally crystals specified forparallel resonance mode. rule of thumb for dvalue of the output to crystal resistor should have same impedance as capacitor ope R:= 1/(2*pi*f*C) For a 32 kHz oscillator this resistor becomes 160 kohm. ---------------------------------------------------------------------------- _ _ _ ___ / \/ \/ \ ___ |1 |__/\ /\ /\__||____| () () |___| 2 | |___| | \/ \/ || | |___| | RS CS LS | | | |____||______________________| || CP ___ ___ || || ___ | |__|| ||__| | |___| || || |___| ||___|| Frequency RS LS CS CP MHz Ohms mH pF pF Ê Ê Ê Ê Ê 2.00 200 520 0.012 4 5.00 50 115 0.010 3 15.00 30 12.5 0.009 5 30.00 20 4.7 0.006 3 ---------------------------------------------------------------------------- MOTION MOTION INDUCTANCE CAPACITANCE _ _ _ ___ / \/ \/ \ ___ |1 |___||___/\ /\ /\__| () () |___| 2 | |___| | || \/ \/ | |___| | CS RS LS | | | |____||______________________| || CP HOLDER SHUNT ---------------------------------------------------------------------------- series resonance is a few kilohertz lower than the parallel one. Crystals below 30ÊMHz are generally operated between series and parallel resonance, which means that the crystal appears as an inductive reactance in operation. Any additional circuit capacitance will thus pull the frequency down. Crystals above 30ÊMHz (up to >200ÊMHz) are generally operated at series resonance where the impedance appears at its minimum and equal to the series resistance. For these crystals the series resistance is specified (<100 ½) instead of the parallel capacitance. parallel resonance crystal to operate at its specified frequency, electronic circuit has to provide a total parallel capacitance specified by crystal manufacturer. higher frequencies crystal can be made to vibrate at one of its overtone modes, which occur at multiples of the fundamental resonant frequency. Only odd numbered overtones are used. Such a crystal is referred to as a 3rd, 5th, or even 7th overtone crystal. usually includes additional LC circuits to select the wanted overtone. ---------------------------------------------------------------------------- INDUCTANCE | | PARALLEL RESONANCE # | | ## | V ## ######### | ## ## | ## # ### |___________________#___#__________________\ | ### # # / | ########### ^ # # FREQUENCY | ___| # # | SERIES RESONANCE ## | # CAPACITANCE ---------------------------------------------------------------------------- _ _ _ ___ / \/ \/ \ ___ |1 |__/\ /\ /\__||____| () () |___| 2 | |___| | \/ \/ || | |___| | RS CS LS | | | |____||______________________| || CP ___ ___ || || ___ | |__|| ||__| | |___| || || |___| ||___|| Frequency RS LS CS CP MHz Ohms mH pF pF Ê Ê Ê Ê Ê 2.00 200 520 0.012 4 5.00 50 115 0.010 3 15.00 30 12.5 0.009 5 30.00 20 4.7 0.006 3 ---------------------------------------------------------------------------- Simulation of a ceramic resonator is more difficult, as these three terminal parts contain internal load capacitors, and the ratio of reactance to impedance is lower than the value for crystals. The resonance frequency is also lower than that for a crystal, so the size of the reactive components are further reduced. This reduction in the Quality Factor means a faster start-up drawback is load capacitor values have a greater influence on oscillator frequency than with a crystal. Typical values for two terminal resonators are: Frequency R1 L1 C1 C0 MHz Ohms mH pF pF 3.58 7 0.113 19.6 140 6.0 8 0.094 8.3 60 8.0 7 0.092 4.6 40 11.0 10 0.057 3.9 30 ---------------------------------------------------------------------------- Typical Crystal Values: Freq Mode L1 C1 R1 C0 Q 32768 fund 4448H 5.3e-15 11200 1.84pf 81780 1 MHz fund 3.5H 0.007pf 340 3pf 64679 10 MHz fund 9.8mH 0.026pf 7 6.3pf 87964 30 Mhz 3rd 14.9mH 0.0018pf 27 6.2pf 104021 100 MHz 5th 4.28mH 0.0006pf 45 7pf 59760 150 MHz 5th 1.9mH 0.0006pf 65 4.2pf 27000 ; Variables: ; C0 = Crystal Shunt Capacitance ; C1 = Crystal Motional Capacitance ; CL = Crystal Load Capacitance ; DL = Crystal Drive Level ; FP = Parallel Resonant Frequency ; FS = Series Resonant Frequency ; L1 = Crystal Motional Inductance ; Q = Crystal Q factor ; R1 = Crystal Series Resistance ; VP = Peak Voltage across R1 ---------------------------------------------------------------------------- C1 = 1 / (Q * W0 * R1) ; motional capacitance FP = FS * (1 + (C1 / (2 * (C0 + CL)))) ; parallel resonant frequency L1 = (Q * R1) / (W0) ; motional inductance W0 = 2 * pi * FS ; series resonant frequency VP = sqrt(2 * DL * R1) ; peak voltage across R1 ---------------------------------------------------------------------------- _/\ /\ /\_ SERIES | \/ \/ | | | | |\ | |\ |_____| \/\_|_||__| \/\_ _ | | /\/ || | /\/ | | |/ |/ | | | | __ | |__________|| ||________| ||__|| ---------------------------------------------------------------------------- _/\ /\ /\_ | \/ \/ | | | | |\ | |_____| \/\_| | | /\/ | | |/ | | | | __ | __|___|| ||__|__ _|_ ||__|| _|_ ___ ___ _|_ PARALLEL _|_ /// /// ---------------------------------------------------------------------------- 32.768 KHz oscillator using a watch crystal Below are a couple circuits you can use to produce a 32.768 KHz square wave from a common watch crystal. The output can be fed to a 15 stage binary counter to obtain a 1 second square wave. The circuit on the left using the 4069 inverter is recommended over the transistor circuit and produces a better waveform. The single transistor circuit produces more of a ramping waveform but the output swings the full supply voltage range so it will easily drive the input to a CMOS binary counter. R1 10MOhms |\ ___ _/\ /\ /\_____| \/\__|OUT| | \/ \/ | | /\/ |___| | | |/ | |\ | |_____| \/\_|_/\ /\ /\_ | | /\/ \/ \/ | | |/ R2 300 | | | | 32.768kHz | | __ | |_________|| ||_________| _|_ ||__|| _|_ ___ CL1 CL2 ___ _|_ 30pF PARALLEL 30pF _|_ /// /// ---------------------------------------------------------------------------- R1 1.5MOhms |\ ___ _/\ /\ /\_____| \/\__|OUT| | \/ \/ | | /\/ |___| | | |/ | |\ | |_____| \/\_|_/\ /\ /\_ | | /\/ \/ \/ | | |/ R2 820 | | | | | | __ | |_________|| ||_________| _|_ ||__|| _|_ ___ CL1 CL2 ___ _|_ PARALLEL _|_ /// /// Test setup A1 and A2 are inverters; CL1 and CL2 are the loading capacitors. During test, CL1 = CL2 a from 5pf to 59pf with inverter supply voltage Vcc = 3.1V and Vcc = 2.3V. The crystal in the test has a nominal frequency of 27MHz at load capacitance of 14pF. It should be noted that the actual loading capacitance to the crystal equals CL1 || CL2 plus the parasitic capacitance of board and the terminals of the inverters. Table 1. Oscillator Frequencies with Variable Load Capacitors at Vcc=3.1V CL1, CL2 (pf) 5 8 12 15 18 20 22 Fout (MHz) 27.01411 27.00832 27.00583 27.00395 27.00188 27.00130 27.00037 Fout (ppm) 523 308 216 146 70 48 14 CL1, CL2 (pf) 24 27 33 39 45 50 59 Fout (MHz) 26.99954 26.99856 26.99687 26.99592 26.99480 26.99424 26.99340 Fout (ppm) -17 -53 -116 -151 -193 -213 -244 Table 2. Oscillator Frequencies with Variable Load Capacitors at Vcc=2.3V CL1, CL2 (pf) 5 8 12 15 18 20 22 Fout (MHz) 27.01319 27.00780 27.00542 27.00360 27.00160 27.00106 27.00016 Fout (ppm) 489 288 200 133 59 39 6 CL1, CL2 (pf) 24 27 33 39 45 50 59 Fout (MHz) 26.99935 26.99837 26.99675 26.99579 26.99468 26.99415 26.99329 Fout (ppm) -24 -60 -121 -156 -197 -217 -249 Loading capacitors can change the crystal's oscillation frequency considerably. The result shows that the total crystal variation range can reach as high as 750ppm for the crystal under test. frequency variation is also dependent on Vcc. Lower supply voltage reduces the frequency. This may be due to the changes of inverter input and output capacitance caused by the change of supply voltage. The resistor R2 in Figure 1 has an effect on reducing such a voltage dependency. But the value of the resistor cannot be too large; otherwise it will make the oscillator hard to start. crystal frequency is much more sensitive to small loading capacitance. This implies that in application of crystal oscillator, we should use a crystal requiring relative large load capacitance for its nominal frequency. resistor R1 helps the oscillator to start. Also the inverter's characters affect the oscillator's performance. High-speed inverters should be used. If the inverter's speed is not high enough, the oscillation may not start. tuning-fork crystals have 1st-overtone modes at roughly six times the frequency of the fundamental mode. As another example, AT-cut crystals have 3rd, 5th, 7th, etc., overtone modes with frequencies being nearly the overtone number times the fundamental mode frequency. ---------------------------------------------------------------------------- large Q Crystals oscillate many cycles before their oscillations decay appreciably. For Statek crystals, Q ranges from about 2,000 to 400,000.2 A direct consequence of its definition is that it takes Q/2*PI cycles for the oscillation energy an isolated crystal to ramp-down by a factor of 1/e. The number of cycles for ramp-up is the same. So, the time for oscillations to ramp-up or ramp-down in a low-frequency high-Q crystal can be quite longÑon the order of seconds. figure-of-merit M This is simply the ratio of the impedance of the static arm to the impedance of the motional arm at series resonance. Given this, it is straightforward to show that M is given by 011CRMs£s=. (28) As we shall show in Section 7.3, in order for the crystal to posses an inductive region, M be greater than 2. For Statek crystals, M ranges from about 10 to 300.2 Note our three parameters are not independent; indeed . (29) MrQ= 5. Some useful frequency properties ---------------------------------------------------------------------------- 32.768 KHz oscillator using a watch crystal Below are a couple circuits you can use to produce a 32.768 KHz square wave from a common watch crystal. The output can be fed to a 15 stage binary counter to obtain a 1 second square wave. The circuit on the left using the 4069 inverter is recommended over the transistor circuit and produces a better waveform. The single transistor circuit produces more of a ramping waveform but the output swings the full supply voltage range so it will easily drive the input to a CMOS binary counter.