crystal oscillator for mc

40
APPLICATION NOTE AP-155 June 1983 Oscillators for Microcontrollers TOM WILLIAMSON MICROCONTROLLER TECHNICAL MARKETING Order Number: 230659-001

Upload: bgowthami

Post on 07-Oct-2014

66 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Crystal Oscillator for Mc

APPLICATIONNOTE

AP-155

June 1983

Oscillatorsfor Microcontrollers

TOM WILLIAMSON

MICROCONTROLLERTECHNICAL MARKETING

Order Number: 230659-001

Page 2: Crystal Oscillator for Mc

Information in this document is provided in connection with Intel products. Intel assumes no liability whatsoev-er, including infringement of any patent or copyright, for sale and use of Intel products except as provided inIntel’s Terms and Conditions of Sale for such products.

Intel retains the right to make changes to these specifications at any time, without notice. MicrocomputerProducts may have minor variations to this specification known as errata.

*Other brands and names are the property of their respective owners.

²Since publication of documents referenced in this document, registration of the Pentium, OverDrive andiCOMP trademarks has been issued to Intel Corporation.

Contact your local Intel sales office or your distributor to obtain the latest specifications before placing yourproduct order.

Copies of documents which have an ordering number and are referenced in this document, or other Intelliterature, may be obtained from:

Intel CorporationP.O. Box 7641Mt. Prospect, IL 60056-7641

or call 1-800-879-4683

COPYRIGHT © INTEL CORPORATION, 1995

Page 3: Crystal Oscillator for Mc

OSCILLATORS FORMICROCONTROLLERS

CONTENTS PAGE

INTRODUCTION ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 1

FEEDBACK OSCILLATORS ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 1

Loop Gain ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 1

How Feedback Oscillators Work ÀÀÀÀÀÀÀÀÀÀÀÀ 2

The Positive Reactance Oscillator ÀÀÀÀÀÀÀÀÀÀ 2

QUARTZ CRYSTALS ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 3

Crystal Parameters ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 3

Equivalent Circuit ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 3

Load Capacitance ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 4

‘‘Series’’ vs. ‘‘Parallel’’ Crystals ÀÀÀÀÀÀÀÀÀÀÀÀÀ 4

Equivalent Series Resistance ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 4

Frequency Tolerance ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 5

Drive Level ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 5

CERAMIC RESONATORS ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 5

Specifications for Ceramic Resonators ÀÀÀÀÀÀ 6

OSCILLATOR DESIGNCONSIDERATIONS ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 6

On-Chip Oscillators ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 6

Crystal Specifications ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 6

Oscillation Frequency ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 7

Selection of CX1 and CX2 ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 7

Placement of Components ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 7

Clocking Other Chips ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 7

External Oscillators ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 8

Gate Oscillators vs. Discrete Devices ÀÀÀÀÀÀ 10

Fundamental vs. OvertoneOperation ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 11

‘‘Series’’ vs. ‘‘Parallel’’ Operation ÀÀÀÀÀÀÀÀ 11

Page 4: Crystal Oscillator for Mc

CONTENTS PAGE

MORE ABOUT USING THE ‘‘ON-CHIP’’OSCILLATORS ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 11

Oscillator Calculations ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 11

Start-Up Characteristics ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 13

Steady-State Characteristics ÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 15

Pin Capacitance ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 16

MCSÉ-51 Oscillator ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 16

MCSÉ-48 Oscillator ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 16

CONTENTS PAGE

Pre-Production Tests ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 19

Troubleshooting Oscillator Problems ÀÀÀÀÀÀ 20

APPENDIX A: QUARTZ AND CERAMICRESONATOR FORMULAS ÀÀÀÀÀÀÀÀÀÀÀÀ A-1

APPENDIX B: OSCILLATOR ANALYSISPROGRAM ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ B-1

Page 5: Crystal Oscillator for Mc

AP-155

INTRODUCTION

Intel’s microcontroller families (MCSÉ-48, MCSÉ-51,and 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 ofthe 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 don’t publish a list of re-quired crystal or ceramic resonator specifications, andrecommend values for the other off-chip components.This 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 crsytals,you order the expensive ones. In fact, Intel guaranteesonly what is embodied within an Intel product. Besides,there is no reason why 50-ohm crystals couldn’t 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 applications,neither 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 ‘‘recommend’’specific 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 Av1 and the output signal from the passive networkis v3 e bv2 e bAv1. Thus bA is the overall gainfrom terminal 1 to terminal 3.

230659–1

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 bA 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 number,one must specify both quantities, magnitude and angle.A number whose magnitude is 3, and whose angle is 45degrees is commonly written this way: 3K45§. The num-ber 1 is, in complex number notation, 1K0§, while b1 is1K180§.

By closing the feedback loop in Figure 1, we force theequality

v1 e bAv1

This equation has two solutions:

1) v1 e 0;

2) bA e 1K0§.

1

