View
229
Download
0
Category
Preview:
Citation preview
7/31/2019 Crystall Oscillator
1/40
APPLICATIONNOTE
AP-155
June 1983
Oscillatorsfor Microcontrollers
TOM WILLIAMSONMICROCONTROLLERTECHNICAL MARKETING
Order Number 230659-001
7/31/2019 Crystall Oscillator
2/40
7/31/2019 Crystall Oscillator
3/40
OSCILLATORS FORMICROCONTROLLERS
CONTENTS PAGEINTRODUCTION 1
FEEDBACK OSCILLATORS 1
Loop Gain 1How Feedback Oscillators Work 2The Positive Reactance Oscillator 2
QUARTZ CRYSTALS 3Crystal Parameters 3
Equivalent Circuit 3Load Capacitance 4Series vs Parallel Crystals 4Equivalent Series Resistance 4Frequency Tolerance 5Drive Level 5
CERAMIC RESONATORS 5Specifications for Ceramic Resonators 6
OSCILLATOR DESIGNCONSIDERATIONS 6
On-Chip Oscillators 6Crystal Specifications 6Oscillation Frequency 7Selection of CX1 and CX2 7
Placement of Components 7Clocking Other Chips 7
External Oscillators 8Gate Oscillators vs Discrete Devices 10
Fundamental vs OvertoneOperation 11
Series vs Parallel Operation 11
7/31/2019 Crystall Oscillator
4/40
CONTENTS PAGEMORE ABOUT USING THE ON-CHIP
OSCILLATORS 11Oscillator Calculations 11Start-Up Characteristics 13Steady-State Characteristics 15
Pin Capacitance 16MCS -51 Oscillator 16MCS -48 Oscillator 16
CONTENTS PAGEPre-Production Tests 19Troubleshooting Oscillator Problems 20
APPENDIX A QUARTZ AND CERAMICRESONATOR FORMULAS A-1
APPENDIX B OSCILLATOR ANALYSISPROGRAM B-1
7/31/2019 Crystall Oscillator
5/40
AP-155
INTRODUCTIONIntels microcontroller families (MCS -48 MCS -51and iACX-96) contain a circuit that is commonly re-ferred to as the on-chip oscillator The on-chip cir-cuitry is not itself an oscillator of course but an ampli-fier that is suitable for use as the amplifier part of afeedback oscillator The data sheets and MicrocontollerHandbook show how the on-chip amplifier and severaloff-chip components can be used to design a workingoscillator With proper selection of off-chip compo-nents these oscillator circuits will perform better thanalmost any other type of clock oscillator and by almostany criterion of excellence The suggested circuits aresimple economical stable and reliable
We offer assistance to our customers in selecting suit-able off-chip components to work with the on-chip os-cillator circuitry It should be noted however that In-tel cannot assume the responsibility of writing specifi-cations for the off-chip components of the complete os-cillator circuit nor of guaranteeing the performance of the finished design in production anymore than a tran-
sistor manufacturer whose data sheets show a numberof suggested amplifier circuits can assume responsibili-ty for the operation in production of any of them
We are often asked why we dont publish a list of re-quired crystal or ceramic resonator specifications andrecommend values for the other off-chip componentsThis has been done in the past but sometimes withconsequences that were not intended
Suppose we suggest a maximum crystal resistance of 30ohms for some given frequency Then your crystal sup-plier tells you the 30-ohm crystals are going to costtwice as much as 50-ohm crystals Fearing that Intelwill not guarantee operation with 50-ohm crsytalsyou order the expensive ones In fact Intel guaranteesonly what is embodied within an Intel product Besides
there is no reason why 50-ohm crystals couldnt beused if the other off-chip components are suitably ad- justed
Should we recommend values for the other off-chipcomponents Should we do it for 50-ohm crystals or 30-ohm crystals With respect to what should we optimizetheir selection Should we minimize start-up time ormaximize frequency stability In many applicationsneither start-up time nor frequency stability are partic-ularly critical and our recommendations are only re-stricting your system to unnecessary tolerances It alldepends on the application
Although we will neither specify nor recommendspecific off-chip components we do offer assistance inthese tasks Intel application engineers are available toprovide whatever technical assistance may be needed ordesired by our customers in designing with Intel prod-ucts
This Application Note is intended to provide such as-sistance in the design of oscillator circuits for micro-controller systems Its purpose is to describe in a practi-cal manner how oscillators work how crystals and ce-ramic resonators work (and thus how to spec them)and what the on-chip amplifier looks like electronicallyand what its operating characteristics are A BASICprogram is provided in Appendix II to assist the de-signer in determining the effects of changing individualparameters Suggestions are provided for establishing apre-production test program
FEEDBACK OSCILLATORS
Loop Gain
Figure 1 shows an amplifier whose output line goes intosome passive network If the input signal to the amplifi-er is v1 then the output signal from the amplifer is v2e A v1 and the output signal from the passive networkis v3 e b v2 e b A v1 Thus b A is the overall gain
from terminal 1 to terminal 3
2306591
Figure 1 Factors in Loop Gain
Now connect terminal 1 to terminal 3 so that the sig-nal path forms a loop 1 to 2 to 3 which is also 1 Nowwe have a feedback loop and the gain factor b A iscalled the loop gain
Gain factors are complex numbers That means theyhave a magnitude and a phase angle both of whichvary with frequency When writing a complex numberone must specify both quantities magnitude and angleA number whose magnitude is 3 and whose angle is 45degrees is commonly written this way 3 K45 The num-ber 1 is in complex number notation 1 K0 while b 1 is1K180
By closing the feedback loop in Figure 1 we force theequality
v1 e b Av1
This equation has two solutions
1) v1 e 0
2) b A e 1K0
1
7/31/2019 Crystall Oscillator
6/40
AP-155
In a given circuit either or both of the solutions may bein effect In the first solution the circuit is quiescent (nooutput signal) If youre trying to make an oscillator ano-signal condition is unacceptable There are ways toguarantee that the second solution is the one that willbe in effect and that the quiescent condition will beexcluded
How Feedback Oscillators Work
A feedback oscillator amplifies its own noise and feedsit back to itself in exactly the right phase at the oscilla-tion frequency to build up and reinforce the desiredoscillations Its ability to do that depends on its loopgain First oscillations can occur only at the frequencyfor which the loop gain has a phase angle of 0 degreesSecond build-up of oscillations will occur only if theloop gain exceeds 1 at the frequency Build-up contin-ues until nonlinearities in the circuit reduce the averagevalue of the loop gain to exactly 1
Start-up characteristics depend on the small-signal
properties of the circuit specifically the small-signalloop gain Steady-state characteristics of the oscillatordepend on the large-signal properties of the circuitsuch as the transfer curve (output voltage vs inputvoltage) of the amplifier and the clamping effect of theinput protection devices These things will be discussedmore fully further on First we will look at the basicoperation of the particular oscillator circuit called thepositive reactance oscillator
The Positive Reactance Oscillator
Figure 2 shows the configuration of the positive reac-tance oscillator The inverting amplifier working intothe impedance of the feedback network produces anoutput signal that is nominally 180 degrees out of phase
with its input The feedback network must provide anadditional 180 degrees phase shift such that the overallloop gain has zero (or 360) degrees phase shift at theoscillation frequency
2306592
Figure 2 Positive Reactance Oscillator
In order for the loop gain to have zero phase angle it isnecessary that the feedback element Z f have a positivereactance That is it must be inductive Then the fre-quency at which the phase angle is zero is approximate-ly the frequency at which
Xf ea 10 C
where X f is the reactance of Z f (the total Z f being R f a jXf and C is the series combination of C X1 and C X2
C eCX1 CX2
CX1 a CX2
In other words Z f and C form a parallel resonant cir-cuit
If Z f is an inductor then X f e 0 L and the frequencyat which the loop gain has zero phase is the frequencyat which
0 Le 1
0 C
or
0 e1
0LC
Normally Z f is not an inductor but it must still have apositive reactance in order for the circuit to oscillateThere are some piezoelectric devices on the market thatshow a positive reactance and provide a more stableoscillation frequency than an inductor will Quartzcrystals can be used where the oscillation frequency iscritical and lower cost ceramic resonators can be usedwhere the frequency is less critical
When the feedback element is a piezoelectric devicethis circuit configuration is called a Pierce oscillatorThe advantage of piezoelectric resonators lies in theirproperty of providing a wide range of positive reactancevalues over a very narrow range of frequencies Thereactance will equal 1 0 C at some frequency withinthis range so the oscillation frequency will be withinthe same range Typically the width of this range is
2
7/31/2019 Crystall Oscillator
7/40
7/31/2019 Crystall Oscillator
8/40
AP-155
The series resonant frequency of the crystal is the fre-quency at which L 1 and C 1 are in resonance This fre-quency is given by
fs e1
2q 0L1C1
At this frequency the impedance of the crystal is R 1 inparallel with the reactance of C 0 For most purposesthis impedance is taken to be just R 1 since the reac-tance of C 0 is so much larger than R 1
Load Capacitance
A crystal oscillator circuit such as the one shown inFigure 2 (redrawn in Figure 5) operates at the frequen-cy for which the crystal is antiresonant (ie parallel-res-onant) with the total capacitance across the crystal ter-minals external to the crystal This total capacitanceexternal to the crystal is called the load capacitance
As shown in Figure 5 the load capacitance is given by
CL eCX1 CX2
CX1 a CX2a Cstray
The crystal manufacturer needs to know the value of CL in order to adjust the crystal to the specified fre-quency
2306596
Figure 5 Load Capacitance
The adjustment involves putting the crystal in serieswith the specified C L and then trimming the crystalto obtain resonance of the series combination of thecrystal and C L at the specified frequency Because of the high Q of the crystal the resonant frequency of theseries combination of the crystal and C L is the same as
the antiresonant frequency of the parallel combinationof the crystal and C L This frequency is given by
fa e1
2q 0L1 C1 (CL a C0) (C 1 a CL a C0)
These frequency formulas are derived (in Appendix A)from the equivalent circuit of the crystal using the as-sumptions that the Q of the crystal is extremely highand that the circuit external to the crystal has no effecton the frequency other than to provide the load capaci-tance C L The latter assumption is not precisely truebut it is close enough for present purposes
Series vs Parallel Crystals
There is no such thing as a series cut crystal as op-posed to a parallel cut crystal There are differentcuts of crystal having to do with the parameters of itsmotional arm in various frequency ranges but there isno special cut for series or parallel operation
An oscillator is series resonant if the oscillation fre-quency is f s of the crystal To operate the crystal at f sthe amplifier has to be noninverting When buying acrystal for such an oscillator one does not specify aload capacitance Rather one specifies the loading con-dition as series
If a series crystal is put into an oscillator that has aninverting amplifier it will oscillate in parallel resonancewith the load capacitance presented to the crystal bythe oscillator circuit at a frequency slightly above f s Infact at approximately
fa e fs 1 aC1
2(CL a C0)JThis frequency would typically be about 0 02% above
f s
Equivalent Series Resistance
The series resistance often listed on quartz crystaldata sheets is the real part of the crystal impedance atthe crystals calibration frequency This will be R1 if the calibration frequency is the series resonant frequen-cy of the crystal If the crystal is calibrated for parallelresonance with a load capacitance CL the equivalentseries resistance will be
ESR e R1 1 aC0CLJ
2
The crystal manufacturer measures this resistance at
the calibration frequency during the same operation inwhich the crystal is adjusted to the calibration frequen-cy
4
7/31/2019 Crystall Oscillator
9/40
AP-155
Frequency Tolerance
Frequency tolerance as discussed here is not a require-ment on the crystal but on the complete oscillatorThere are two types of frequency tolerances on oscilla-tors frequency acccuracy and frequency stability Fre-quency accuracy refers to the oscillators ability to runat an exact specified frequency Frequency stability re-fers to the constancy of the oscillation frequency
Frequency accuracy requires mainly that the oscillatorcircuit present to the crystal the same load capacitancethat it was adjusted for Frequency stability requiresmainly that the load capacitance be constant
In most digital applications the accuracy and stabilityrequirements on the oscillator are so wide that it makesvery little difference what load capacitance the crystalwas adjusted to or what load capacitance the circuitactually presents to the crystal For example if a crys-tal was calibrated to a load capacitance of 25 pF and isused in a circuit whose actual load capacitance is 50 pFthe frequency error on that account would be less than0 01%
In a positive reactance oscillator the crystal only needsto be in the intended response mode for the oscillator tosatisfy a 0 5% or better frequency tolerance Thats be-cause for any load capacitance the oscillation frequencyis certain to be between the crystals resonant and anti-resonant frequencies
Phase shifts that take place within the amplifier part of the oscillator will also affect frequency accuracy andstability These phase shifts can normally be modeled asan output capacitance that in the positive reactanceoscillator parallels C X2 The predictability and con-stancy of this output capacitance over temperature anddevice sample will be the limiting factor in determiningthe tolerances that the circuit is capable of holding
Drive Level
Drive level refers to the power dissipation in the crys-tal There are two reasons for specifying it One is thatthe parameters in the equivalent circuit are somewhatdependent on the drive level at which the crystal iscalibrated The other is that if the application circuitexceeds the test drive level by too much the crystalmay be damaged Note that the terms test drive leveland rated drive level both refer to the drive level atwhich the crystal is calibrated Normally in a micro-controller system neither the frequency tolerances northe power levels justify much concern for this specifica-tion Some crystal manufacturers dont even require itfor microprocessor crystals
In a positive reactance oscillator if one assumes thepeak voltage across the crystal to be something in theneighborhood of V CC the power dissipation can be ap-proximated as
P e 2R 1 q f (CL a C0) VCC 2
This formula is derived in Appendix A In a 5V systemP rarely evaluates to more than a milliwatt Crystalswith a standard 1 or 2 mW drive level rating can beused in most digital systems
2306597
Figure 6 Ceramic Resonator Impedance vsFrequency (Test Data Supplied by NTK
Technical Ceramics)
CERAMIC RESONATORS
Ceramic resonators operate on the same basic princi-ples as a quartz crsytal Like quartz crsytals they arepiezoelectric have a reactance versus frequency curvesimilar to a crystals and an equivalent circuit that
looks just like a crystals (with different parameter val-ues however)
The frequency tolerance of a ceramic resonator is abouttwo orders of magnitude wider than a crystals but theceramic is somewhat cheaper than a crystal It may benoted for comparison that quartz crystals with relaxedtolerances cost about twice as much as ceramic resona-tors For purposes of clocking a microcontroller thefrequency tolerance is often relatively noncritical andthe economic consideration becomes the dominant fac-tor
Figure 6 shows a graph of impedance magnitude versusfrequency for a 3 58 MHz ceramic resonator (Notethat Figure 6 is a graph of lZf l versus frequency where
5
7/31/2019 Crystall Oscillator
10/40
AP-155
as Figure 3 is a graph of X f versus frequency ) A num-ber of spurious responses are apparent in Figure 6 Themanufacturers state that spurious responses are moreprevalent in the lower frequency resonators (kHzrange) than in the higher frequency units (MHz range)For our purposes only the MHz range ceramics need tobe considered
2306598
Figure 7 Ceramic Resonator Symbol andEquivalent Circuit
Figure 7 shows the symbol and equivalent circuit forthe ceramic resonator both of which are the same as
for the crystal The parameters have different valueshowever as listed in Table 2
Table 2 Typical Ceramic Parameters
Frequency R 1 L1 C1 C0MHz ohms mH pF pF3 58 7 0 113 19 6 1406 0 8 0 094 8 3 608 0 7 0 092 4 6 40
11 0 10 0 057 3 9 30
Note that the motional arm of the ceramic resonatortends to have less resistance than the quartz crystal andalso a vastly reduced L 1 C 1 ratio This results in themotional arm having a Q (given by (1 R 1) 0L1 C 1) that
is typically two orders of magnitude lower than that of a quartz crystal The lower Q makes for a faster startupof the oscilaltor and for a less closely controlled fre-quency (meaning that circuitry external to the resona-tor will have more influence on the frequency than witha quartz crystal)
Another major difference is that the shunt capacitanceof the ceramic resonator is an order of magnitude high-er than C 0 of the quartz crystal and more dependent onthe frequency of the resonator
The implications of these differences are not all obvi-ous but some will be indicated in the section on Oscil-lator Calculations
Specifications for Ceramic ResonatorsCeramic resonators are easier to specify than quartzcrystals All the vendor wants to know is the desired
frequency and the chip you want it to work withTheyll supply the resonators a circuit diagram show-ing the positions and values of other external compo-nents that may be required and a guarantee that thecircuit will work properly at the specified frequency
OSCILLATOR DESIGNCONSIDERATIONS
Designers of microcontroller systems have a number of options to choose from for clocking the system Themain decision is whether to use the on-chip oscillatoror an external oscillator If the choice is to use the on-chip oscillator what kinds of external components areneeded to make it operate as advertised If the choice isto use an external oscillator what type of oscillatorshould it be
The decisions have to be based on both economic andtechnical requirements In this section well discusssome of the factors that should be considered
2306599
Figure 8 Using the On-Chip Oscillator
On-Chip Oscillators
In most cases the on-chip amplifier with the appropri-
ate external components provides the most economicalsolution to the clocking problem Exceptions may arisein severe environments when frequency tolerances aretighter than about 0 01%
The external components that need to be added are apositive reactance (normally a crystal or ceramic reso-nator) and the two capacitors C X1 and C X2 as shownin Figure 8
Crystal Specifications
Specifications for an appropriate crystal are not verycritical unless the frequency is Any fundamental-modecrystal of medium or better quality can be used
6
7/31/2019 Crystall Oscillator
11/40
AP-155
We are often asked what maximum crystal resistanceshould be specified The best answer to this question isthe lower the better but use whats available The crys-tal resistance will have some effect on start-up time andsteady-state amplitude but not so much that it cant becompensated for by appropriate selection of the capaci-tances C X1 and C X2
Similar questions are asked about specifications of loadcapacitance and shunt capacitance The best advice wecan give is to understand what these parameters meanand how they affect the operation of the circuit (thatbeing the purpose of this Application Note) and thendecide for yourself if such specifications are meaningfulin your application or not Normally theyre not un-less your frequency tolerances are tighter than about0 1%
Part of the problem is that crystal manufacturers areaccustomed to talking ppm tolerances with radio en-gineers and simply wont take your order until youvefilled out their list of specifications It will help if youdefine your actual frequency tolerance requirementsboth for yourself and to the crystal manufacturerDont pay for 0 003% crystals if your actual frequencytolerance is 1%
Oscillation Frequency
The oscillation frequency is determined 99 5% by thecrystal and up to about 0 5% by the circuit external tothe crystal The on-chip amplifier has little effect on thefrequency which is as it should be since the amplifierparameters are temperature and process dependent
The influence of the on-chip amplifier on the frequencyis by means of its input and output (pin-to-ground) ca-pacitances which parallel C X1 and C X2 and theXTAL1-to-XTAL2 (pin-to-pin) capacitance which
parallels the crystal The input and pin-to-pin capaci-tances are about 7 pF each Internal phase deviationsfrom the nominal 180 can be modeled as an outputcapacitance of 25 to 30 pF These deviations from theideal have less effect in the positive reactance oscillator(with the inverting amplifer) than in a comparable se-ries resonant oscillator (with the noninverting amplifi-er) for two reasons first the effect of the output capaci-tance is lessened if not swamped by the off-chip capac-itor secondly the positive reactance oscillator is lesssensitive frequency-wise to such phase errors
Selection of C X1 and C X2Optimal values for the capacitors C X1 and C X2 dependon whether a quartz crystal or ceramic resona-
tor is being used and also on application-specific re-quirements on start-up time and frequency tolerance
Start-up time is sometimes more critical in microcon-troller systems than frequency stability because of vari-ous reset and initialization requirements
Less commonly accuracy of the oscillator frequency isalso critical for example when the oscillator is beingused as a time base As a general rule fast start-up andstable frequency tend to pull the oscillator design inopposite directions
Considerations of both start-up time and frequency sta-bility over temperature suggest that C X1 and C X2should be about equal and at least 20 pF (But theydont have to be either ) Increasing the value of thesecapacitances above some 40 or 50 pF improves frequen-cy stability It also tends to increase the start-up timeThere is a maximum value (several hundred pF de-pending on the value of R 1 of the quartz or ceramicresonator) above which the oscillator wont start up atall
If the on-chip amplifier is a simple inverter such as inthe 8051 the user can select values for C X1 and C X2between some 20 and 100 pF depending on whetherstart-up time or frequency stability is the more criticalparameter in a specific application If the on-chip am-plifier is a Schmitt Trigger such as in the 8048 smallervalues of C X1 must be used (5 to 30 pF) in order toprevent the oscillator from running in a relaxationmode
Later sections in this Application Note will discuss theeffects of varying C X1 and C X2 (as well as other param-eters) and will have more to say on their selection
Placement of Components
Noise glitches arriving at XTAL1 or XTAL2 pins atthe wrong time can cause a miscount in the internalclock-generating circuitry These kinds of glitches canbe produced through capacitive coupling between theoscillator components and PCB traces carrying digitalsignals with fast rise and fall times For this reason theoscillator components should be mounted close to thechip and have short direct traces to the XTAL1XTAL2 and VSS pins
Clocking Other Chips
There are times when it would be desirable to use theon-chip oscillator to clock other chips in the system
7
7/31/2019 Crystall Oscillator
12/40
AP-155
23065910A) DRIVING FROM XTAL2
23065911B) DRIVING FROM XTAL1
Figure 9 Using the On-Chip Oscillatorto Drive Other Chips
This can be done if an appropriate buffer is used ATTL buffer puts too much load on the on-chip amplifi-er for reliable start-up A CMOS buffer (such as the74HC04) can be used if its fast enough and if its VIHand VIL specs are compatible with the available signalamplitudes Circuits such as shown in Figure 9 mightalso be considered for these types of applications
Clock-related signals are available at the TO pin in theMCS-48 products at ALE in the MCS-48 and MCS-51lines and the iACX-96 controllers provide a CLKOUTsignal
External Oscillators
When technical requirements dictate the use of an ex-ternal oscillator the external drive requirements for themicrocontroller as published in the data sheet must becarefully noted The logic levels are not in general TTL-compatible And each controller has its idiosyncraciesin this regard The 8048 for example requires thatboth XTAL1 and XTAL2 be driven The 8051 can be
driven that way but the data sheet suggest the simplermethod of grounding XTAL1 and driving XTAL2 Forthis method the driving source must be capable of sink-ing some current when XTAL2 is being driven low
For the external oscillator itself there are basically twochoices ready-made and home-grown
8
7/31/2019 Crystall Oscillator
13/40
AP-155
TTL Crystal Clock Oscillator
The HS-100 HS-200 HS-500 all-metal package se-ries of oscillators are TTL compatible fit a DIPlayout Standard electrical specifications are shownbelow Variations are available for special applica-tionsFrequency Range HS-100 3 5 MHz to 30 MHz
HS-200 225 KHz to 3 5 MHzHS-500 25 MHz to 60 MHz
Frequency Tolerance g 0 1% Overall 0 C70 C
Hermetically Sealed PackageMass spectrometer leak rate max
1 c 10b 8 atmos cc sec of helium
Output Waveform
23065912
INPUT
HS-100 HS-200 HS-500
3 5 MHz20 MHz 20 a MHz30 MHz 225 KHz4 0 MHz 25 MHz60 MHz
Supply Voltage(VCC) 5V g 10% 5V g 10% 5V g 10% 5V g 10%Supply Current(ICC) max 30 mA 40 mA 85 mA 50 mA
OUTPUT
HS-100 HS-200 HS-500
3 5 MHz20 MHz 20 a MHz30 MHz 225 KHz4 0 MHz 25 MHz60 MHz
VOH (Logic 1) a 2 4V min 1 a 2 7V min 2 a 2 4V min 1 a 2 7V min 2VOL (Logic 0) a 0 4V max 3 a 0 5V max 4 a 0 4V max 3 a 0 5V max 4Symmetry 60 40% 5 60 40% 5 55 45% 5 60 40% 5TR TF (Rise
Fall Time) k 10 ns 6 k 5 ns 6 k 15 ns 6 k 5 ns 6
Output ShortCircuit Current 18 mA min 40 mA min 18 mA min 40 mA min
Output Load 1 to 10 TTL Loads 7 1 to 10 TTL Loads 8 1 to 10 TTL Loads 7 1 to 10 TTL Loads 8
CONDITIONS1I0 source e b 400 mA max 410 sink e 20 00 mA max 71 6 mA per load2I0 source e b 1 0 mA max 5VO e 1 4V 82 0 mA per load3I0 sink e 16 0 mA max 6(0 4V to 2 4V)
Figure 10 Pre-Packaged Oscillator Data
Reprinted with the permission of Midland-Ross Corporation 1982
9
7/31/2019 Crystall Oscillator
14/40
AP-155
Prepackaged oscillators are available from most crystalmanufacturers and have the advantage that the systemdesigner can treat the oscillator as a black box whoseperformance is guaranteed by people who carry manyyears of experience in designing and building oscilla-tors Figure 10 shows a typical data sheet for someprepackaged oscillators Oscillators are also availablewith complementary outputs
If the oscillator is to drive the microcontroller directlyone will want to make a careful comparison betweenthe external drive requirements in the microcontrollerdata sheet and the oscillators output logic levels andtest conditions
If oscillator stability is less critical than cost the usermay prefer to go with an in-house design Not withoutsome precautions however
Its easy to design oscillators that work Almost all of them do work even if the designer isnt too clear onwhy The key point here is that almost all of themwork The problems begin when the system goes intoproduction and marginal units commence malfunc-tioning in the field Most digital designers after all arenot very adept at designing oscillators for production
Oscillator design is somewhat of a black art with thequality of the finished product being very dependent onthe designers experience and intuition For that reasonthe most important consideration in any design is tohave an adequate preproduction test program Prepro-duction tests are discussed later in this ApplicationNote Here we will discuss some of the design optionsand take a look at some commonly used configurations
Gate Oscillators versus DiscreteDevices
Digital systems designers are understandably reluctantto get involved with discrete devices and their peculiari-ties (biasing techniques etc ) Besides the componentcount for these circuits tends to be quite a bit higherthan what a digital designer is used to seeing for thatamount of functionality Nevertheless if there are un-usual requirements on the accuracy and stability of theclock frequency it should be noted that discrete deviceoscillators can be tailored to suit the exact needs of theapplication and perfected to a level that would be diffi-cult for a gate oscillator to approach
In most cases when an external oscillator is needed thedesigner tends to rely on some form of a gate oscillatorA TTL inverter with a resistor connecting the output tothe input makes a suitable inverting amplifier The re-sistor holds the inverter in the transition region be-
tween logical high and low so that at least for start-uppurposes the inverter is a linear amplifier
The feedback resistance has to be quite low howeversince it must conduct current sourced by the input pinwithout allowing the DC input voltage to get too farabove the DC output voltage For biasing purposes thefeedback resistance should not exceed a few k-ohmsBut shunting the crystal with such a low resistance doesnot encourage start-up
23065913A) TTL OSCILLATOR
23065914B) CMOS OSCILLATOR
Figure 11 Commonly Used Gate Oscillators
Consequently the configuration in Figure 11A mightbe suggested By breaking R f into two parts and AC-grounding the midpoint one achieves the DC feedback
required to hold the inverter in its active region butwithout the negative signal feedback that is in effecttelling the circuit not to oscillate However this biasingscheme will increase the start-up time and relaxation-type oscillations are also possible
A CMOS inverter such as the 74HC04 might workbetter in this application since a larger R f can be usedto hold the inverter in its linear region
Logic gates tend to have a fairly low output resistancewhich destabilizes the oscillator For that reason a re-sistor Rx is often added to the feedback network asshown in Figures 11A and B At higher frequencies a20 or 30 pF capacitor is sometimes used in the Rx posi-tion to compensate for some of the internal propaga-tion delay
Reference 1 contains an excellent discussion of gate os-cillators and a number of design examples
10
7/31/2019 Crystall Oscillator
15/40
AP-155
Fundamental versus Overtone Operation
Its easier to design an oscillator circuit to operate inthe resonators fundamental response mode than to de-sign one for overtone operation A quartz crystal whosefundamental response mode covers the desired frequen-cy can be obtained up to some 30 MHz For frequenciesabove that the crystal might be used in an overtonemode
Several problems arise in the design of an overtone os-cillator One is to stop the circuit from oscillating in thefundamental mode which is what it would really ratherdo for a number of reasons involving both the amplify-ing device and the crystal An additional problem withovertone operation is an increased tendency to spuriousoscillations That is because the R 1 of various spuriousmodes is likely to be about the same as R 1 of the in-tended overtone response It may be necessary as sug-gested in Reference 1 to specify a spurious-to-main-response resistance ratio to avoid the possibility of trouble
Overtone oscillators are not to be taken lightly Onewould be well advised to consult with an engineer whois knowledgeable in the subject during the design phaseof such a circuit
Series versus Parallel Operation
Series resonant oscillators use noninverting amplifiersTo make a noninverting amplifier out of logic gatesrequires that two inverters be used as shown in Figure12
This type of circuit tends to be inaccurate and unstablein frequency over variations in temperature and V CC Ithas a tendency to oscillate at overtones and to oscillatethrough C 0 of the crystal or some stray capacitancerather than as controlled by the mechanical resonanceof the crystal
The demon in series resonant oscillators is the phaseshift in the amplifier The series resonant oscillatorwants more than just a noninverting amplifier itwants a zero phase-shift amplifier Multistage nonin-verting amplifiers tend to have a considerably laggingphase shift such that the crystal reactance must be ca-pacitive in order to bring the total phase shift aroundthe feedback loop back up to 0 In this mode a 12MHz crystal may be running at 8 or 9 MHz One canput a capacitor in series with the crystal to relieve thecrystal of having to produce all of the required phaseshift and bring the oscillation frequency closer to fsHowever to further complicate the situation the am-plifiers phase shift is strongly dependent on frequencytemperature VCC and device sample
23065915
Figure 12 Series Resonant Gate Oscillator
Positive reactance oscillators (parallel resonant) useinverting amplifiers A single logic inverter can be usedfor the amplifier as in Figure 11 The amplifiers phaseshift is less critical compared to a series resonant cir-cuit and since only one inverter is involved theres lessphase error anyway The oscillation frequency is effec-tively bounded by the resonant and antiresonant fre-quencies of the crystal itself In addition the feedbacknetwork includes capacitors that parallel the input andoutput terminals of the amplifier thus reducing the ef-fect of unpredictable capacitances at these points
MORE ABOUT USING THE ON-CHIPOSCILLATORS
In this section we will describe the on-chip inverters onselected microcontrollers in some detail and discusscriteria for selecting components to work with themFuture data sheets will supplement this discussion withupdates and information pertinent to the use of eachchips oscillator circuitry
Oscillator Calculations
Oscillator design though aided by theory is still largelyan empirical exercise The circuit is inherently nonlin-ear and the normal analysis parameters vary with in-stantaneous voltage In addition when dealing with theon-chip circuitry we have FETs being used as resistorsresistors being used as interconnects distributed delaysinput protection devices parasitic junctions and pro-cessing variations
Consequently oscillator calculations are never veryprecise They can be useful however if they will atleast indicate the effects of variations in the circuit pa-rameters on start-up time oscillation frequency andsteady-state amplitude Start-up time for example canbe taken as an indication of start-up reliability If pre-production tests indicate a possible start-up problem arelatively inexperienced designer can at least be madeaware of what parameter may be causing the marginali-ty and what direction to go in to fix it
11
7/31/2019 Crystall Oscillator
16/40
AP-155
23065916A) 8081-Type Circuit Configuration during Start-Up
(Excludes Input Protection Devices )
23065917B) AC Equivalent of (A)
Figure 13 Oscillator Circuit Model Usedin Start-Up Calculations
The analysis used here is mathematically straightfor-ward but algebraically intractable That means its rela-tively easy to understand and program into a computerbut it will not yield a neat formula that gives saysteady-state amplitude as a function of this or that listof parameters A listing of a BASIC program that im-plements the analysis will be found in Appendix II
When the circuit is first powered up and before theoscillations have commenced (and if the oscillations failto commence) the oscillator can be treated as a smallsignal linear amplifier with feedback In that case stan-dard small-signal analysis techniques can be used todetermine start-up characteristics The circuit modelused in this analysis is shown in Figure 13
The circuit approximates that there are no high-fre-quency effects within the amplifier itslef such that itshigh-frequency behavior is dominated by the load im-pedance Z L This is a reasonable approximation for sin-gle-stage amplifiers of the type used in 8051-type devic-es Then the gain of the amplifier as a function of fre-quency is
A e Av ZLZL a R0
23065918
Figure 14 Loop Gain versus Frequency(4 608 MHz Crystal)
The gain of the feedback network is
b eZi
Zi a Zf
And the loop gain is
b A eZi
Zi a Zfc
Av ZLZL a R0
The impedances Z L Zf and Z i are defined in Figure
13BFigure 14 shows the way the loop gain thus calculated(using typical 8051-type parameters and a 4 608 MHzcrystal) varies with frequency The frequency of interestis the one for which the phase of the loop gain is zeroThe accepted criterion for start-up is that the magni-tude of the loop gain must exceed unity at this frequen-cy This is the frequency at which the circuit is in reso-nance It corresponds very closely with the antiresonantfrequency of the motional arm of the crystal in parallelwith C L
Figure 15 shows the way the loop gain varies with fre-quency when the parameters of a 3 58 MHz ceramicresonator are used in place of a crystal (the amplifierparameters being typical 8051 as in Figure 14) Notethe different frequency scales
12
7/31/2019 Crystall Oscillator
17/40
AP-155
23065919
Figure 15 Loop Gain versus Frequency(3 58 MHz Ceramic)
Start-Up Characteristics
It is common in studies of feedback systems to exam-ine the behavior of the closed loop gain as a function of complex frequency s e s a j0 specifically to deter-mine the location of its poles in the complex plane Apole is a point on the complex plane where the gainfunction goes to infinity Knowledge of its location canbe used to predict the response of the system to aninput disturbance
The way that the response function depends on the lo-cation of the poles is shown in Figure 16 Poles in theleft-half plane cause the response function to take theform of a damped sinusoid Poles in the right-half planecause the response function to take the form of an expo-nentially growing sinusoid In general
v(t) E e at sin (0 t a i )
where a is the real part of the pole frequency Thus if the pole is in the right-half plane a is positive and thesinusoid grows If the pole is in the left-half plane a isnegative and the sinusoid is damped
The same type of analysis can usefully be applied tooscillators In this case however rather than trying toensure that the poles are in the left-half plane wewould seek to ensure that theyre in the right -half planeAn exponentially growing sinusoid is exactly what iswanted from an oscillator that has just been poweredup
23065920A) Poles in the Left-Half Plane f(t) E e b at sin ( 0 t a i )
23065921B) Poles in the Right-Half Plane f(t) E e a at sin ( 0 t a i )
23065922C) Poles the j 0 Axis f(t) E sin ( 0 t a i )
Figure 16 Do You Know Where YourPoles Are Tonight
The gain function of interest in oscillators is 1 (1 bb A) Its poles are at the complex frequencies where b Ae 1K0 because that value of b A causes the gain func-tion to go to infinity The oscillator will start up if thereal part of the pole frequency is positive More impor-tantly the rate at which it starts up is indicated by how much greater than 0 the real part of the pole frequencyis
The circuit in Figure 13B can be used to find the polefrequencies of the oscillator gain function All thatneeds to be done is evaluate the impedances at complexfrequencies s a j0 rather than just at 0 and find thevalue of s a j0 for which b A e 1K0 The larger thatvalue of s is the faster the oscillator will start up
Of course other things besides pole frequencies thingslike the VCC rise time are at work in determining thestart-up time But to the extend that the pole frequen-cies do affect start-up time we can obtain results likethose in Figures 17 and 18
To obtain these figures the pole frequencies were com-puted for various values of capacitance C X fromXTAL1 and XTAL2 to ground (thus C X1 e CX2 eCX) Then a time constant for start-up was calculat-
ed as Ts
e1
swhere s is the real part of the pole fre-
quency (rad sec) and this time constant is plotted ver-sus C X
13
7/31/2019 Crystall Oscillator
18/40
AP-155
23065923
23065924
23065925
Figure 17 Oscillator Start-Up (4 608 MHz Crystalfrom Standard Crystal Corp )
A short time constant means faster start-up A longtime constant means slow start-up Observations of ac-tual start-ups are shown in the figures Figure 17 is fora typical 8051 with a 4 608 MHz crystal supplied byStandard Crystal Corp and Figure 18 is for a typical8051 with a 3 58 MHz ceramic resonator supplied byNTK Technical Ceramics Ltd
It can be seen in Figure 17 that for this crystal valuesof CX between 30 and 50 pF minimize start-up timebut that the exact value in this range is not particularlyimportant even if the start-up time itself is critical
As previously mentioned start-up time can be taken asan indication of start-up reliability Start-up problemsare normally associated with C X1 and C X2 being toosmall or too large for a given resonator If the parame-ters of the resonator are known curves such as in Fig-ure 17 or 18 can be generated to define acceptableranges of values for these capacitors
As the oscillations grow in amplitude they reach a lev-el at which they undergo severe clipping within the am-plifier in effect reducing the amplifier gain As the am-plifier gain decreases the poles move towards the j 0axis In steady-state the poles are on the j 0 axis andthe amplitude of the oscillations is constant
23065926
23065927
23065928
Figure 18 Oscillator Start-Up (3 58 MHz CeramicResonator from NTK Technical Ceramics)
14
7/31/2019 Crystall Oscillator
19/40
7/31/2019 Crystall Oscillator
20/40
7/31/2019 Crystall Oscillator
21/40
AP-155
23065933
Figure 22 Schmitt Trigger Characteristic
amplifier is a Schmitt Trigger This configuration waschosen to prevent crosstalk from the TO pin which isadjacent to the XTAL1 pin
All Schmitt Trigger circuits exhibit a hysteresis effect
as shown in Figure 22 The hysteresis is what makes itless sensitive to noise The same hysteresis allows anySchmitt Trigger to be used as a relaxation oscillatorAll you have to do is connect a resistor from output toinput and a capacitor from input to ground and thecircuit oscillates in a relaxation mode as follows
If the Schmitt Trigger output is at a logic high thecapacitor commences charging through the feedbackresistor When the capacitor voltage reaches the uppertrigger point (UTP) the Schmitt Trigger outputswitches to a logic low and the capacitor commencesdischarging through the same resistor When the capac-itor voltage reaches the lower trigger point (LTP) theSchmitt Trigger output switches to a logic high againand the sequence repeats The oscillation frequency isdetermined by the RC time constant and the hysteresis
voltage UTP-LTPThe 8048 can oscillate in this mode It has an internalfeedback resistor All thats needed is an external ca-pacitor from XTAL1 to ground In fact if a smallerexternal feedback resistor is added an 8048 systemcould be designed to run in this mode Do it at your own risk This mode of operation is not tested specifieddocumented or encouraged in any way by Intel for the8048 Future steppings of the device might have a dif-ferent type of inverting amplifier (one more like the8051) The CHMOS members of the MCS-48 family donot use a Schmitt Trigger as the inverting amplifier
Relaxation oscillations in the 8048 must be avoidedand this is the major objective in selecting the off-chipcomponents needed to complete the oscillator circuit
When an 8048 is powered up if VCC has a short risetime the relaxation mode starts first The frequency isnormally about 50 KHz The resonator mode builds
more slowly but it eventually takes over and dominatesthe operation of the cirucit This is shown in Figure23A
Due to processing variations some units seem to have aharder time coming out of the relaxation mode partic-ularly at low temperatures In some cases the resonatoroscillations may fail entirely and leave the device in therelaxation mode Most units will stick in the relaxationmode at any temperature if C X1 is larger than about 50pF Therefore C X1 should be chosen with some careparticularly if the system must operate at lower temper-atures
One method that has proven effective in all units tob 40 C is to put 5 pF from XTAL1 to ground and 20pF from XTAL2 to ground Unfortunately while thismethod does discourage the relaxation mode it is notan optimal choice for the resonator mode For onething it does not swamp the pin capacitance Also itmakes for a rather high signal level at XTAL1 (8 or 9volts peak-to-peak)
The question arises as to whether that level of signal atXTLA1 might damage the chip Not to worry Thenegative peaks are self-limiting and nondestructive Thepositive peaks could conceivably damage the oxide butin fact NMOS chips (eg 8048) and HMOS chips (eg8048H) are tested to a much higher voltage than thatThe technology trend of course is to thinner oxides asthe devices shrink in size For an extra margin of safetythe HMOS II chips (eg 8048AH) have an internal di-ode clamp at XTAL1 to VCC
In reality C X1 doesnt have to be quite so small toavoid relaxation oscillations if the minimum operatingtemperature is not b 40 C For less severe temperaturerequirements values of capacitance selected in muchthe same way as for an 8051 can be used The circuitshould be tested however at the systems lowest tem-perature limit
Additional security against relaxation oscillations canbe obtained by putting a 1M-ohm (or larger) resistorfrom XTAL1 to VCC Pulling up the XTAL1 pin thisway seems to discourage relaxation oscillations as effec-tively as any other method (Figure 23B)
Another thing that discourages relaxation oscillations islow VCC The resonator mode on the other hand ismuch less sensitive to VCC Thus if VCC comes uprelatively slowly (several milliseconds rise time) theresonator mode is normally up and running before therelaxation mode starts (in fact before VCC has evenreached operating specs) This is shown in Figure 23C
A secondary effect of the hysteresis is a shift in the
oscillation frequency At low frequencies the outputsignal from an inverter without hysteresis leads (orlags) the input by 180 degrees The hysteresis in aSchmitt Trigger however causes the output to lead the
17
7/31/2019 Crystall Oscillator
22/40
AP-155
input by less than 180 degrees (or lag by more than 180degrees) by an amount that depends on the signal am-plitude as shown in Figure 24 At higher frequenciesthere are additional phase shifts due to the various reac-tances in the circuit but the phase shift due to the hys-teresis is still present Since the total phase shift in theoscillators loop gain is necessarily 0 or 360 degrees itis apparent that as the oscillations build up the fre-quency has to change to allow the reactances to com-pensate for the hysteresis In normal operation this ad-ditional phase shift due to hysteresis does not exceed afew degrees and the resulting frequency shift is negligi-ble
Kyocera a ceramic resonator manufacturer studiedthe use of some of their resonators (at 6 0 MHz 8 0MHz and 11 0 MHz) with the 8049H Their conclu-sion as to the value of capacitance to use at XTAL1 andXTAL2 was that 33 pF is appropriate at all three fre-quencies One should probably follow the manufactur-ers recommendations in this matter since they willguarantee operation
Whether one should accept these recommendations andguarantees without further testing is however anothermatter Not all users have found the recommendationsto be without occasional problems If you run into diffi-
23065934A) When VCC Comes Up Fast Relaxation Oscillations
Start First But Then the Crystal Takes Over
23065935B) Weak Pullup (1 M X or More) on XTAL1
Discourages Relaxation Mode
23065936C) No Relaxation Oscillations When VCC Comes Up
More Slowly
23065937
23065938
23065939
Figure 23 Relaxation Oscillations in the 8048
18
7/31/2019 Crystall Oscillator
23/40
AP-155
culties using their recommendations both Intel and theceramic resonator manufacturer want to know about itIt is to their interest and ours that such problems beresolved
23065940A) Inverter Without Hysteresis Output Leads Input by 180
23065941B) Inverter With Hysteresis Output Leads
Input by Less than 180
Figure 24 AmplitudeDependent PhaseShift in Schmitt Trigger
Preproduction Tests
An oscillator design should never be considered readyfor production until it has proven its ability to functionacceptably well under worst-case environmental condi-tions and with parameters at their worst-case tolerancelimits Unexpected temperature effects in parts thatmay already be near their tolerance limits can preventstart-up of an oscillator that works perfectly well on thebench For example designers often overlook tempera-ture effects in ceramic capacitors (Some ceramics aredown to 50% of their room-temperature values atb 20 C and a 60 C) The problem here isnt just one of frequency stability but also involves start-up time andsteady-state amplitude There may also be temperatureeffects in the resonator and amplifier
It will be helpful to build a test jig that will allow theoscillator circuit to be tested independently of the restof the system Both start-up and steady-state character-istics should be tested Figure 25 shows the circuit that
A) Software for Oscillator Test
SOURCEORG 0000 H
JMP STARTORG 000B H TIMER 0 INTERRUPT
CPL T1 TOGGLE T1RETI
ORG 0001BH TIMER 1 INTERRUPTCP L P 1 1 TO GGLE CRO TRI GG ERDJNZ P2 $ DELAYCP L P 1 0 TO GGLE VCC CON TROLRETI
START MOV TH1 OFAH TIMER 1 RELOAD VALUEMOV TL1 OFAH START TL1 AT RELOAD VALUEMOV TMOD 61H TIMER 1 TO COUNTER AUTO
RELOADTIMER 0 TO TIMER 16-BIT
MOV IE BAH ENABLE TIMER INTERRUPTSONLY
MOV TCON 50H TURN ON BOTH TIMERSJMP $ IDLE
END
23065942B) Oscillator Test Circuit (Shown for 8051 Test)
Figure 25 Oscillator Test Circuit and Software
19
7/31/2019 Crystall Oscillator
24/40
AP-155
was used to obtain the oscillator start-up photographsin this Application Note This circuit or a modifiedversion of it would make a convenient test vehicle Theoscillator and its relevant components can be physicallyseparated from the control circuitry and placed in atemperature chamber
Start-up should be observed under a variety of condi-tions including low VCC and using slow and fast VCCrise times The oscillator should not be reluctant tostart up even when VCC is below its spec value for therest of the chip (The rest of the chip may not functionbut the oscillator should work ) It should also be veri-fied that start-up occurs when the resonator has morethan its upper tolerance limit of series resistance (Putsome resistance in series with the resonator for thistest ) The bulk capacitors from XTAL1 and XTAL2 toground should also be varied to their tolerance limits
The same circuit with appropriate changes in the soft-ware to lengthen the on time can be used to test thesteady-state characteristics of the oscillator specificallythe frequency frequency stability and amplitudes atXTAL1 and XTAL2
As previously noted the voltage swings at these pinsare not critical but they should be checked at the sys-tems temperature limits to ensure that they are in goodhealth Observing these signals necessarily changesthem somewhat Observing the signal at XTAL2 re-quires that the capacitor at that pin be reduced to ac-count for the oscilloscope probe capacitance Observingthe signal at XTAL1 requires the same considerationplus a blocking capacitor (switch the oscilloscope inputto AC) so as to not disturb the DC level at that pinAlternatively a MOSFET buffer such as the one shownin Figure 26 can be used It should be verified by directmeasurement that the ground clip on the scope probe isohmically connected to the scope chassis (probes areincredibly fragile in this respect) and the observationsshould be made with the ground clip on the VSS pin orvery close to it If the probe shield isnt operational andin use the observations are worthless
23065943
Figure 26 MOSFET Buffer for ObservingOscillator Signals
Frequency checks should be made with only the oscilla-tor circuitry connected to XTAL1 and XTAL2 TheALE frequency can be counted and the oscillator fre-quency derived from that In systems where the fre-quency tolerance is only nominal the frequencyshould still be checked to ascertain that the oscillatorisnt running in a spurious resonance or relaxationmode Switching VCC off and on again repeatedly willhelp reveal a tendency to go into unwanted modes of oscillation
The operation of the oscillator should then be verifiedunder actual system running conditions By this stageone will be able to have some confidence that the basicselection of components for the oscillator itself is suit-able so if the oscillator appears to malfunction in thesystem the fault is not in the selection of these compo-nents
Troubleshooting Oscillator Problems
The first thing to consider in case of difficulty is that
between the test jig and the actual application theremay be significant differences in stray capacitancesparticularly if the actual application is on a multi-layerboard
Noise glitches that arent present in the test jig but arein the application board are another possibility Capac-itive coupling between the oscillator circuitry and othersignal has already been mentioned as a source of mis-counts in the internal clocking circuitry Inductive cou-pling is also possible if there are strong currents near-by These problems are a function of the PCB layout
Surrounding the oscillator components with quiettraces (VCC and ground for example) will alleviate ca-pacitive coupling to signals that have fast transitiontimes To minimize inductive coupling the PCB layout
should minimize the areas of the loops formed by theoscillator components These are the loops that shouldbe checked
XTAL1 through the resonator to XTAL2XTAL1 through C X1 to the VSS pinXTAL2 through C X2 to the VSS pin
It is not unusual to find that the grounded ends of C X1and C X2 eventually connect up to the VSS pin onlyafter looping around the farthest ends of the board Notgood
Finally it should not be overlooked that software prob-lems sometimes imitate the symptoms of a slow-startingoscillator or incorrect frequency Never underestimatethe perversity of a software problem
20
7/31/2019 Crystall Oscillator
25/40
AP-155
REFERENCES
1 Frerking M E Crystal Oscillator Design and Tem- perature Compensation Van Nostrand Reinhold 1978
2 Bottom V The Crystal Unit as a Circuit Compo-nent Ch 7 Introduction to Quartz Crystal Unit De- sign Van Nostrand Reinhold 1982
3 Parzen B Design of Crystal and Other HarmonicOscillators John Wiley Sons 1983
4 Holmbeck J D Frequency Tolerance Limitationswith Logic Gate Clock Oscillators 31st Annual Fre- quency Control Symposium June 1977
5 Roberge J K Nonlinear Systems Ch 6 Opera-tional Amplifiers Theory and Practice Wiley 1975
6 Eaton S S Timekeeping Advances ThroughCOS MOS Technology RCA Application Note ICAN-6086
7 Eaton S S Micropower Crystal-Controlled Oscilla-tor Design Using RCA COS MOS Inverters RCA Ap-plication Note ICAN-6539
8 Fisher J B Crystal Specifications for the Intel 8031 8051 8751 Microcontrollers Standard CrystalCorp Design Data Note 2F
9 Murata Mfg Co Ltd Ceramic ResonatorCeralock Application Manual
10 Kyoto Ceramic Co Ltd Adaptability Test Between Intel 8049H and Kyocera Ceramic Resonators
11 Kyoto Ceramic Co Ltd Technical Data on Ce- ramic Resonator Model KBR-6 0M KBR-8 0M KBR-11 0M Application for 8051 (Intel)
12 NTK Technical Ceramic Division NGK SparkPlug Co Ltd NTKK Ceramic Resonator Manual
21
7/31/2019 Crystall Oscillator
26/40
7/31/2019 Crystall Oscillator
27/40
7/31/2019 Crystall Oscillator
28/40
AP-155
It will be noted that the series resonant frequency of theXTAL a CL configuration (crystal in series with CL)is the same as the parallel resonant frequency of theXTAL llCL configuration (crystal in parallel withCL) This is the frequency at which
1 b 0 2L1C T e 0
Thus0 a e
10L1C T
orfa e
12q 0L1C T
This fact is used by crystal manufacturers in the pro-cess of calibrating a crystal to a specified load capaci-tance
By subtracting the resonant frequency of the crystalfrom its antiresonant frequency one can calculate therange of frequencies over which the crystal reactance ispositive
fa b fs e fs (01 a C1 C 0 b 1
fsC1
2C0 JGiven typical values for C 1 and C 0 this range canhardly exceed 0 5% of fs Unless the inverting amplifierin the positive reactance oscillator is doing somethingvery strange indeed the oscillation frequency is boundto be accurate to that percentage whether the crystalwas calibrated for series operation or to any unspecifiedload capacitance
Equivalent Series Resistance
ESR is the real part of Z XTAL at the oscillation fre-quency The oscillation frequency is the parallel reso-nant frequency of the XTAL llCL configuration(which is the same as the series resonant frequency of the XTAL a CL configuration) Substituting this fre-quency into the Z XTAL expression yields after somealgebraic manipulation
ESR eR1
C0 a CLCL J
2
1 a 0 2C 21C0 a CL
CL J2
j R1 1 aC0CLJ
2
Drive Level
The power dissipated by the crystal is I 21R 1 where I 1 isthe RMS current in the motional arm of the crystalThis current is given by V x lZ1l where V x is the RMSvoltage across the crystal and lZ1l is the magnitude of the impedance of the motional arm At the oscillationfrequency the motional arm is a positive (inductive)reactance in parallel resonance with (C 0 a CL) There-fore lZ1l is approximately equal to the magnitude of thereactance of (C 0 a CL)
lZ1l e1
2q f(C0 a CL)
where f is the oscillation frequency Then
P e I21 R1 eVxlZ1lJ
2R1
e 2q f (C0
a CL) V
x2 R
1
The waveform of the voltage across the crystal(XTAL1 to XTAL2) is approximately sinusoidal If itspeak value is VCC then V x is VCC 02 Therefore
P e 2R 1 q f (C0 a CL) VCC 2
A-2
7/31/2019 Crystall Oscillator
29/40
AP-155
APPENDIX BOSCILLATOR ANALYSIS PROGRAM
The program is written in BASIC BASIC is excruciat-ingly slow but it has some advantages For one thingmore people know BASIC than FORTRAN In addi-tion a BASIC program is easy to develop modify andfiddle around with Another important advantage isthat a BASIC program can run on practically any smallcomputer system
Its slowness is a problem however For example theroutine which calculates the start-up time constantdiscussed in the text may take several hours to com-plete A person who finds this program useful may pre-fer to convert it to FORTAN if the facilities are avail-able
Limitations of the Program
The program was developed with specific reference to8051-type oscillator circuitry That means the on-chipamplifier is a simple inverter and not a Schmitt Trig-ger The 8096 the 80C51 the 80C48 and 80C49 allhave simple inverters The 8096 oscillator is almostidentical to the 8051 differing mainly in the input pro-tection circuitry The CHMOS amplifiers have some-what different parameters (higher gain for example)and different transition levels than the 8051
The MCS-48 family is specifically included in the pro-gram only to the extent that the input-output curveused in the steady-state analysis is that of a Schmitt
Trigger if the user identifies the device under analysisas an MCS-48 device The analysis does not include thevoltage dependent phase shift of the Schmitt Trigger
The clamping action of the input protection circuitry isimportant in determining the steady-state amplitudesThe steady-state routine accounts for it by setting thenegative peak of the XTAL1 signal at a level whichdepends on the amplitude of the XTAL1 signal in ac-cordance with experimental observations Its an exer-cise in curve-fitting A user may find a different type of curve works better Later steppings of the chips maybehave differently in this respect having somewhat dif-ferent types of input protection circuitry
It should be noted that the analysis ignores a number of important items such as high-frequency effects in theon-chip circuitry These effects are difficult to predictand are no doubt dependent on temperature frequencyand device sample However they can be simulated to areasonable degree by adding an output capacitance of about 20 pF to the circuit model (i e in parallel withCX2) as described below
Notes on Using the Program
The program asks the user to input values for variouscircuit parameters First the crystal (or ceramic resona-
tor) parameters are asked for These are R1 L1 C1and C0 The manufacturer can supply these values forselected samples To obtain any kind of correlation be-tween calculation and experiment the values of theseparameters must be known for the specific sample inthe test circuit The value that should be entered for C0is the C0 of the crystal itself plus an estimated 7 pF toaccount for the XTAL1-to-XTAL2 pin capacitanceplus any other stray capacitance paralleling the crystalthat the user may feel is significant enough to be includ-ed
Then the program asks for the values of the XTAL1-to-ground and XTAL2-to-ground capacitances ForCXTAL1 enter the value of the externally connectedbulk capacitor plus an estimated 7 pF for pin capaci-tance For CXTAL2 enter the value of the externally
connected bulk capacitor plus an estimated 7 pF for pincapacitance plus about 20 pF to simulate high-frequen-cy roll-off and phase shifts in the on-chip circuitry
Next the program asks for values for the small-signalparameters of the on-chip amplifier Typically for the8051 8751
Amplifier Gain Magnitude e 15Feedback Resistance e 2300 K XOutput Resistance e 2 K X
The same values can be used for MCS-48 (NMOS andHMOS) devices but they are difficult to verify becausethe Schmitt Trigger does not lend itself to small-signalmeasurements
B-1
7/31/2019 Crystall Oscillator
30/40
7/31/2019 Crystall Oscillator
31/40
AP-155
23065945
B-3
7/31/2019 Crystall Oscillator
32/40
AP-155
23065946
B-4
7/31/2019 Crystall Oscillator
33/40
AP-155
23065947
B-5
7/31/2019 Crystall Oscillator
34/40
AP-155
23065948
B-6
7/31/2019 Crystall Oscillator
35/40
AP-155
23065949
B-7
7/31/2019 Crystall Oscillator
36/40
AP-155
23065950
B-8
7/31/2019 Crystall Oscillator
37/40
INTEL SUPPLY FILLER
7/31/2019 Crystall Oscillator
38/40
INTEL SUPPLY FILLER
7/31/2019 Crystall Oscillator
39/40
INTEL SUPPLY FILLER
7/31/2019 Crystall Oscillator
40/40
INTEL CORPORATION 2200 Mission College Blvd Santa Clara CA 95052 Tel (408) 765-8080
INTEL CORPORATION (U K ) Ltd Swindon United Kingdom Tel (0793) 696 000
INTEL JAPAN k k Ibaraki-ken Tel 029747-8511
Printed in U S A xxxx 0196 B10M xx xx
Recommended