Page 6: Crystal Oscillator for Mc

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 you’re 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 degrees.Second 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-signalproperties of the circuit, specifically, the small-signalloop gain. Steady-state characteristics of the oscillatordepend on the large-signal properties of the circuit,such 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 the‘‘positive 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 phasewith 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.

230659–2

Figure 2. Positive Reactance Oscillator

In order for the loop gain to have zero phase angle it isnecessary that the feedback element Zf 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 e

a1

0C

where Xf is the reactance of Zf (the total Zf being Rf a

jXf, and C is the series combination of CX1 and CX2.

C e

CX1 CX2

CX1 a CX2

In other words, Zf and C form a parallel resonant cir-cuit.

If Zf is an inductor, then Xf e 0L, and the frequencyat which the loop gain has zero phase is the frequencyat which

0L e

1

0C

or

0 e

1

0LC

Normally, Zf is not an inductor, but it must still have apositive reactance in order for the circuit to oscillate.There 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 device,this circuit configuration is called a Pierce oscillator.The 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/0C at some frequency withinthis range, so the oscillation frequency will be withinthe same range. Typically, the width of this range is

2

Page 7: Crystal Oscillator for Mc

AP-155

only 0.3% of the nominal frequency of a quartz crystal,and about 3% of the nominal frequency of a ceramicresonator. With relatively little design effort, frequencyaccuracies of 0.03% or better can be obtained withquartz crystals, and 0.3% or better with ceramic reso-nators.

QUARTZ CRYSTALS

The crystal resonator is a thin slice of quartz sand-wiched between two electrodes. Electrically, the devicelooks pretty much like a 5 or 6 pF capacitor, exceptthat over certain ranges of frequencies the crystal has apositive (i.e., inductive) reactance.

The ranges of positive reactance originate in the piezo-electric property of quartz: Squeezing the crystal gener-ates an internal E-field. The effect is reversible: Apply-ing an AC E-field causes the crystal to vibrate. At cer-tain vibrational frequencies there is a mechanical reso-nance. As the E-field frequency approaches a frequencyof mechanical resonance, the measured reactance of thecrystal becomes positive, as shown in Figure 3.

230659–3

Figure 3. Crystal Reactance vs. Frequency

Typically there are several ranges of frequencies where-in the reactance of the crystal is positive. Each rangecorresponds to a different mode of vibration in the crys-tal. The main resonsances are the so-called fundamen-tal response and the third and fifth overtone responses.

The overtone responses shouldn’t be confused with theharmonics of the fundamental. They’re not harmonics,but different vibrational modes. They’re not in generalat exact integer multiples of the fundamental frequency.There will also be ‘‘spurious’’ responses, occurring typi-cally a few hundred KHz above each main response.

To assure that an oscillator starts in the desired modeon power-up, something must be done to suppress theloop gain in the undesired frequency ranges. The crys-tal itself provides some protection against unwantedmodes of oscillation; too much resistance in that mode,for example. Additionally, junction capacitances in theamplifying devices tend to reduce the gain at higherfrequencies, and thus may discriminate against unwant-ed modes. In some cases a circuit fix is necessary, suchas inserting a trap, a phase shifter, or ferrite beads tokill oscillations in unwanted modes.

Crystal Parameters

Equivalent Circuit

Figure 4 shows an equivalent circuit that is used torepresent the crystal for circuit analysis.

The R1-L1-C1 branch is called the motivational arm ofthe crystal. The values of these parameters derive fromthe mechanical properties of the crystal and are con-stant for a given mode of vibration. Typical values forvarious nominal frequencies are shown in Table 1.

230659–4

Figure 4. Quartz Crystal: Symbol and

Equivalent Circuit

C0 is called the shunt capacitance of the crystal. This isthe capacitance of the crystal’s electrodes and the me-chanical holder. If one were to measure the reactance ofthe crystal at a freuqency far removed from a resonancefrequency, it is the reactance of this capacitance thatwould be measured. It’s normally 3 to 7 pF.

Table 1. Typical Crystal Parameters

Frequency R1 L1 C1 C0

MHz ohms mH pF pF

2 100 520 0.012 4

4.608 36 117 0.010 2.9

11.25 19 8.38 0.024 5.4

3

Page 8: Crystal Oscillator for Mc

AP-155

The series resonant frequency of the crystal is the fre-quency at which L1 and C1 are in resonance. This fre-quency is given by

fs e

1

2q0L1C1

At this frequency the impedance of the crystal is R1 inparallel with the reactance of C0. For most purposes,this impedance is taken to be just R1, since the reac-tance of C0 is so much larger than R1.

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 e

CX1 CX2

CX1 a CX2

a Cstray

The crystal manufacturer needs to know the value ofCL in order to adjust the crystal to the specified fre-quency.

230659–6

Figure 5. Load Capacitance

The adjustment involves putting the crystal in serieswith the specified CL, and then ‘‘trimming’’ the crystalto obtain resonance of the series combination of thecrystal and CL at the specified frequency. Because ofthe high Q of the crystal, the resonant frequency of theseries combination of the crystal and CL is the same as

the antiresonant frequency of the parallel combinationof the crystal and CL. This frequency is given by

fa e

1

2q0L1 C1 (CL a C0)/(C1 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 high,and that the circuit external to the crystal has no effecton the frequency other than to provide the load capaci-tance CL. The latter assumption is not precisely true,but 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 fs of the crystal. To operate the crystal at fs,the 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 fs. Infact, at approximately

fa e fs #1 a

C1

2(CL a C0)JThis frequency would typically be about 0.02% abovefs.

Equivalent Series Resistance

The ‘‘series resistance’’ often listed on quartz crystaldata sheets is the real part of the crystal impedance atthe crystal’s calibration frequency. This will be R1 ifthe 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 a

C0

CLJ2

The crystal manufacturer measures this resistance atthe calibration frequency during the same operation inwhich the crystal is adjusted to the calibration frequen-cy.

4

Page 9: Crystal Oscillator for Mc

AP-155

Frequency Tolerance

Frequency tolerance as discussed here is not a require-ment on the crystal, but on the complete oscillator.There are two types of frequency tolerances on oscilla-tors: frequency acccuracy and frequency stability. Fre-quency accuracy refers to the oscillator’s 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 pF,the 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. That’s be-cause for any load capacitance the oscillation frequencyis certain to be between the crystal’s resonant and anti-resonant frequencies.

Phase shifts that take place within the amplifier part ofthe oscillator will also affect frequency accuracy andstability. These phase shifts can normally be modeled asan ‘‘output capacitance’’ that, in the positive reactanceoscillator, parallels CX2. 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 level’’and ‘‘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 don’t even require itfor microprocessor crystals.

In a positive reactance oscillator, if one assumes thepeak voltage across the crystal to be something in theneighborhood of VCC, the power dissipation can be ap-proximated as

P e 2R1 [qf (CL a C0) VCC]2

This formula is derived in Appendix A. In a 5V system,P rarely evaluates to more than a milliwatt. Crystalswith a standard 1 or 2 mW drive level rating can beused in most digital systems.

230659–7

Figure 6. Ceramic Resonator Impedance vs.

Frequency (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 crystal’s, and an equivalent circuit thatlooks just like a crystal’s (with different parameter val-ues, however).

The frequency tolerance of a ceramic resonator is abouttwo orders of magnitude wider than a crystal’s, 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 lZfl versus frequency, where

5

Page 10: Crystal Oscillator for Mc

AP-155

as Figure 3 is a graph of Xf 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.

230659–8

Figure 7. Ceramic Resonator: Symbol and

Equivalent Circuit

Figure 7 shows the symbol and equivalent circuit forthe ceramic resonator, both of which are the same asfor the crystal. The parameters have different values,however, as listed in Table 2.

Table 2. Typical Ceramic Parameters

Frequency R1 L1 C1 C0MHz 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

Note that the motional arm of the ceramic resonatortends to have less resistance than the quartz crystal andalso a vastly reduced L1/C1 ratio. This results in themotional arm having a Q (given by (1/R1) 0L1/C1) thatis typically two orders of magnitude lower than that ofa 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 C0 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 Resonators

Ceramic 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 with.They’ll 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 ofoptions 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 we’ll discusssome of the factors that should be considered.

230659–9

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 CX1 and CX2, 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

Page 11: Crystal Oscillator for Mc

AP-155

We are often asked what maximum crystal resistanceshould be specified. The best answer to this question isthe lower the better, but use what’s available. The crys-tal resistance will have some effect on start-up time andsteady-state amplitude, but not so much that it can’t becompensated for by appropriate selection of the capaci-tances CX1 and CX2.

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, they’re 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 won’t take your order until you’vefilled out their list of specifications. It will help if youdefine your actual frequency tolerance requirements,both for yourself and to the crystal manufacturer.Don’t 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 CX1 and CX2, and theXTAL1-to-XTAL2 (pin-to-pin) capacitance, whichparallels 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 CX1 and CX2

Optimal values for the capacitors CX1 and CX2 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 CX1 and CX2should be about equal and at least 20 pF. (But theydon’t 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 time.There is a maximum value (several hundred pF, de-pending on the value of R1 of the quartz or ceramicresonator) above which the oscillator won’t start up atall.

If the on-chip amplifier is a simple inverter, such as inthe 8051, the user can select values for CX1 and CX2between 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 CX1 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 CX1 and CX2 (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 XTAL1,XTAL2, 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

Page 12: Crystal Oscillator for Mc

AP-155

230659–10A) DRIVING FROM XTAL2

230659–11B) DRIVING FROM XTAL1

Figure 9. Using the On-Chip Oscillator

to 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 it’s 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 bedriven 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

Page 13: Crystal Oscillator for Mc

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-tions.

Frequency Range: HS-100Ð3.5 MHz to 30 MHz

HS-200Ð225 KHz to 3.5 MHz

HS-500Ð25 MHz to 60 MHz

Frequency Tolerance: g0.1% Overall 0§C–70§C

Hermetically Sealed Package

Mass spectrometer leak rate max.

1 c 10b8 atmos. cc/sec. of helium

Output Waveform

230659–12

INPUT

HS-100 HS-200 HS-500

3.5 MHz–20 MHz 20a MHz–30 MHz 225 KHz–4.0 MHz 25 MHz–60 MHz

Supply Voltage

(VCC) 5V g10% 5V g10% 5V g10% 5V g10%

Supply Current

(ICC) max. 30 mA 40 mA 85 mA 50 mA

OUTPUT

HS-100 HS-200 HS-500

3.5 MHz–20 MHz 20a MHz–30 MHz 225 KHz–4.0 MHz 25 MHz–60 MHz

VOH (Logic ‘‘1’’) a2.4V min.1 a2.7V min.2 a2.4V min.1 a2.7V min.2

VOL (Logic ‘‘0’’) a0.4V max.3 a0.5V max.4 a0.4V max.3 a0.5V max.4

Symmetry 60/40%5 60/40%5 55/45%5 60/40%5

TR, TF (Rise &

Fall Time) k 10 ns6 k 5 ns6 k 15 ns6 k 5 ns6

Output Short

Circuit Current 18 mA min. 40 mA min. 18 mA min. 40 mA min.

Output Load 1 to 10 TTL Loads7 1 to 10 TTL Loads8 1 to 10 TTL Loads7 1 to 10 TTL Loads8

CONDITIONS1I0 source e b400 mA max. 410 sink e 20.00 mA max. 71.6 mA per load2I0 source e b1.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

Page 14: Crystal Oscillator for Mc

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 directly,one will want to make a careful comparison betweenthe external drive requirements in the microcontrollerdata sheet and the oscillator’s 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.

It’s easy to design oscillators that work. Almost all ofthem do work, even if the designer isn’t 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 designer’s 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 oscillator.A 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, however,since 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-ohms.But shunting the crystal with such a low resistance doesnot encourage start-up.

230659–13A) TTL OSCILLATOR

230659–14B) CMOS OSCILLATOR

Figure 11. Commonly Used Gate Oscillators

Consequently, the configuration in Figure 11A mightbe suggested. By breaking Rf into two parts and AC-grounding the midpoint, one achieves the DC feedbackrequired 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 Rf can be usedto hold the inverter in its linear region.

Logic gates tend to have a fairly low output resistance,which 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

Page 15: Crystal Oscillator for Mc

AP-155

Fundamental versus Overtone Operation

It’s easier to design an oscillator circuit to operate inthe resonator’s 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 R1 of various spuriousmodes is likely to be about the same as R1 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 oftrouble.

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 amplifiers.To 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 VCC. Ithas a tendency to oscillate at overtones, and to oscillatethrough C0 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 fs.However, to further complicate the situation, the am-plifier’s phase shift is strongly dependent on frequency,temperature, VCC, and device sample.

230659–15

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 amplifier’s phaseshift is less critical, compared to a series resonant cir-cuit, and since only one inverter is involved there’s 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-CHIP’’OSCILLATORS

In this section we will describe the on-chip inverters onselected microcontrollers in some detail, and discusscriteria for selecting components to work with them.Future data sheets will supplement this discussion withupdates and information pertinent to the use of eachchip’s 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 resistors,resistors being used as interconnects, distributed delays,input 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

Page 16: Crystal Oscillator for Mc

AP-155

230659–16A) 8081-Type Circuit Configuration during Start-Up.

(Excludes Input Protection Devices.)

230659–17B) ACÐEquivalent of (A)

Figure 13. Oscillator Circuit Model Used

in Start-Up Calculations

The analysis used here is mathematically straightfor-ward but algebraically intractable. That means it’s rela-tively easy to understand and program into a computer,but it will not yield a neat formula that gives, say,steady-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 ZL. 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 ZL

ZL a R0

230659–18

Figure 14. Loop Gain versus Frequency

(4.608 MHz Crystal)

The gain of the feedback network is

b e

Zi

Zi a Zf

And the loop gain is

bA e

Zi

Zi a Zf

c

Av ZL

ZL a R0

The impedances ZL, Zf, and Zi are defined in Figure13B.

Figure 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 zero.The 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 CL.

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

Page 17: Crystal Oscillator for Mc

AP-155

230659–19

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 ofcomplex 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 eat sin (0t a i)

where a is the real part of the pole frequency. Thus ifthe 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 they’re in the right-half plane.An exponentially growing sinusoid is exactly what iswanted from an oscillator that has just been poweredup.

230659–20A) Poles in the Left-Half Plane: f(t) E ebat sin (0t a i)

230659–21B) Poles in the Right-Half Plane: f(t) E eaat sin (0t a i)

230659–22C) Poles the j0 Axis: f(t) E sin (0t a i)

Figure 16. Do You Know Where Your

Poles Are Tonight?

The gain function of interest in oscillators is 1/(1 b

bA). Its poles are at the complex frequencies where bAe 1K0§, because that value of bA 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 howmuch 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 bA 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 CX fromXTAL1 and XTAL2 to ground (thus CX1 e CX2 e

CX). Then a ‘‘time constant’’ for start-up was calculat-

ed as Ts e

1

swhere s is the real part of the pole fre-

quency (rad/sec), and this time constant is plotted ver-sus CX.

13

Page 18: Crystal Oscillator for Mc

AP-155

230659–23

230659–24

230659–25

Figure 17. Oscillator Start-Up (4.608 MHz Crystal

from 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 time,but 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 CX1 and CX2 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 j0axis. In steady-state, the poles are on the j0 axis andthe amplitude of the oscillations is constant.

230659–26

230659–27

230659–28

Figure 18. Oscillator Start-Up (3.58 MHz Ceramic

Resonator from NTK Technical Ceramics)

14

Page 19: Crystal Oscillator for Mc

AP-155

230659–29A) Signal Levels at XTAL1

230659–30B) Signal Levels at XTAL2

Figure 19. Calculated and Experimental Steady-

State Amplitudes vs. Bulk Capacitance from

XTAL1 and XTAL2 to Ground

Steady-State Characteristics

Steady-state analysis is greatly complicated by the factthat we are dealing with large signals and nonlinearcircuit response. The circuit parameters vary with in-stantaneous voltage, and a number of clamping andclipping mechanisms come into play. Analyses thattake all these things into account are too complicated tobe of general use, and analyses that don’t take theminto account are too inaccurate to justify the effort.

There is a steady-state analysis in Appendix B thattakes some of the complications into account and ig-nores others. Figure 19 shows the way the steady-stateamplitudes thus calculated (using typical 8051 parame-ters and a 4.608 MHz crystal) vary with equal bulkcapacitance placed from XTAL1 and XTAL2 toground. Experimental results are shown for compari-son.

The waveform at XTAL1 is a fairly clean sinusoid. Itsnegative peak is normally somewhat below zero, at alevel which is determined mainly by the input protec-tion circuitry at XTAL1.

The input protection circuitry consists of an ohmic re-sistor and an enhancement-mode FET with the gate

and source connected to ground (VSS), as shown inFigure 20 for the 8051, and in Figure 21 for the 8048.Its function is to limit the positive voltage at the gate ofthe input FET to the avalanche voltage of the drainjunction. If the input pin is driven below VSS, the drainand source of the protection FET interchange roles, soits gate is connected to what is now the drain. In thiscondition the device resembles a diode with the anodeconnected to VSS.

There is a parasitic pn junction between the ohmic re-sistor and the substrate. In the ROM parts (8015, 8048,etc.) the substrate is held at approximately b3V by theon-chip back-bias generator. In the EPROM parts(8751, 8748, etc.) the substrate is connected to VSS.

The effect of the input protection circuitry on the oscil-lator is that if the XTAL1 signal goes negative, its nega-tive peak is clamped to bVDS of the protection FET inthe ROM parts, and to about b0.5V in the EPROMparts. These negative voltages on XTAL1 are in thisapplication self-limiting and nondestructive.

The clamping action does, however, raise the DC levelat XTAL1, which in turn tends to reduce the positivepeak at XTAL2. The waveform at XTAL2 resembles asinusoid riding on a DC level, and whose negativepeaks are clipped off at zero.

Since it’s normally the XTAL2 signal that drives theinternal clocking circuitry, the question naturally arisesas to how large this signal must be to reliably do its job.In fact, the XTAL2 signal doesn’t have to meet thesame VIH and VIL specifications that an external driv-er would have to. That’s because as long as the oscilla-tor is working, the on-chip amplifier is driving itselfthrough its own 0-to-1 transition region, which is verynearly the same as the 0-to-1 transition region in theinternal buffer that follows the oscillator. If some pro-cessing variations move the transition level higher orlower, the on-chip amplifier tends to compensate for itby the fact that its own transition level is correspond-ingly higher or lower. (In the 8096, it’s the XTAL1signal that drives the internal clocking circuitry, but thesame concept applies.)

The main concern about the XTAL2 signal amplitudeis an indication of the general health of the oscillator.An amplitude of less than about 2.5V peak-to-peak in-dicates that start-up problems could develop in someunits (with low gain) with some crystals (with high R1).The remedy is to either adjust the values of CX1 and/orCX2 or use a crystal with a lower R1.

The amplitudes at XTAL1 and XTAL2 can be adjustedby changing the ratio of the capacitors from XTAL1and XTAL2 to ground. Increasing the XTAL2 capaci-tance, for example, decreases the amplitude at XTAL2and increases the amplitude at XTAL1 by about thesame amount. Decreasing both caps increases both am-plitudes.

15

Page 20: Crystal Oscillator for Mc

AP-155

Pin Capacitance

Internal pin-to-ground and pin-to-pin capacitances atXTAL1 and XTAL2 will have some effect on the oscil-lator. These capacitances are normally taken to be inthe range of 5 to 10 pF, but they are extremely difficultto evaluate. Any measurement of one such capacitancewill necessarily include effects from the others. One ad-vantage of the positive reactance oscillator is that thepin-to-ground capacitances are paralleled by externalbulk capacitors, so a precise determination of their val-ue is unnecessary. We would suggest that there is littlejustification for more precision than to assign them avalue of 7 pF (XTAL1-to-ground and XTAL1-to-XTAL2). This value is probably not in error by morethan 3 or 4 pF.

The XTAL2-to-ground capacitance is not entirely ‘‘pincapacitance,’’ but more like an ‘‘equivalent output ca-pacitance’’ of some 25 to 30 pF, having to include theeffect of internal phase delays. This value will vary tosome extent with temperature, processing, and frequen-cy.

MCSÉ-51 Oscillator

The on-chip amplifier on the HMOS MCS-51 family isshown in Figure 20. The drain load and feedback ‘‘re-sistors’’ are seen to be field-effect transistors. The drainload FET, RD, is typically equivalent to about 1K to 3K-ohms. As an amplifier, the low frequency voltagegain is normally between b10 and b20, and the out-put resistance is effectively RD.

230659–31

Figure 20. MCSÉ-51 Oscillator Amplifier

The 80151 oscillator is normally used with equal bulkcapacitors placed externally from XTAL1 to groundand from XTAL2 to ground. To determine a reason-able value of capacitance to use in these positions, givena crystal of ceramic resonator of known parameters,one can use the BASIC analysis in Appendix II to gen-erate curves such as in Figures 17 and 18. This proce-dure will define a range of values that will minimizestart-up time. We don’t suggest that smaller values be

used than those which minimize start-up time. Largervalues than those can be used in applications whereincreased frequency stability is desired, at some sacri-fice in start-up time.

Standard Crystal Corp. (Reference 8) studied the use oftheir crystals with the MCS-51 family using skew sam-ple supplied by Intel. They suggest putting 30 pF ca-pacitors from XTAL1 and XTAL2 to ground, if thecrystal is specified as described in Reference 8. Theynoted that in that configuration and with crystals thusspecified, the frequency accuracy was g0.01% and thefrequency stability was g0.005%, and that a frequencyaccuracy of g0.005% could be obtained by substitut-ing a 25 pF fixed cap in parallel with a 5–20 pF trim-mer for one of the 30 pF caps.

MCS-51 skew samples have also been supplied to anumber of ceramic resonator manufacturers for charac-terization with their products. These companies shouldbe contacted for application information on their prod-ucts. In general, however, ceramics tend to want some-what larger values for CX1 and CX2 than quartz crys-tals do. As shown in Figure 18, they start up a lot fasterthat way.

In some application the actual frequency tolerance re-quired is only 1% or so, the user being concerned main-ly that the circuit will oscillate. In that case, CX1 andCX2 can be selected rather freely in the range of 20 to80 pF.

As you can see, ‘‘best’’ values for these components andtheir tolerances are strongly dependent on the applica-tion and its requirements. In any case, their suitabilityshould be verified by environmental testing before thedesign is submitted to production.

MCSÉ-48 Oscillator

The NMOS and HMOS MCS-48 oscillator is shown inFigure 21. It differs from the 8051 in that its inverting

230659–32

Figure 21. MCSÉ-48 Oscillator Amplifier

16

Page 21: Crystal Oscillator for Mc

AP-155

230659–33

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 oscillator.All 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 again,and the sequence repeats. The oscillation frequency isdetermined by the RC time constant and the hysteresisvoltage, UTP-LTP.

The 8048 can oscillate in this mode. It has an internalfeedback resistor. All that’s 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 ownrisk! This mode of operation is not tested, specified,documented, 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 avoided,and 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 CX1 is larger than about 50pF. Therefore, CX1 should be chosen with some care,particularly if the system must operate at lower temper-atures.

One method that has proven effective in all units tob40§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 (eg,8048H) are tested to a much higher voltage than that.The technology trend, of course, is to thinner oxides, asthe devices shrink in size. For an extra margin of safety,the HMOS II chips (eg, 8048AH) have an internal di-ode clamp at XTAL1 to VCC.

In reality, CX1 doesn’t have to be quite so small toavoid relaxation oscillations, if the minimum operatingtemperature is not b40§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 system’s 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 theoscillation 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

Page 22: Crystal Oscillator for Mc

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 frequencies,there 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 theoscillator’s 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-er’s 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-

230659–34A) When VCC Comes Up Fast, Relaxation Oscillations

Start First. But Then the Crystal Takes Over.

230659–35B) Weak Pullup (1 MX or More) on XTAL1

Discourages Relaxation Mode.

230659–36C) No Relaxation Oscillations When VCC Comes Up

More Slowly.

230659–37

230659–38

230659–39

Figure 23. Relaxation Oscillations in the 8048

18

Page 23: Crystal Oscillator for Mc

AP-155

culties using their recommendations, both Intel and theceramic resonator manufacturer want to know about it.It is to their interest, and ours, that such problems beresolved.

230659–40A) Inverter Without Hysteresis: Output Leads Input by 180§.

230659–41B) Inverter With Hysteresis: Output Leads

Input by Less than 180§.

Figure 24. AmplitudeÐDependent Phase

Shift 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 atb20§C and a60§C). The problem here isn’t just one offrequency 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

SOURCE

ORG 0000 H

JMP START

ORG 000B H ;TIMER 0 INTERRUPT:

CPL T1 ; TOGGLE T1

RETI

ORG 0001BH ;TIMER 1 INTERRUPT:

CPL P1.1 ; TOGGLE CRO TRIGGER

DJNZ P2,$ ; DELAY

CPL P1.0 ; TOGGLE VCC CONTROL

RETI

START: MOV TH1,ÝOFAH ;TIMER 1 RELOAD VALUE

MOV TL1,ÝOFAH ;START TL1 AT RELOAD VALUE

MOV TMOD,Ý61H ;TIMER 1 TO COUNTER, AUTO

;RELOAD

;TIMER 0 TO TIMER, 16-BIT

MOV IE,ÝBAH ;ENABLE TIMER INTERRUPTS

;ONLY

MOV TCON,Ý50H ;TURN ON BOTH TIMERS

JMP $ ;IDLE

END

230659–42B) Oscillator Test Circuit (Shown for 8051 Test)

Figure 25. Oscillator Test Circuit and Software

19

Page 24: Crystal Oscillator for Mc

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 function,but 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-tem’s 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 consideration,plus a blocking capacitor (switch the oscilloscope inputto AC), so as to not disturb the DC level at that pin.Alternatively, 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 isn’t operational andin use, the observations are worthless.

230659–43

Figure 26. MOSFET Buffer for Observing

Oscillator 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 oscillatorisn’t running in a spurious resonance or relaxationmode. Switching VCC off and on again repeatedly willhelp reveal a tendency to go into unwanted modes ofoscillation.

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 thatbetween the test jig and the actual application theremay be significant differences in stray capacitances,particularly if the actual application is on a multi-layerboard.

Noise glitches, that aren’t 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 ‘‘quiet’’traces (VCC and ground, for example) will alleviate ca-pacitive coupling to signals that have fast transitiontimes. To minimize inductive coupling, the PCB layoutshould minimize the areas of the loops formed by theoscillator components. These are the loops that shouldbe checked:

XTAL1 through the resonator to XTAL2;XTAL1 through CX1 to the VSS pin;XTAL2 through CX2 to the VSS pin.

It is not unusual to find that the grounded ends of CX1and CX2 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

Page 25: Crystal Oscillator for Mc

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 Intel8031/8051/8751 Microcontrollers, Standard CrystalCorp. Design Data Note Ý2F.

9. Murata Mfg. Co., Ltd., Ceramic Resonator‘‘Ceralock’’ Application Manual.

10. Kyoto Ceramic Co., Ltd., Adaptability Test BetweenIntel 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

Page 26: Crystal Oscillator for Mc
Page 27: Crystal Oscillator for Mc

AP-155

APPENDIX AQUARTZ AND CERAMIC RESONATOR FORMULAS

Based on the equivalent circuit of the crystal, the im-pedance of the crystal is

ZXTAL e

(R1 a j0L1 a 1/j0C1) (1/j0C0)

R1 a j0L1 a 1/j0C1a 1/j0C0

After some algebraic manipulation, this calculation canbe written in the form

ZXTAL e

1

j0(C1 a C0)#

1 b 02L1C1 a j0R1C1

1 b 02L1CT a j0R1CT

where CT is the capacitance of C1 in series with C0:

CT e

C1C0

C1 a C0

The impedance of the crystal in parallel with an exter-nal load capacitance CL is the same expression, butwith C0 a CL substituted for C0:

ZXTAL llCLe

1

j0(C1 a C0 a CL)#

1 b 02L1C1 a j0R1C1

1 b 02L1CÊT a j0R1CÊT

where CÊT is the capacitance of C1 in series with (C0 a

CL):

CÊT e

C1(C0 a CL)

C1 a C0 a CL

The impedance of the crystal in series with the loadcapacitance is

ZXTAL a CL e ZXTAL a

1

j0CL

e

CL a C1 a C0

j0CL (C1 a C0)#

1 b 02L1CÊT a j0R1CÊT1 b 02L1CT a j0R1CT

where CT and CÊT are as defined above.

The phase angles of these impedances are readily ob-tained from the impedance expressions themselves:

iXTAL e arctan0R1 C1

1 b 02L1C1

b arctan0R1 CT

1 b 02L1CT

b

q

2

iXTAL llCLe arctan

0R1 C1

1 b 02L1C1

b arctan0R1 CÊT

1 b 02L1CÊTb

q

2

iXTAL a CLe arctan

0R1CÊT1 b 02L1CÊT

b arctan0R1 CT

1 b 02L1CT

b

q

2

The resonant (‘‘series resonant’’) frequency is the fre-quency at which the phase angle is zero and the imped-ance is low. The antiresonant (‘‘parallel resonant’’) fre-quency is the frequency at which the phase angle is zeroand the impedance is high.

Each of the above i-expressions contains two arctanfunctions. Setting the denominator of the argument ofthe first arctan function to zero gives (approximately)the ‘‘series resonant’’ frequency for that configuration.Setting the denominator of the argument of the secondarctan function to zero gives (approximately) the ‘‘par-allel resonant’’ frequency for that configuration.

For example, the resonant frequency of the crystal isthe frequency at which

1 b 02L1C1 e 0

0s e

1

0L1C1Thus

fs e

1

2q0L1C1or

A-1

Page 28: Crystal Oscillator for Mc

AP-155

It will be noted that the series resonant frequency of the‘‘XTALaCL’’ configuration (crystal in series with CL)is the same as the parallel resonant frequency of the‘’XTALllCL’’ configuration (crystal in parallel withCL). This is the frequency at which

1 b 02L1CÊT e 0

Thus0a e

1

0L1CÊT

orfa e

1

2q0L1CÊ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/C0 b 1

fs# C1

2C0JGiven typical values for C1 and C0, 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 ZXTAL at the oscillation fre-quency. The oscillation frequency is the parallel reso-nant frequency of the ‘‘XTALllCL’’ configuration(which is the same as the series resonant frequency ofthe ‘‘XTALaCL’’ configuration). Substituting this fre-quency into the ZXTAL expression yields, after somealgebraic manipulation,

ESR e

R1 #C0 a CL

CL J2

1 a 02C21 #C0 a CL

CL J2

j R1 #1 a

C0

CLJ2

Drive Level

The power dissipated by the crystal is I21R1, where I1 is

the RMS current in the motional arm of the crystal.This current is given by Vx/lZ1l, where Vx is the RMSvoltage across the crystal, and lZ1l is the magnitude ofthe impedance of the motional arm. At the oscillationfrequency, the motional arm is a positive (inductive)reactance in parallel resonance with (C0 a CL). There-fore lZ1l is approximately equal to the magnitude of thereactance of (C0 a CL):

lZ1l e

1

2qf(C0 a CL)

where f is the oscillation frequency. Then,

P e I21 R1 e # Vx

lZ1l J2R1

e [2qf (C0 a CL) Vx]2 R1

The waveform of the voltage across the crystal(XTAL1 to XTAL2) is approximately sinusoidal. If itspeak value is VCC, then Vx is VCC/02. Therefore,

P e 2R1 [qf (C0 a CL) VCC]2

A-2

Page 29: Crystal Oscillator for Mc

AP-155

APPENDIX BOSCILLATOR ANALYSIS PROGRAM

The program is written in BASIC. BASIC is excruciat-ingly slow, but it has some advantages. For one thing,more people know BASIC than FORTRAN. In addi-tion, a BASIC program is easy to develop, modify, and‘‘fiddle 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 constant’’discussed 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 SchmittTrigger, 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 amplitudes.The 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. It’s an exer-cise in curve-fitting. A user may find a different type ofcurve 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 ofimportant items, such as high-frequency effects in theon-chip circuitry. These effects are difficult to predict,and are no doubt dependent on temperature, frequency,and device sample. However, they can be simulated to areasonable degree by adding an ‘‘output capacitance’’ ofabout 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, C1,and 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 capacitance,plus 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 externallyconnected 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 KXOutput Resistance e 2 KX

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

Page 30: Crystal Oscillator for Mc

AP-155

230659–44

B-2

Page 31: Crystal Oscillator for Mc

AP-155

230659–45

B-3

Page 32: Crystal Oscillator for Mc

AP-155

230659–46

B-4

Page 33: Crystal Oscillator for Mc

AP-155

230659–47

B-5

Page 34: Crystal Oscillator for Mc

AP-155

230659–48

B-6

Page 35: Crystal Oscillator for Mc

AP-155

230659–49

B-7

Page 36: Crystal Oscillator for Mc

AP-155

230659–50

B-8

Page 37: Crystal Oscillator for Mc

INTEL, SUPPLY FILLER

Page 38: Crystal Oscillator for Mc

INTEL, SUPPLY FILLER

Page 39: Crystal Oscillator for Mc

INTEL, SUPPLY FILLER

Page 40: Crystal Oscillator for Mc

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