Está en la página 1de 40

APPLICATION

NOTE
AP-155
June 1983
Oscillators
for Microcontrollers
TOM WILLIAMSON
MICROCONTROLLFR
TFCHNICAL MARKFTINO
Order Number 230659-001
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 in
Intels Terms and Conditions of Sale for such products
Intel retains the right to make changes to these specifications at any time without notice Microcomputer
Products 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 and
iCOMP trademarks has been issued to Intel Corporation
Contact your local Intel sales office or your distributor to obtain the latest specifications before placing your
product order
Copies of documents which have an ordering number and are referenced in this document or other Intel
literature may be obtained from
Intel Corporation
PO Box 7641
Mt Prospect IL 60056-7641
or call 1-800-879-4683
COPYRIGHT INTEL CORPORATION 1995
OSCILLATORS FOR
MICROCONTROLLERS
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 DESIGN
CONSIDERATIONS 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 Overtone
Operation 11
Series vs Parallel Operation 11
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 CERAMIC
RESONATOR FORMULAS A-1
APPENDIX B OSCILLATOR ANALYSIS
PROGRAM B-1
AP-155
INTRODUCTION
InteIs miciocontioIIei famiIies (MCS-48, MCS-51,
and iACX-96) contain a ciicuit that is commonIy ie-
feiied to as the on-chip osciIIatoi. The on-chip cii-
cuitiy is not itseIf an osciIIatoi, of couise, but an ampIi-
fiei that is suitabIe foi use as the ampIifiei pait of a
feedback osciIIatoi. The data sheets and MiciocontoIIei
Handbook show how the on-chip ampIifiei and seveiaI
off-chip components can be used to design a woiking
osciIIatoi. With piopei seIection of off-chip compo-
nents, these osciIIatoi ciicuits wiII peifoim bettei than
aImost any othei type of cIock osciIIatoi, and by aImost
any ciiteiion of exceIIence. The suggested ciicuits aie
simpIe, economicaI, stabIe, and ieIiabIe.
We offei assistance to oui customeis in seIecting suit-
abIe off-chip components to woik with the on-chip os-
ciIIatoi ciicuitiy. It shouId be noted, howevei, that In-
teI cannot assume the iesponsibiIity of wiiting specifi-
cations foi the off-chip components of the compIete os-
ciIIatoi ciicuit, noi of guaianteeing the peifoimance of
the finished design in pioduction, anymoie than a tian-
sistoi manufactuiei, whose data sheets show a numbei
of suggested ampIifiei ciicuits, can assume iesponsibiIi-
ty foi the opeiation, in pioduction, of any of them.
We aie often asked why we dont pubIish a Iist of ie-
quiied ciystaI oi ceiamic iesonatoi specifications, and
iecommend vaIues foi the othei off-chip components.
This has been done in the past, but sometimes with
consequences that weie not intended.
Suppose we suggest a maximum ciystaI iesistance of 30
ohms foi some given fiequency. Then youi ciystaI sup-
pIiei teIIs you the 30-ohm ciystaIs aie going to cost
twice as much as 50-ohm ciystaIs. Feaiing that InteI
wiII not guaiantee opeiation with 50-ohm cisytaIs,
you oidei the expensive ones. In fact, InteI guaiantees
onIy what is embodied within an InteI pioduct. Besides,
theie is no ieason why 50-ohm ciystaIs couIdnt be
used, if the othei off-chip components aie suitabIy ad-
justed.
ShouId we iecommend vaIues foi the othei off-chip
components! ShouId we do it foi 50-ohm ciystaIs oi 30-
ohm ciystaIs! With iespect to what shouId we optimize
theii seIection! ShouId we minimize stait-up time oi
maximize fiequency stabiIity! In many appIications,
neithei stait-up time noi fiequency stabiIity aie paitic-
uIaiIy ciiticaI, and oui iecommendations aie onIy ie-
stiicting youi system to unnecessaiy toIeiances. It aII
depends on the appIication.
AIthough we wiII neithei specify noi iecommend
specific off-chip components, we do offei assistance in
these tasks. InteI appIication engineeis aie avaiIabIe to
piovide whatevei technicaI assistance may be needed oi
desiied by oui customeis in designing with InteI piod-
ucts.
This AppIication Note is intended to piovide such as-
sistance in the design of osciIIatoi ciicuits foi micio-
contioIIei systems. Its puipose is to desciibe in a piacti-
caI mannei how osciIIatois woik, how ciystaIs and ce-
iamic iesonatois woik (and thus how to spec them),
and what the on-chip ampIifiei Iooks Iike eIectionicaIIy
and what its opeiating chaiacteiistics aie. A BASIC
piogiam is piovided in Appendix II to assist the de-
signei in deteimining the effects of changing individuaI
paiameteis. Suggestions aie piovided foi estabIishing a
pie-pioduction test piogiam.
FEEDBACK OSCILLATORS
Loop Gain
Figuie 1 shows an ampIifiei whose output Iine goes into
some passive netwoik. If the input signaI to the ampIifi-
ei is v
1
, then the output signaI fiom the ampIifei is v
2
e
Av
1
and the output signaI fiom the passive netwoik
is v
3
e
bv
2
e
bAv
1
. Thus bA is the oveiaII gain
fiom teiminaI 1 to teiminaI 3.
2306591
Figure 1 Factors in Loop Gain
Now connect teiminaI 1 to teiminaI 3, so that the sig-
naI path foims a Ioop: 1 to 2 to 3, which is aIso 1. Now
we have a feedback Ioop, and the gain factoi bA is
caIIed the loop gain
Oain factois aie compIex numbeis. That means they
have a magnitude and a phase angIe, both of which
vaiy with fiequency. When wiiting a compIex numbei,
one must specify both quantities, magnitude and angIe.
A numbei whose magnitude is 3, and whose angIe is 45
degiees is commonIy wiitten this way: 3K45. The num-
bei 1 is, in compIex numbei notation, 1K0, whiIe
b
1 is
1K180.
By cIosing the feedback Ioop in Figuie 1, we foice the
equaIity
v
1
e bAv
1
This equation has two soIutions:
1) v
1
e 0
2) bA e 1K0
1
AP-155
In a given ciicuit, eithei oi both of the soIutions may be
in effect. In the fiist soIution the ciicuit is quiescent (no
output signaI). If youie tiying to make an osciIIatoi, a
no-signaI condition is unacceptabIe. Theie aie ways to
guaiantee that the second soIution is the one that wiII
be in effect, and that the quiescent condition wiII be
excIuded.
How Feedback Oscillators Work
A feedback osciIIatoi ampIifies its own noise and feeds
it back to itseIf in exactIy the iight phase, at the osciIIa-
tion fiequency, to buiId up and ieinfoice the desiied
osciIIations. Its abiIity to do that depends on its Ioop
gain. Fiist, osciIIations can occui onIy at the fiequency
foi which the Ioop gain has a phase angIe of 0 degiees.
Second buiId-up of osciIIations wiII occui onIy if the
Ioop gain exceeds 1 at the fiequency. BuiId-up contin-
ues untiI nonIineaiities in the ciicuit ieduce the aveiage
vaIue of the Ioop gain to exactIy 1.
Stait-up chaiacteiistics depend on the smaII-signaI
piopeities of the ciicuit, specificaIIy, the smaII-signaI
Ioop gain. Steady-state chaiacteiistics of the osciIIatoi
depend on the Iaige-signaI piopeities of the ciicuit,
such as the tiansfei cuive (output voItage vs. input
voItage) of the ampIifiei, and the cIamping effect of the
input piotection devices. These things wiII be discussed
moie fuIIy fuithei on. Fiist we wiII Iook at the basic
opeiation of the paiticuIai osciIIatoi ciicuit, caIIed the
positive ieactance osciIIatoi.
The Positive Reactance Oscillator
Figuie 2 shows the configuiation of the positive ieac-
tance osciIIatoi. The inveiting ampIifiei, woiking into
the impedance of the feedback netwoik, pioduces an
output signaI that is nominaIIy 180 degiees out of phase
with its input. The feedback netwoik must piovide an
additionaI 180 degiees phase shift, such that the oveiaII
Ioop gain has zeio (oi 360) degiees phase shift at the
osciIIation fiequency.
2306592
Figure 2 Positive Reactance Oscillator
In oidei foi the Ioop gain to have zeio phase angIe it is
necessaiy that the feedback eIement Z
f
have a positive
ieactance. That is, it must be inductive. Then, the fie-
quency at which the phase angIe is zeio is appioximate-
Iy the fiequency at which
X
f
e
a1
0C
wheie X
f
is the ieactance of Z
f
(the totaI Z
f
being R
f
a
jX
f
, and C is the seiies combination of C
X1
and C
X2
.
C e
C
X1
C
X2
C
X1
a C
X2
In othei woids, Z
f
and C foim a paiaIIeI iesonant cii-
cuit.
If Z
f
is an inductoi, then X
f
e
0L, and the fiequency
at which the Ioop gain has zeio phase is the fiequency
at which
0L e
1
0C
oi
0 e
1
0LC
NoimaIIy, Z
f
is not an inductoi, but it must stiII have a
positive ieactance in oidei foi the ciicuit to osciIIate.
Theie aie some piezoeIectiic devices on the maiket that
show a positive ieactance, and piovide a moie stabIe
osciIIation fiequency than an inductoi wiII. Quaitz
ciystaIs can be used wheie the osciIIation fiequency is
ciiticaI, and Iowei cost ceiamic iesonatois can be used
wheie the fiequency is Iess ciiticaI.
When the feedback eIement is a piezoeIectiic device,
this ciicuit configuiation is caIIed a Pieice osciIIatoi.
The advantage of piezoeIectiic iesonatois Iies in theii
piopeity of pioviding a wide iange of positive ieactance
vaIues ovei a veiy naiiow iange of fiequencies. The
ieactance wiII equaI 1/0C at some fiequency within
this iange, so the osciIIation fiequency wiII be within
the same iange. TypicaIIy, the width of this iange is
2
AP-155
onIy 0.3% of the nominaI fiequency of a quaitz ciystaI,
and about 3% of the nominaI fiequency of a ceiamic
iesonatoi. With ieIativeIy IittIe design effoit, fiequency
accuiacies of 0.03% oi bettei can be obtained with
quaitz ciystaIs, and 0.3% oi bettei with ceiamic ieso-
natois.
QUARTZ CRYSTALS
The ciystaI iesonatoi is a thin sIice of quaitz sand-
wiched between two eIectiodes. FIectiicaIIy, the device
Iooks pietty much Iike a 5 oi 6 pF capacitoi, except
that ovei ceitain ianges of fiequencies the ciystaI has a
positive (i.e., inductive) ieactance.
The ianges of positive ieactance oiiginate in the piezo-
eIectiic piopeity of quaitz: Squeezing the ciystaI genei-
ates an inteinaI F-fieId. The effect is ieveisibIe: AppIy-
ing an AC F-fieId causes the ciystaI to vibiate. At cei-
tain vibiationaI fiequencies theie is a mechanicaI ieso-
nance. As the F-fieId fiequency appioaches a fiequency
of mechanicaI iesonance, the measuied ieactance of the
ciystaI becomes positive, as shown in Figuie 3.
2306593
Figure 3 Crystal Reactance vs Frequency
TypicaIIy theie aie seveiaI ianges of fiequencies wheie-
in the ieactance of the ciystaI is positive. Fach iange
coiiesponds to a diffeient mode of vibiation in the ciys-
taI. The main iesonsances aie the so-caIIed fundamen-
taI iesponse and the thiid and fifth oveitone iesponses.
The oveitone iesponses shouIdnt be confused with the
haimonics of the fundamentaI. Theyie not haimonics,
but diffeient vibiationaI modes. Theyie not in geneiaI
at exact integei muItipIes of the fundamentaI fiequency.
Theie wiII aIso be spuiious iesponses, occuiiing typi-
caIIy a few hundied KHz above each main iesponse.
To assuie that an osciIIatoi staits in the desiied mode
on powei-up, something must be done to suppiess the
Ioop gain in the undesiied fiequency ianges. The ciys-
taI itseIf piovides some piotection against unwanted
modes of osciIIation: too much iesistance in that mode,
foi exampIe. AdditionaIIy, junction capacitances in the
ampIifying devices tend to ieduce the gain at highei
fiequencies, and thus may disciiminate against unwant-
ed modes. In some cases a ciicuit fix is necessaiy, such
as inseiting a tiap, a phase shiftei, oi feiiite beads to
kiII osciIIations in unwanted modes.
Crystal Parameters
Equivalent Circuit
Figuie 4 shows an equivaIent ciicuit that is used to
iepiesent the ciystaI foi ciicuit anaIysis.
The R
1
-L
1
-C
1
bianch is caIIed the motivationaI aim of
the ciystaI. The vaIues of these paiameteis deiive fiom
the mechanicaI piopeities of the ciystaI and aie con-
stant foi a given mode of vibiation. TypicaI vaIues foi
vaiious nominaI fiequencies aie shown in TabIe 1.
2306594
Figure 4 Quartz Crystal Symbol and
Equivalent Circuit
C
0
is caIIed the shunt capacitance of the ciystaI. This is
the capacitance of the ciystaIs eIectiodes and the me-
chanicaI hoIdei. If one weie to measuie the ieactance of
the ciystaI at a fieuqency fai iemoved fiom a iesonance
fiequency, it is the ieactance of this capacitance that
wouId be measuied. Its noimaIIy 3 to 7 pF.
Table 1 Typical Crystal Parameters
Frequency R
1
L
1
C
1
C
0
MHz ohms mH pF pF
2 100 520 0012 4
4608 36 117 0010 29
1125 19 838 0024 54
3
AP-155
The seiies iesonant fiequency of the ciystaI is the fie-
quency at which L
1
and C
1
aie in iesonance. This fie-
quency is given by
f
s
e
1
2q0L
1
C
1
At this fiequency the impedance of the ciystaI is R
1
in
paiaIIeI with the ieactance of C
0
. Foi most puiposes,
this impedance is taken to be just R
1
, since the ieac-
tance of C
0
is so much Iaigei than R
1
.
Load Capacitance
A ciystaI osciIIatoi ciicuit such as the one shown in
Figuie 2 (iediawn in Figuie 5) opeiates at the fiequen-
cy foi which the ciystaI is antiiesonant (ie, paiaIIeI-ies-
onant) with the totaI capacitance acioss the ciystaI tei-
minaIs exteinaI to the ciystaI. This totaI capacitance
exteinaI to the ciystaI is caIIed the Ioad capacitance.
As shown in Figuie 5, the Ioad capacitance is given by
C
L
e
C
X1
C
X2
C
X1
a C
X2
a C
stray
The ciystaI manufactuiei needs to know the vaIue of
C
L
in oidei to adjust the ciystaI to the specified fie-
quency.
2306596
Figure 5 Load Capacitance
The adjustment invoIves putting the ciystaI in series
with the specified C
L
, and then tiimming the ciystaI
to obtain iesonance of the seiies combination of the
ciystaI and C
L
at the specified fiequency. Because of
the high Q of the ciystaI, the iesonant fiequency of the
seiies combination of the ciystaI and C
L
is the same as
the antiiesonant fiequency of the parallel combination
of the ciystaI and C
L
. This fiequency is given by
f
a
e
1
2q0L
1
C
1
(C
L
a C
0
)(C
1
a C
L
a C
0
)
These fiequency foimuIas aie deiived (in Appendix A)
fiom the equivaIent ciicuit of the ciystaI, using the as-
sumptions that the Q of the ciystaI is extiemeIy high,
and that the ciicuit exteinaI to the ciystaI has no effect
on the fiequency othei than to piovide the Ioad capaci-
tance C
L
. The Iattei assumption is not pieciseIy tiue,
but it is cIose enough foi piesent puiposes.
Series vs Parallel Crystals
Theie is no such thing as a seiies cut ciystaI as op-
posed to a paiaIIeI cut ciystaI. Theie aie diffeient
cuts of ciystaI, having to do with the paiameteis of its
motionaI aim in vaiious fiequency ianges, but theie is
no speciaI cut foi seiies oi paiaIIeI opeiation.
An osciIIatoi is seiies iesonant if the osciIIation fie-
quency is f
s
of the ciystaI. To opeiate the ciystaI at f
s
,
the ampIifiei has to be noninveiting. When buying a
ciystaI foi such an osciIIatoi, one does not specify a
Ioad capacitance. Rathei, one specifies the Ioading con-
dition as seiies.
If a seiies ciystaI is put into an osciIIatoi that has an
inveiting ampIifiei, it wiII osciIIate in paiaIIeI iesonance
with the Ioad capacitance piesented to the ciystaI by
the osciIIatoi ciicuit, at a fiequency sIightIy above f
s
. In
fact, at appioximateIy
f
a
e f
s

1 a
C
1
2(C
L
a C
0
) J
This fiequency wouId typicaIIy be about 0.02% above
f
s
.
Equivalent Series Resistance
The seiies iesistance often Iisted on quaitz ciystaI
data sheets is the ieaI pait of the ciystaI impedance at
the ciystaIs caIibiation fiequency. This wiII be R1 if
the caIibiation fiequency is the seiies iesonant fiequen-
cy of the ciystaI. If the ciystaI is caIibiated foi paiaIIeI
iesonance with a Ioad capacitance CL, the equivaIent
seiies iesistance wiII be
ESR e R
1

1 a
C
0
C
LJ
2
The ciystaI manufactuiei measuies this iesistance at
the caIibiation fiequency duiing the same opeiation in
which the ciystaI is adjusted to the caIibiation fiequen-
cy.
4
AP-155
Frequency Tolerance
Fiequency toIeiance as discussed heie is not a iequiie-
ment on the ciystaI, but on the compIete osciIIatoi.
Theie aie two types of fiequency toIeiances on osciIIa-
tois: fiequency acccuracy and fiequency stability Fie-
quency accuiacy iefeis to the osciIIatois abiIity to iun
at an exact specified fiequency. Fiequency stabiIity ie-
feis to the constancy of the osciIIation fiequency.
Fiequency accuiacy iequiies mainIy that the osciIIatoi
ciicuit piesent to the ciystaI the same Ioad capacitance
that it was adjusted foi. Fiequency stabiIity iequiies
mainIy that the Ioad capacitance be constant.
In most digitaI appIications the accuiacy and stabiIity
iequiiements on the osciIIatoi aie so wide that it makes
veiy IittIe diffeience what Ioad capacitance the ciystaI
was adjusted to, oi what Ioad capacitance the ciicuit
actuaIIy piesents to the ciystaI. Foi exampIe, if a ciys-
taI was caIibiated to a Ioad capacitance of 25 pF, and is
used in a ciicuit whose actuaI Ioad capacitance is 50 pF,
the fiequency eiioi on that account wouId be Iess than
0.01%.
In a positive ieactance osciIIatoi, the ciystaI onIy needs
to be in the intended iesponse mode foi the osciIIatoi to
satisfy a 0.5% oi bettei fiequency toIeiance. Thats be-
cause foi any Ioad capacitance the osciIIation fiequency
is ceitain to be between the ciystaIs iesonant and anti-
iesonant fiequencies.
Phase shifts that take pIace within the ampIifiei pait of
the osciIIatoi wiII aIso affect fiequency accuiacy and
stabiIity. These phase shifts can noimaIIy be modeIed as
an output capacitance that, in the positive ieactance
osciIIatoi, paiaIIeIs C
X2
. The piedictabiIity and con-
stancy of this output capacitance ovei tempeiatuie and
device sampIe wiII be the Iimiting factoi in deteimining
the toIeiances that the ciicuit is capabIe of hoIding.
Drive Level
Diive IeveI iefeis to the powei dissipation in the ciys-
taI. Theie aie two ieasons foi specifying it. One is that
the paiameteis in the equivaIent ciicuit aie somewhat
dependent on the diive IeveI at which the ciystaI is
caIibiated. The othei is that if the appIication ciicuit
exceeds the test diive IeveI by too much, the ciystaI
may be damaged. Note that the teims test diive IeveI
and iated diive IeveI both iefei to the diive IeveI at
which the ciystaI is caIibiated. NoimaIIy, in a micio-
contioIIei system, neithei the fiequency toIeiances noi
the powei IeveIs justify much concein foi this specifica-
tion. Some ciystaI manufactuieis dont even iequiie it
foi miciopiocessoi ciystaIs.
In a positive ieactance osciIIatoi, if one assumes the
peak voItage acioss the ciystaI to be something in the
neighboihood of V
CC
, the powei dissipation can be ap-
pioximated as
P e 2R
1
qf (C
L
a C
0
) V
CC

2
This foimuIa is deiived in Appendix A. In a 5V system,
P iaieIy evaIuates to moie than a miIIiwatt. CiystaIs
with a standaid 1 oi 2 mW diive IeveI iating can be
used in most digitaI systems.
2306597
Figure 6 Ceramic Resonator Impedance vs
Frequency (Test Data Supplied by NTK
Technical Ceramics)
CERAMIC RESONATORS
Ceiamic iesonatois opeiate on the same basic piinci-
pIes as a quaitz cisytaI. Like quaitz cisytaIs, they aie
piezoeIectiic, have a ieactance veisus fiequency cuive
simiIai to a ciystaIs, and an equivaIent ciicuit that
Iooks just Iike a ciystaIs (with diffeient paiametei vaI-
ues, howevei).
The fiequency toIeiance of a ceiamic iesonatoi is about
two oideis of magnitude widei than a ciystaIs, but the
ceiamic is somewhat cheapei than a ciystaI. It may be
noted foi compaiison that quaitz ciystaIs with ieIaxed
toIeiances cost about twice as much as ceiamic iesona-
tois. Foi puiposes of cIocking a miciocontioIIei, the
fiequency toIeiance is often ieIativeIy nonciiticaI, and
the economic consideiation becomes the dominant fac-
toi.
Figuie 6 shows a giaph of impedance magnitude veisus
fiequency foi a 3.58 MHz ceiamic iesonatoi. (Note
that Figuie 6 is a giaph of
l
Z
fl
veisus fiequency, wheie
5
AP-155
as Figuie 3 is a giaph of X
f
veisus fiequency.) A num-
bei of spuiious iesponses aie appaient in Figuie 6. The
manufactuieis state that spuiious iesponses aie moie
pievaIent in the Iowei fiequency iesonatois (kHz
iange) than in the highei fiequency units (MHz iange).
Foi oui puiposes onIy the MHz iange ceiamics need to
be consideied.
2306598
Figure 7 Ceramic Resonator Symbol and
Equivalent Circuit
Figuie 7 shows the symboI and equivaIent ciicuit foi
the ceiamic iesonatoi, both of which aie the same as
foi the ciystaI. The paiameteis have diffeient vaIues,
howevei, as Iisted in TabIe 2.
Table 2 Typical Ceramic Parameters
Frequency R
1
L
1
C
1
C
0
MHz ohms mH pF pF
358 7 0113 196 140
60 8 0094 83 60
80 7 0092 46 40
110 10 0057 39 30
Note that the motionaI aim of the ceiamic iesonatoi
tends to have Iess iesistance than the quaitz ciystaI and
aIso a vastIy ieduced L
1
/C
1
iatio. This iesuIts in the
motionaI aim having a Q (given by (1/R
1
) 0L
1
/C
1
) that
is typicaIIy two oideis of magnitude Iowei than that of
a quaitz ciystaI. The Iowei Q makes foi a fastei staitup
of the osciIaItoi and foi a Iess cIoseIy contioIIed fie-
quency (meaning that ciicuitiy exteinaI to the iesona-
toi wiII have moie infIuence on the fiequency than with
a quaitz ciystaI).
Anothei majoi diffeience is that the shunt capacitance
of the ceiamic iesonatoi is an oidei of magnitude high-
ei than C
0
of the quaitz ciystaI and moie dependent on
the fiequency of the iesonatoi.
The impIications of these diffeiences aie not aII obvi-
ous, but some wiII be indicated in the section on OsciI-
Iatoi CaIcuIations.
Specifications for Ceramic Resonators
Ceiamic iesonatois aie easiei to specify than quaitz
ciystaIs. AII the vendoi wants to know is the desiied
fiequency and the chip you want it to woik with.
TheyII suppIy the iesonatois, a ciicuit diagiam show-
ing the positions and vaIues of othei exteinaI compo-
nents that may be iequiied and a guaiantee that the
ciicuit wiII woik piopeiIy at the specified fiequency.
OSCILLATOR DESIGN
CONSIDERATIONS
Designeis of miciocontioIIei systems have a numbei of
options to choose fiom foi cIocking the system. The
main decision is whethei to use the on-chip osciIIatoi
oi an exteinaI osciIIatoi. If the choice is to use the on-
chip osciIIatoi, what kinds of exteinaI components aie
needed to make it opeiate as adveitised! If the choice is
to use an exteinaI osciIIatoi, what type of osciIIatoi
shouId it be!
The decisions have to be based on both economic and
technicaI iequiiements. In this section weII discuss
some of the factois that shouId be consideied.
2306599
Figure 8 Using the On-Chip Oscillator
On-Chip Oscillators
In most cases, the on-chip ampIifiei with the appiopii-
ate exteinaI components piovides the most economicaI
soIution to the cIocking piobIem. Fxceptions may aiise
in seveie enviionments when fiequency toIeiances aie
tightei than about 0.01%.
The exteinaI components that need to be added aie a
positive ieactance (noimaIIy a ciystaI oi ceiamic ieso-
natoi) and the two capacitois C
X1
and C
X2
, as shown
in Figuie 8.
Crystal Specifications
Specifications foi an appiopiiate ciystaI aie not veiy
ciiticaI, unIess the fiequency is. Any fundamentaI-mode
ciystaI of medium oi bettei quaIity can be used.
6
AP-155
We aie often asked what maximum ciystaI iesistance
shouId be specified. The best answei to this question is
the Iowei the bettei, but use whats avaiIabIe. The ciys-
taI iesistance wiII have some effect on stait-up time and
steady-state ampIitude, but not so much that it cant be
compensated foi by appiopiiate seIection of the capaci-
tances C
X1
and C
X2
.
SimiIai questions aie asked about specifications of Ioad
capacitance and shunt capacitance. The best advice we
can give is to undeistand what these paiameteis mean
and how they affect the opeiation of the ciicuit (that
being the puipose of this AppIication Note), and then
decide foi youiseIf if such specifications aie meaningfuI
in youi appIication oi not. NoimaIIy, theyie not, un-
Iess youi fiequency toIeiances aie tightei than about
0.1%.
Pait of the piobIem is that ciystaI manufactuieis aie
accustomed to taIking ppm toIeiances with iadio en-
gineeis and simpIy wont take youi oidei untiI youve
fiIIed out theii Iist of specifications. It wiII heIp if you
define youi actuaI fiequency toIeiance iequiiements,
both foi youiseIf and to the ciystaI manufactuiei.
Dont pay foi 0.003% ciystaIs if youi actuaI fiequency
toIeiance is 1%.
Oscillation Frequency
The osciIIation fiequency is deteimined 99.5% by the
ciystaI and up to about 0.5% by the ciicuit exteinaI to
the ciystaI. The on-chip ampIifiei has IittIe effect on the
fiequency, which is as it shouId be, since the ampIifiei
paiameteis aie tempeiatuie and piocess dependent.
The infIuence of the on-chip ampIifiei on the fiequency
is by means of its input and output (pin-to-giound) ca-
pacitances, which paiaIIeI C
X1
and C
X2
, and the
XTAL1-to-XTAL2 (pin-to-pin) capacitance, which
paiaIIeIs the ciystaI. The input and pin-to-pin capaci-
tances aie about 7 pF each. InteinaI phase deviations
fiom the nominaI 180 can be modeIed as an output
capacitance of 25 to 30 pF. These deviations fiom the
ideaI have Iess effect in the positive ieactance osciIIatoi
(with the inveiting ampIifei) than in a compaiabIe se-
iies iesonant osciIIatoi (with the noninveiting ampIifi-
ei) foi two ieasons: fiist, the effect of the output capaci-
tance is Iessened, if not swamped, by the off-chip capac-
itoi: secondIy, the positive ieactance osciIIatoi is Iess
sensitive, fiequency-wise, to such phase eiiois.
Selection of C
X1
and C
X2
OptimaI vaIues foi the capacitois C
X1
and C
X2
depend
on whethei a quaitz ciystaI oi ceiamic iesona-
toi is being used, and aIso on appIication-specific ie-
quiiements on stait-up time and fiequency toIeiance.
Stait-up time is sometimes moie ciiticaI in miciocon-
tioIIei systems than fiequency stabiIity, because of vaii-
ous ieset and initiaIization iequiiements.
Less commonIy, accuiacy of the osciIIatoi fiequency is
aIso ciiticaI, foi exampIe, when the osciIIatoi is being
used as a time base. As a geneiaI iuIe, fast stait-up and
stabIe fiequency tend to puII the osciIIatoi design in
opposite diiections.
Consideiations of both stait-up time and fiequency sta-
biIity ovei tempeiatuie suggest that C
X1
and C
X2
shouId be about equaI and at Ieast 20 pF. (But they
dont have to be eithei.) Incieasing the vaIue of these
capacitances above some 40 oi 50 pF impioves fiequen-
cy stabiIity. It aIso tends to inciease the stait-up time.
Theie is a maximum vaIue (seveiaI hundied pF, de-
pending on the vaIue of R
1
of the quaitz oi ceiamic
iesonatoi) above which the osciIIatoi wont stait up at
aII.
If the on-chip ampIifiei is a simpIe inveitei, such as in
the 8051, the usei can seIect vaIues foi C
X1
and C
X2
between some 20 and 100 pF, depending on whethei
stait-up time oi fiequency stabiIity is the moie ciiticaI
paiametei in a specific appIication. If the on-chip am-
pIifiei is a Schmitt Tiiggei, such as in the 8048, smaIIei
vaIues of C
X1
must be used (5 to 30 pF), in oidei to
pievent the osciIIatoi fiom iunning in a ieIaxation
mode.
Latei sections in this AppIication Note wiII discuss the
effects of vaiying C
X1
and C
X2
(as weII as othei paiam-
eteis), and wiII have moie to say on theii seIection.
Placement of Components
Noise gIitches aiiiving at XTAL1 oi XTAL2 pins at
the wiong time can cause a miscount in the inteinaI
cIock-geneiating ciicuitiy. These kinds of gIitches can
be pioduced thiough capacitive coupIing between the
osciIIatoi components and PCB tiaces caiiying digitaI
signaIs with fast iise and faII times. Foi this ieason, the
osciIIatoi components shouId be mounted cIose to the
chip and have shoit, diiect tiaces to the XTAL1,
XTAL2, and VSS pins.
Clocking Other Chips
Theie aie times when it wouId be desiiabIe to use the
on-chip osciIIatoi to cIock othei chips in the system.
7
AP-155
23065910
A) DRIVING FROM XTAL2
23065911
B) DRIVING FROM XTAL1
Figure 9 Using the On-Chip Oscillator
to Drive Other Chips
This can be done if an appiopiiate buffei is used. A
TTL buffei puts too much Ioad on the on-chip ampIifi-
ei foi ieIiabIe stait-up. A CMOS buffei (such as the
74HC04) can be used, if its fast enough and if its VIH
and VIL specs aie compatibIe with the avaiIabIe signaI
ampIitudes. Ciicuits such as shown in Figuie 9 might
aIso be consideied foi these types of appIications.
CIock-ieIated signaIs aie avaiIabIe at the TO pin in the
MCS-48 pioducts, at ALF in the MCS-48 and MCS-51
Iines, and the iACX-96 contioIIeis piovide a CLKOUT
signaI.
External Oscillators
When technicaI iequiiements dictate the use of an ex-
teinaI osciIIatoi, the exteinaI diive iequiiements foi the
miciocontioIIei, as pubIished in the data sheet, must be
caiefuIIy noted. The Iogic IeveIs aie not in geneiaI TTL-
compatibIe. And each contioIIei has its idiosynciacies
in this iegaid. The 8048, foi exampIe, iequiies that
both XTAL1 and XTAL2 be diiven. The 8051 can be
diiven that way, but the data sheet suggest the simpIei
method of giounding XTAL1 and diiving XTAL2. Foi
this method, the diiving souice must be capabIe of sink-
ing some cuiient when XTAL2 is being diiven Iow.
Foi the exteinaI osciIIatoi itseIf, theie aie basicaIIy two
choices: ieady-made and home-giown.
8
AP-155
TTL Crystal Clock Oscillator
The HS-100, HS-200, & HS-500 aII-metaI package se-
iies of osciIIatois aie TTL compatibIe & fit a DIP
Iayout. Standaid eIectiicaI specifications aie shown
beIow. Vaiiations aie avaiIabIe foi speciaI appIica-
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% OveiaII 0C70C
Hermetically Sealed Package
Mass spectiometei Ieak iate max.
1
c
10
b8
atmos. cc/sec. of heIium
Output Waveform
23065912
INPUT
HS-100 HS-200 HS-500
35 MHz20 MHz 20
a
MHz30 MHz 225 KHz40 MHz 25 MHz60 MHz
Supply Voltage
(V
CC
) 5V g10% 5V g10% 5V g10% 5V g10%
Supply Current
(I
CC
) max 30 mA 40 mA 85 mA 50 mA
OUTPUT
HS-100 HS-200 HS-500
35 MHz20 MHz 20
a
MHz30 MHz 225 KHz40 MHz 25 MHz60 MHz
V
OH
(Logic 1)
a
24V min
1 a
27V min
2 a
24V min
1 a
27V min
2
V
OL
(Logic 0)
a
04V max
3 a
05V max
4 a
04V max
3 a
05V max
4
Symmetry 6040%
5
6040%
5
5545%
5
6040%
5
T
R
T
F
(Rise
Fall Time)
k
10 ns
6 k
5 ns
6 k
15 ns
6 k
5 ns
6
Output Short
Circuit 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
CONDITIONS
1
I
0
source
e b
400 mA max
4
1
0
sink
e
2000 mA max
7
16 mA per load
2
I
0
source
e b
10 mA max
5
V
O
e
14V
8
20 mA per load
3
I
0
sink
e
160 mA max
6
(04V to 24V)
Figure 10 Pre-Packaged Oscillator Data
Reprinted with the permission of Midland-Ross Corporation 1982
9
AP-155
Piepackaged osciIIatois aie avaiIabIe fiom most ciystaI
manufactuieis, and have the advantage that the system
designei can tieat the osciIIatoi as a bIack box whose
peifoimance is guaianteed by peopIe who caiiy many
yeais of expeiience in designing and buiIding osciIIa-
tois. Figuie 10 shows a typicaI data sheet foi some
piepackaged osciIIatois. OsciIIatois aie aIso avaiIabIe
with compIementaiy outputs.
If the osciIIatoi is to diive the miciocontioIIei diiectIy,
one wiII want to make a caiefuI compaiison between
the exteinaI diive iequiiements in the miciocontioIIei
data sheet and the osciIIatois output Iogic IeveIs and
test conditions.
If osciIIatoi stabiIity is Iess ciiticaI than cost, the usei
may piefei to go with an in-house design. Not without
some piecautions, howevei.
Its easy to design osciIIatois that woik. AImost aII of
them do woik, even if the designei isnt too cIeai on
why. The key point heie is that almost aII of them
woik. The piobIems begin when the system goes into
pioduction, and maiginaI units commence maIfunc-
tioning in the fieId. Most digitaI designeis, aftei aII, aie
not veiy adept at designing osciIIatois for production
OsciIIatoi design is somewhat of a bIack ait, with the
quaIity of the finished pioduct being very dependent on
the designeis expeiience and intuition. Foi that ieason
the most impoitant consideiation in any design is to
have an adequate piepioduction test piogiam. Piepio-
duction tests aie discussed Iatei in this AppIication
Note. Heie we wiII discuss some of the design options
and take a Iook at some commonIy used configuiations.
Gate Oscillators versus Discrete
Devices
DigitaI systems designeis aie undeistandabIy ieIuctant
to get invoIved with disciete devices and theii pecuIiaii-
ties (biasing techniques, etc.). Besides, the component
count foi these ciicuits tends to be quite a bit highei
than what a digitaI designei is used to seeing foi that
amount of functionaIity. NeveitheIess, if theie aie un-
usuaI iequiiements on the accuiacy and stabiIity of the
cIock fiequency, it shouId be noted that disciete device
osciIIatois can be taiIoied to suit the exact needs of the
appIication and peifected to a IeveI that wouId be diffi-
cuIt foi a gate osciIIatoi to appioach.
In most cases, when an exteinaI osciIIatoi is needed, the
designei tends to ieIy on some foim of a gate osciIIatoi.
A TTL inveitei with a iesistoi connecting the output to
the input makes a suitabIe inveiting ampIifiei. The ie-
sistoi hoIds the inveitei in the tiansition iegion be-
tween IogicaI high and Iow, so that at Ieast foi stait-up
puiposes the inveitei is a Iineai ampIifiei.
The feedback iesistance has to be quite Iow, howevei,
since it must conduct cuiient souiced by the input pin
without aIIowing the DC input voItage to get too fai
above the DC output voItage. Foi biasing puiposes, the
feedback iesistance shouId not exceed a few k-ohms.
But shunting the ciystaI with such a Iow iesistance does
not encouiage stait-up.
23065913
A) TTL OSCILLATOR
23065914
B) CMOS OSCILLATOR
Figure 11 Commonly Used Gate Oscillators
ConsequentIy, the configuiation in Figuie 11A might
be suggested. By bieaking R
f
into two paits and AC-
giounding the midpoint, one achieves the DC feedback
iequiied to hoId the inveitei in its active iegion, but
without the negative signaI feedback that is in effect
teIIing the ciicuit not to osciIIate. Howevei, this biasing
scheme wiII inciease the stait-up time, and ieIaxation-
type osciIIations aie aIso possibIe.
A CMOS inveitei, such as the 74HC04, might woik
bettei in this appIication, since a Iaigei R
f
can be used
to hoId the inveitei in its Iineai iegion.
Logic gates tend to have a faiiIy Iow output iesistance,
which destabiIizes the osciIIatoi. Foi that ieason a ie-
sistoi Rx is often added to the feedback netwoik, as
shown in Figuies 11A and B. At highei fiequencies a
20 oi 30 pF capacitoi is sometimes used in the Rx posi-
tion, to compensate foi some of the inteinaI piopaga-
tion deIay.
Refeience 1 contains an exceIIent discussion of gate os-
ciIIatois, and a numbei of design exampIes.
10
AP-155
Fundamental versus Overtone Operation
Its easiei to design an osciIIatoi ciicuit to opeiate in
the iesonatois fundamentaI iesponse mode than to de-
sign one foi oveitone opeiation. A quaitz ciystaI whose
fundamentaI iesponse mode coveis the desiied fiequen-
cy can be obtained up to some 30 MHz. Foi fiequencies
above that, the ciystaI might be used in an oveitone
mode.
SeveiaI piobIems aiise in the design of an oveitone os-
ciIIatoi. One is to stop the ciicuit fiom osciIIating in the
fundamentaI mode, which is what it wouId ieaIIy iathei
do, foi a numbei of ieasons, invoIving both the ampIify-
ing device and the ciystaI. An additionaI piobIem with
oveitone opeiation is an incieased tendency to spuiious
osciIIations. That is because the R
1
of vaiious spuiious
modes is IikeIy to be about the same as R
1
of the in-
tended oveitone iesponse. It may be necessaiy, as sug-
gested in Refeience 1, to specify a spuiious-to-main-
iesponse iesistance iatio to avoid the possibiIity of
tioubIe.
Oveitone osciIIatois aie not to be taken IightIy. One
wouId be weII advised to consuIt with an engineei who
is knowIedgeabIe in the subject duiing the design phase
of such a ciicuit.
Series versus Parallel Operation
Seiies iesonant osciIIatois use noninveiting ampIifieis.
To make a noninveiting ampIifiei out of Iogic gates
iequiies that two inveiteis be used, as shown in Figuie
12.
This type of ciicuit tends to be inaccuiate and unstabIe
in fiequency ovei vaiiations in tempeiatuie and V
CC
. It
has a tendency to osciIIate at oveitones, and to osciIIate
thiough C
0
of the ciystaI oi some stiay capacitance
iathei than as contioIIed by the mechanicaI iesonance
of the ciystaI.
The demon in seiies iesonant osciIIatois is the phase
shift in the ampIifiei. The seiies iesonant osciIIatoi
wants moie than just a noninveiting ampIifiei-it
wants a zero phase-shift ampIifiei. MuItistage nonin-
veiting ampIifieis tend to have a consideiabIy Iagging
phase shift, such that the ciystaI ieactance must be ca-
pacitive in oidei to biing the totaI phase shift aiound
the feedback Ioop back up to 0. In this mode, a 12
MHz ciystaI may be iunning at 8 oi 9 MHz. One can
put a capacitoi in seiies with the ciystaI to ieIieve the
ciystaI of having to pioduce aII of the iequiied phase
shift, and biing the osciIIation fiequency cIosei to fs.
Howevei, to fuithei compIicate the situation, the am-
pIifieis phase shift is stiongIy dependent on fiequency,
tempeiatuie, VCC, and device sampIe.
23065915
Figure 12 Series Resonant Gate Oscillator
Positive ieactance osciIIatois (paiaIIeI iesonant) use
inveiting ampIifieis. A singIe Iogic inveitei can be used
foi the ampIifiei, as in Figuie 11. The ampIifieis phase
shift is Iess ciiticaI, compaied to a seiies iesonant cii-
cuit, and since onIy one inveitei is invoIved theies Iess
phase eiioi anyway. The osciIIation fiequency is effec-
tiveIy bounded by the iesonant and antiiesonant fie-
quencies of the ciystaI itseIf. In addition, the feedback
netwoik incIudes capacitois that paiaIIeI the input and
output teiminaIs of the ampIifiei, thus ieducing the ef-
fect of unpiedictabIe capacitances at these points.
MORE ABOUT USING THE ON-CHIP
OSCILLATORS
In this section we wiII desciibe the on-chip inveiteis on
seIected miciocontioIIeis in some detaiI, and discuss
ciiteiia foi seIecting components to woik with them.
Futuie data sheets wiII suppIement this discussion with
updates and infoimation peitinent to the use of each
chips osciIIatoi ciicuitiy.
Oscillator Calculations
OsciIIatoi design, though aided by theoiy, is stiII IaigeIy
an empiiicaI exeicise. The ciicuit is inheientIy nonIin-
eai, and the noimaI anaIysis paiameteis vaiy with in-
stantaneous voItage. In addition, when deaIing with the
on-chip ciicuitiy, we have FFTs being used as iesistois,
iesistois being used as inteiconnects, distiibuted deIays,
input piotection devices, paiasitic junctions, and pio-
cessing vaiiations.
ConsequentIy, osciIIatoi caIcuIations aie nevei veiy
piecise. They can be usefuI, howevei, if they wiII at
Ieast indicate the effects of variations in the ciicuit pa-
iameteis on stait-up time, osciIIation fiequency, and
steady-state ampIitude. Stait-up time, foi exampIe, can
be taken as an indication of stait-up ieIiabiIity. If pie-
pioduction tests indicate a possibIe stait-up piobIem, a
ieIativeIy inexpeiienced designei can at Ieast be made
awaie of what paiametei may be causing the maiginaIi-
ty, and what diiection to go in to fix it.
11
AP-155
23065916
A) 8081-Type Circuit Configuration during Start-Up
(Excludes Input Protection Devices)
23065917
B) ACEquivalent of (A)
Figure 13 Oscillator Circuit Model Used
in Start-Up Calculations
The anaIysis used heie is mathematicaIIy stiaightfoi-
waid but aIgebiaicaIIy intiactabIe. That means its ieIa-
tiveIy easy to undeistand and piogiam into a computei,
but it wiII not yieId a neat foimuIa that gives, say,
steady-state ampIitude as a function of this oi that Iist
of paiameteis. A Iisting of a BASIC piogiam that im-
pIements the anaIysis wiII be found in Appendix II.
When the ciicuit is fiist poweied up, and befoie the
osciIIations have commenced (and if the osciIIations fail
to commence), the osciIIatoi can be tieated as a smaII
signaI Iineai ampIifiei with feedback. In that case, stan-
daid smaII-signaI anaIysis techniques can be used to
deteimine stait-up chaiacteiistics. The ciicuit modeI
used in this anaIysis is shown in Figuie 13.
The ciicuit appioximates that theie aie no high-fie-
quency effects within the ampIifiei itsIef, such that its
high-fiequency behavioi is dominated by the Ioad im-
pedance Z
L
. This is a ieasonabIe appioximation foi sin-
gIe-stage ampIifieis of the type used in 8051-type devic-
es. Then the gain of the ampIifiei as a function of fie-
quency is
A e
A
v
Z
L
Z
L
a R
0
23065918
Figure 14 Loop Gain versus Frequency
(4608 MHz Crystal)
The gain of the feedback netwoik is
b e
Z
i
Z
i
a Z
f
And the Ioop gain is
bA e
Z
i
Z
i
a Z
f
c
A
v
Z
L
Z
L
a R
0
The impedances Z
L
, Z
f
, and Z
i
aie defined in Figuie
13B.
Figuie 14 shows the way the Ioop gain thus caIcuIated
(using typicaI 8051-type paiameteis and a 4.608 MHz
ciystaI) vaiies with fiequency. The fiequency of inteiest
is the one foi which the phase of the Ioop gain is zeio.
The accepted ciiteiion foi stait-up is that the magni-
tude of the Ioop gain must exceed unity at this fiequen-
cy. This is the fiequency at which the ciicuit is in ieso-
nance. It coiiesponds veiy cIoseIy with the antiiesonant
fiequency of the motionaI aim of the ciystaI in paiaIIeI
with C
L
.
Figuie 15 shows the way the Ioop gain vaiies with fie-
quency when the paiameteis of a 3.58 MHz ceiamic
iesonatoi aie used in pIace of a ciystaI (the ampIifiei
paiameteis being typicaI 8051, as in Figuie 14). Note
the diffeient fiequency scaIes.
12
AP-155
23065919
Figure 15 Loop Gain versus Frequency
(358 MHz Ceramic)
Start-Up Characteristics
It is common, in studies of feedback systems, to exam-
ine the behavioi of the cIosed Ioop gain as a function of
compIex fiequency s
e
s
a
j0: specificaIIy, to detei-
mine the Iocation of its poIes in the compIex pIane. A
poIe is a point on the compIex pIane wheie the gain
function goes to infinity. KnowIedge of its Iocation can
be used to piedict the iesponse of the system to an
input distuibance.
The way that the iesponse function depends on the Io-
cation of the poIes is shown in Figuie 16. PoIes in the
Ieft-haIf pIane cause the iesponse function to take the
foim of a damped sinusoid. PoIes in the iight-haIf pIane
cause the iesponse function to take the foim of an expo-
nentiaIIy giowing sinusoid. In geneiaI,
v(t) E e
at
sin (0t a i)
wheie a is the ieaI pait of the poIe fiequency. Thus if
the poIe is in the iight-haIf pIane, a is positive and the
sinusoid giows. If the poIe is in the Ieft-haIf pIane, a is
negative and the sinusoid is damped.
The same type of anaIysis can usefuIIy be appIied to
osciIIatois. In this case, howevei, iathei than tiying to
ensuie that the poIes aie in the Ieft-haIf pIane, we
wouId seek to ensuie that theyie in the right-haIf pIane.
An exponentiaIIy giowing sinusoid is exactIy what is
wanted fiom an osciIIatoi that has just been poweied
up.
23065920
A) Poles in the Left-Half Plane f(t) E e
bat
sin (0t a i)
23065921
B) Poles in the Right-Half Plane f(t) E e
aat
sin (0t a i)
23065922
C) 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 inteiest in osciIIatois is 1/(1
b
bA). Its poIes aie at the compIex fiequencies wheie bA
e
1K0, because that vaIue of bA causes the gain func-
tion to go to infinity. The osciIIatoi wiII stait up if the
ieaI pait of the poIe fiequency is positive. Moie impoi-
tantIy, the rate at which it staits up is indicated by how
much gieatei than 0 the ieaI pait of the poIe fiequency
is.
The ciicuit in Figuie 13B can be used to find the poIe
fiequencies of the osciIIatoi gain function. AII that
needs to be done is evaIuate the impedances at compIex
fiequencies s
a
j0 iathei than just at 0, and find the
vaIue of s
a
j0 foi which bA
e
1K0. The Iaigei that
vaIue of s is, the fastei the osciIIatoi wiII stait up.
Of couise, othei things besides poIe fiequencies, things
Iike the VCC iise time, aie at woik in deteimining the
stait-up time. But to the extend that the poIe fiequen-
cies do affect stait-up time, we can obtain iesuIts Iike
those in Figuies 17 and 18.
To obtain these figuies the poIe fiequencies weie com-
puted foi vaiious vaIues of capacitance C
X
fiom
XTAL1 and XTAL2 to giound (thus C
X1
e
C
X2
e
C
X
). Then a time constant foi stait-up was caIcuIat-
ed as T
s
e
1
s
wheie s is the ieaI pait of the poIe fie-
quency (iad/sec), and this time constant is pIotted vei-
sus C
X
.
13
AP-155
23065923
23065924
23065925
Figure 17 Oscillator Start-Up (4608 MHz Crystal
from Standard Crystal Corp)
A shoit time constant means fastei stait-up. A Iong
time constant means sIow stait-up. Obseivations of ac-
tuaI stait-ups aie shown in the figuies. Figuie 17 is foi
a typicaI 8051 with a 4.608 MHz ciystaI suppIied by
Standaid CiystaI Coip., and Figuie 18 is foi a typicaI
8051 with a 3.58 MHz ceiamic iesonatoi suppIied by
NTK TechnicaI Ceiamics, Ltd.
It can be seen in Figuie 17 that, foi this ciystaI, vaIues
of C
X
between 30 and 50 pF minimize stait-up time,
but that the exact vaIue in this iange is not paiticuIaiIy
impoitant, even if the stait-up time itseIf is ciiticaI.
As pieviousIy mentioned, stait-up time can be taken as
an indication of stait-up ieIiabiIity. Stait-up piobIems
aie noimaIIy associated with C
X1
and C
X2
being too
smaII oi too Iaige foi a given iesonatoi. If the paiame-
teis of the iesonatoi aie known, cuives such as in Fig-
uie 17 oi 18 can be geneiated to define acceptabIe
ianges of vaIues foi these capacitois.
As the osciIIations giow in ampIitude, they ieach a Iev-
eI at which they undeigo seveie cIipping within the am-
pIifiei, in effect ieducing the ampIifiei gain. As the am-
pIifiei gain decieases, the poIes move towaids the j0
axis. In steady-state, the poIes aie on the j0 axis and
the ampIitude of the osciIIations is constant.
23065926
23065927
23065928
Figure 18 Oscillator Start-Up (358 MHz Ceramic
Resonator from NTK Technical Ceramics)
14
AP-155
23065929
A) Signal Levels at XTAL1
23065930
B) 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 anaIysis is gieatIy compIicated by the fact
that we aie deaIing with Iaige signaIs and nonIineai
ciicuit iesponse. The ciicuit paiameteis vaiy with in-
stantaneous voItage, and a numbei of cIamping and
cIipping mechanisms come into pIay. AnaIyses that
take aII these things into account aie too compIicated to
be of geneiaI use, and anaIyses that dont take them
into account aie too inaccuiate to justify the effoit.
Theie is a steady-state anaIysis in Appendix B that
takes some of the compIications into account and ig-
noies otheis. Figuie 19 shows the way the steady-state
ampIitudes thus caIcuIated (using typicaI 8051 paiame-
teis and a 4.608 MHz ciystaI) vaiy with equaI buIk
capacitance pIaced fiom XTAL1 and XTAL2 to
giound. FxpeiimentaI iesuIts aie shown foi compaii-
son.
The wavefoim at XTAL1 is a faiiIy cIean sinusoid. Its
negative peak is noimaIIy somewhat beIow zeio, at a
IeveI which is deteimined mainIy by the input piotec-
tion ciicuitiy at XTAL1.
The input piotection ciicuitiy consists of an ohmic ie-
sistoi and an enhancement-mode FFT with the gate
and souice connected to giound (VSS), as shown in
Figuie 20 foi the 8051, and in Figuie 21 foi the 8048.
Its function is to Iimit the positive voItage at the gate of
the input FFT to the avaIanche voItage of the diain
junction. If the input pin is diiven beIow VSS, the diain
and souice of the piotection FFT inteichange ioIes, so
its gate is connected to what is now the diain. In this
condition the device iesembIes a diode with the anode
connected to VSS.
Theie is a paiasitic pn junction between the ohmic ie-
sistoi and the substiate. In the ROM paits (8015, 8048,
etc.) the substiate is heId at appioximateIy
b
3V by the
on-chip back-bias geneiatoi. In the FPROM paits
(8751, 8748, etc.) the substiate is connected to VSS.
The effect of the input piotection ciicuitiy on the osciI-
Iatoi is that if the XTAL1 signaI goes negative, its nega-
tive peak is cIamped to
b
V
DS
of the piotection FFT in
the ROM paits, and to about
b
0.5V in the FPROM
paits. These negative voItages on XTAL1 aie in this
appIication seIf-Iimiting and nondestiuctive.
The cIamping action does, howevei, iaise the DC IeveI
at XTAL1, which in tuin tends to ieduce the positive
peak at XTAL2. The wavefoim at XTAL2 iesembIes a
sinusoid iiding on a DC IeveI, and whose negative
peaks aie cIipped off at zeio.
Since its noimaIIy the XTAL2 signaI that diives the
inteinaI cIocking ciicuitiy, the question natuiaIIy aiises
as to how Iaige this signaI must be to ieIiabIy do its job.
In fact, the XTAL2 signaI doesnt have to meet the
same VIH and VIL specifications that an exteinaI diiv-
ei wouId have to. Thats because as Iong as the osciIIa-
toi is woiking, the on-chip ampIifiei is diiving itseIf
thiough its own 0-to-1 tiansition iegion, which is veiy
neaiIy the same as the 0-to-1 tiansition iegion in the
inteinaI buffei that foIIows the osciIIatoi. If some pio-
cessing vaiiations move the tiansition IeveI highei oi
Iowei, the on-chip ampIifiei tends to compensate foi it
by the fact that its own tiansition IeveI is coiiespond-
ingIy highei oi Iowei. (In the 8096, its the XTAL1
signaI that diives the inteinaI cIocking ciicuitiy, but the
same concept appIies.)
The main concein about the XTAL2 signaI ampIitude
is an indication of the geneiaI heaIth of the osciIIatoi.
An ampIitude of Iess than about 2.5V peak-to-peak in-
dicates that stait-up piobIems couId deveIop in some
units (with Iow gain) with some ciystaIs (with high R
1
).
The iemedy is to eithei adjust the vaIues of C
X1
and/oi
C
X2
oi use a ciystaI with a Iowei R
1
.
The ampIitudes at XTAL1 and XTAL2 can be adjusted
by changing the iatio of the capacitois fiom XTAL1
and XTAL2 to giound. Incieasing the XTAL2 capaci-
tance, foi exampIe, decieases the ampIitude at XTAL2
and incieases the ampIitude at XTAL1 by about the
same amount. Decieasing both caps incieases both am-
pIitudes.
15
AP-155
Pin Capacitance
InteinaI pin-to-giound and pin-to-pin capacitances at
XTAL1 and XTAL2 wiII have some effect on the osciI-
Iatoi. These capacitances aie noimaIIy taken to be in
the iange of 5 to 10 pF, but they aie extiemeIy difficuIt
to evaIuate. Any measuiement of one such capacitance
wiII necessaiiIy incIude effects fiom the otheis. One ad-
vantage of the positive ieactance osciIIatoi is that the
pin-to-giound capacitances aie paiaIIeIed by exteinaI
buIk capacitois, so a piecise deteimination of theii vaI-
ue is unnecessaiy. We wouId suggest that theie is IittIe
justification foi moie piecision than to assign them a
vaIue of 7 pF (XTAL1-to-giound and XTAL1-to-
XTAL2). This vaIue is piobabIy not in eiioi by moie
than 3 oi 4 pF.
The XTAL2-to-giound capacitance is not entiieIy pin
capacitance, but moie Iike an equivaIent output ca-
pacitance of some 25 to 30 pF, having to incIude the
effect of inteinaI phase deIays. This vaIue wiII vaiy to
some extent with tempeiatuie, piocessing, and fiequen-
cy.
MCS-51 Oscillator
The on-chip ampIifiei on the HMOS MCS-51 famiIy is
shown in Figuie 20. The diain Ioad and feedback ie-
sistois aie seen to be fieId-effect tiansistois. The diain
Ioad FFT, R
D
, is typicaIIy equivaIent to about 1K to 3
K-ohms. As an ampIifiei, the Iow fiequency voItage
gain is noimaIIy between
b
10 and
b
20, and the out-
put iesistance is effectiveIy R
D
.
23065931
Figure 20 MCS-51 Oscillator Amplifier
The 80151 osciIIatoi is noimaIIy used with equaI buIk
capacitois pIaced exteinaIIy fiom XTAL1 to giound
and fiom XTAL2 to giound. To deteimine a ieason-
abIe vaIue of capacitance to use in these positions, given
a ciystaI of ceiamic iesonatoi of known paiameteis,
one can use the BASIC anaIysis in Appendix II to gen-
eiate cuives such as in Figuies 17 and 18. This pioce-
duie wiII define a iange of vaIues that wiII minimize
stait-up time. We dont suggest that smaIIei vaIues be
used than those which minimize stait-up time. Laigei
vaIues than those can be used in appIications wheie
incieased fiequency stabiIity is desiied, at some sacii-
fice in stait-up time.
Standaid CiystaI Coip. (Refeience 8) studied the use of
theii ciystaIs with the MCS-51 famiIy using skew sam-
pIe suppIied by InteI. They suggest putting 30 pF ca-
pacitois fiom XTAL1 and XTAL2 to giound, if the
ciystaI is specified as desciibed in Refeience 8. They
noted that in that configuiation and with ciystaIs thus
specified, the fiequency accuiacy was g0.01% and the
fiequency stabiIity was g0.005%, and that a fiequency
accuiacy of g0.005% couId be obtained by substitut-
ing a 25 pF fixed cap in paiaIIeI with a 520 pF tiim-
mei foi one of the 30 pF caps.
MCS-51 skew sampIes have aIso been suppIied to a
numbei of ceiamic iesonatoi manufactuieis foi chaiac-
teiization with theii pioducts. These companies shouId
be contacted foi appIication infoimation on theii piod-
ucts. In geneiaI, howevei, ceiamics tend to want some-
what Iaigei vaIues foi C
X1
and C
X2
than quaitz ciys-
taIs do. As shown in Figuie 18, they stait up a Iot fastei
that way.
In some appIication the actuaI fiequency toIeiance ie-
quiied is onIy 1% oi so, the usei being conceined main-
Iy that the ciicuit will osciIIate. In that case, C
X1
and
C
X2
can be seIected iathei fieeIy in the iange of 20 to
80 pF.
As you can see, best vaIues foi these components and
theii toIeiances aie stiongIy dependent on the appIica-
tion and its iequiiements. In any case, theii suitabiIity
shouId be veiified by enviionmentaI testing befoie the
design is submitted to pioduction.
MCS-48 Oscillator
The NMOS and HMOS MCS-48 osciIIatoi is shown in
Figuie 21. It diffeis fiom the 8051 in that its inveiting
23065932
Figure 21 MCS-48 Oscillator Amplifier
16
AP-155
23065933
Figure 22 Schmitt Trigger Characteristic
ampIifiei is a Schmitt Tiiggei. This configuiation was
chosen to pievent ciosstaIk fiom the TO pin, which is
adjacent to the XTAL1 pin.
AII Schmitt Tiiggei ciicuits exhibit a hysteiesis effect,
as shown in Figuie 22. The hysteiesis is what makes it
Iess sensitive to noise. The same hysteiesis aIIows any
Schmitt Tiiggei to be used as a ieIaxation osciIIatoi.
AII you have to do is connect a iesistoi fiom output to
input, and a capacitoi fiom input to giound, and the
ciicuit osciIIates in a ieIaxation mode as foIIows.
If the Schmitt Tiiggei output is at a Iogic high, the
capacitoi commences chaiging thiough the feedback
iesistoi. When the capacitoi voItage ieaches the uppei
tiiggei point (UTP), the Schmitt Tiiggei output
switches to a Iogic Iow and the capacitoi commences
dischaiging thiough the same iesistoi. When the capac-
itoi voItage ieaches the Iowei tiiggei point (LTP), the
Schmitt Tiiggei output switches to a Iogic high again,
and the sequence iepeats. The osciIIation fiequency is
deteimined by the RC time constant and the hysteiesis
voItage, UTP-LTP.
The 8048 can osciIIate in this mode. It has an inteinaI
feedback iesistoi. AII thats needed is an exteinaI ca-
pacitoi fiom XTAL1 to giound. In fact, if a smaIIei
exteinaI feedback iesistoi is added, an 8048 system
couId be designed to iun in this mode. Do it at your own
risk This mode of opeiation is not tested, specified,
documented, oi encouiaged in any way by InteI foi the
8048. Futuie steppings of the device might have a dif-
feient type of inveiting ampIifiei (one moie Iike the
8051). The CHMOS membeis of the MCS-48 famiIy do
not use a Schmitt Tiiggei as the inveiting ampIifiei.
ReIaxation osciIIations in the 8048 must be avoided,
and this is the majoi objective in seIecting the off-chip
components needed to compIete the osciIIatoi ciicuit.
When an 8048 is poweied up, if VCC has a shoit iise
time, the ieIaxation mode staits fiist. The fiequency is
noimaIIy about 50 KHz. The iesonatoi mode buiIds
moie sIowIy, but it eventuaIIy takes ovei and dominates
the opeiation of the ciiucit. This is shown in Figuie
23A.
Due to piocessing vaiiations, some units seem to have a
haidei time coming out of the ieIaxation mode, paitic-
uIaiIy at Iow tempeiatuies. In some cases the iesonatoi
osciIIations may faiI entiieIy, and Ieave the device in the
ieIaxation mode. Most units wiII stick in the ieIaxation
mode at any tempeiatuie if C
X1
is Iaigei than about 50
pF. Theiefoie, C
X1
shouId be chosen with some caie,
paiticuIaiIy if the system must opeiate at Iowei tempei-
atuies.
One method that has pioven effective in aII units to
b
40C is to put 5 pF fiom XTAL1 to giound and 20
pF fiom XTAL2 to giound. UnfoitunateIy, whiIe this
method does discouiage the ieIaxation mode, it is not
an optimaI choice foi the iesonatoi mode. Foi one
thing, it does not swamp the pin capacitance. AIso, it
makes foi a iathei high signaI IeveI at XTAL1 (8 oi 9
voIts peak-to-peak).
The question aiises as to whethei that IeveI of signaI at
XTLA1 might damage the chip. Not to woiiy. The
negative peaks aie seIf-Iimiting and nondestiuctive. The
positive peaks couId conceivabIy damage the oxide, but
in fact, NMOS chips (eg, 8048) and HMOS chips (eg,
8048H) aie tested to a much highei voItage than that.
The technoIogy tiend, of couise, is to thinnei oxides, as
the devices shiink in size. Foi an extia maigin of safety,
the HMOS II chips (eg, 8048AH) have an inteinaI di-
ode cIamp at XTAL1 to VCC.
In ieaIity, C
X1
doesnt have to be quite so smaII to
avoid ieIaxation osciIIations, if the minimum opeiating
tempeiatuie is not
b
40C. Foi Iess seveie tempeiatuie
iequiiements, vaIues of capacitance seIected in much
the same way as foi an 8051 can be used. The ciicuit
shouId be tested, howevei, at the systems Iowest tem-
peiatuie Iimit.
AdditionaI secuiity against ieIaxation osciIIations can
be obtained by putting a 1M-ohm (oi Iaigei) iesistoi
fiom XTAL1 to VCC. PuIIing up the XTAL1 pin this
way seems to discouiage ieIaxation osciIIations as effec-
tiveIy as any othei method (Figuie 23B).
Anothei thing that discouiages ieIaxation osciIIations is
Iow VCC. The iesonatoi mode, on the othei hand is
much Iess sensitive to VCC. Thus if VCC comes up
ieIativeIy sIowIy (seveiaI miIIiseconds iise time), the
iesonatoi mode is noimaIIy up and iunning befoie the
ieIaxation mode staits (in fact, befoie VCC has even
ieached opeiating specs). This is shown in Figuie 23C.
A secondaiy effect of the hysteiesis is a shift in the
osciIIation fiequency. At Iow fiequencies, the output
signaI fiom an inveitei without hysteiesis Ieads (oi
Iags) the input by 180 degiees. The hysteiesis in a
Schmitt Tiiggei, howevei, causes the output to Iead the
17
AP-155
input by Iess than 180 degiees (oi Iag by moie than 180
degiees), by an amount that depends on the signaI am-
pIitude, as shown in Figuie 24. At highei fiequencies,
theie aie additionaI phase shifts due to the vaiious ieac-
tances in the ciicuit, but the phase shift due to the hys-
teiesis is stiII piesent. Since the totaI phase shift in the
osciIIatois Ioop gain is necessaiiIy 0 oi 360 degiees, it
is appaient that as the osciIIations buiId up, the fie-
quency has to change to aIIow the ieactances to com-
pensate foi the hysteiesis. In noimaI opeiation, this ad-
ditionaI phase shift due to hysteiesis does not exceed a
few degiees, and the iesuIting fiequency shift is negIigi-
bIe.
Kyoceia, a ceiamic iesonatoi manufactuiei, studied
the use of some of theii iesonatois (at 6.0 MHz, 8.0
MHz, and 11.0 MHz) with the 8049H. Theii concIu-
sion as to the vaIue of capacitance to use at XTAL1 and
XTAL2 was that 33 pF is appiopiiate at aII thiee fie-
quencies. One shouId piobabIy foIIow the manufactui-
eis iecommendations in this mattei, since they wiII
guaiantee opeiation.
Whethei one shouId accept these iecommendations and
guaiantees without fuithei testing is, howevei, anothei
mattei. Not aII useis have found the iecommendations
to be without occasionaI piobIems. If you iun into diffi-
23065934
A) When VCC Comes Up Fast Relaxation Oscillations
Start First But Then the Crystal Takes Over
23065935
B) Weak Pullup (1 MX or More) on XTAL1
Discourages Relaxation Mode
23065936
C) No Relaxation Oscillations When VCC Comes Up
More Slowly
23065937
23065938
23065939
Figure 23 Relaxation Oscillations in the 8048
18
AP-155
cuIties using theii iecommendations, both InteI and the
ceiamic iesonatoi manufactuiei want to know about it.
It is to theii inteiest, and ouis, that such piobIems be
iesoIved.
23065940
A) Inverter Without Hysteresis Output Leads Input by 180
23065941
B) Inverter With Hysteresis Output Leads
Input by Less than 180
Figure 24 AmplitudeDependent Phase
Shift in Schmitt Trigger
Preproduction Tests
An osciIIatoi design shouId nevei be consideied ieady
foi pioduction untiI it has pioven its abiIity to function
acceptabIy weII undei woist-case enviionmentaI condi-
tions and with paiameteis at theii woist-case toIeiance
Iimits. Unexpected tempeiatuie effects in paits that
may aIieady be neai theii toIeiance Iimits can pievent
stait-up of an osciIIatoi that woiks peifectIy weII on the
bench. Foi exampIe, designeis often oveiIook tempeia-
tuie effects in ceiamic capacitois. (Some ceiamics aie
down to 50% of theii ioom-tempeiatuie vaIues at
b
20C and
a
60C). The piobIem heie isnt just one of
fiequency stabiIity, but aIso invoIves stait-up time and
steady-state ampIitude. Theie may aIso be tempeiatuie
effects in the iesonatoi and ampIifiei.
It wiII be heIpfuI to buiId a test jig that wiII aIIow the
osciIIatoi ciicuit to be tested independentIy of the iest
of the system. Both stait-up and steady-state chaiactei-
istics shouId be tested. Figuie 25 shows the ciicuit that
A) Software for Oscillator Test
30UR0E
0R0 0000 H
lNF 31AR1
0R0 000B H 1lNER 0 lR1ERRUF1:
0FL 1l 1000LE 1l
RE1l
0R0 000lBH 1lNER l lR1ERRUF1:
0FL Fl.l 1000LE 0R0 1Rl00ER
IlR7 F2,$ IELAY
0FL Fl.0 1000LE 700 00R1R0L
RE1l
31AR1: N07 1Hl,0FAH 1lNER l REL0AI 7ALUE
N07 1Ll,0FAH 31AR1 1Ll A1 REL0AI 7ALUE
N07 1N0I,8lH 1lNER l 10 00UR1ER, AU10
REL0AI
1lNER 0 10 1lNER, l8-Bl1
N07 lE,BAH ERABLE 1lNER lR1ERRUF13
0RLY
N07 100R,50H 1URR 0R B01H 1lNER3
lNF $ lILE
ERI
23065942
B) Oscillator Test Circuit (Shown for 8051 Test)
Figure 25 Oscillator Test Circuit and Software
19
AP-155
was used to obtain the osciIIatoi stait-up photogiaphs
in this AppIication Note. This ciicuit oi a modified
veision of it wouId make a convenient test vehicIe. The
osciIIatoi and its ieIevant components can be physicaIIy
sepaiated fiom the contioI ciicuitiy, and pIaced in a
tempeiatuie chambei.
Stait-up shouId be obseived undei a vaiiety of condi-
tions, incIuding Iow VCC and using sIow and fast VCC
iise times. The osciIIatoi shouId not be ieIuctant to
stait up even when VCC is beIow its spec vaIue foi the
iest of the chip. (The iest of the chip may not function,
but the osciIIatoi shouId woik.) It shouId aIso be veii-
fied that stait-up occuis when the iesonatoi has moie
than its uppei toIeiance Iimit of seiies iesistance. (Put
some iesistance in seiies with the iesonatoi foi this
test.) The buIk capacitois fiom XTAL1 and XTAL2 to
giound shouId aIso be vaiied to theii toIeiance Iimits.
The same ciicuit, with appiopiiate changes in the soft-
waie to Iengthen the on time, can be used to test the
steady-state chaiacteiistics of the osciIIatoi, specificaIIy
the fiequency, fiequency stabiIity, and ampIitudes at
XTAL1 and XTAL2.
As pieviousIy noted, the voItage swings at these pins
aie not ciiticaI, but they shouId be checked at the sys-
tems tempeiatuie Iimits to ensuie that they aie in good
heaIth. Obseiving these signaIs necessaiiIy changes
them somewhat. Obseiving the signaI at XTAL2 ie-
quiies that the capacitoi at that pin be ieduced to ac-
count foi the osciIIoscope piobe capacitance. Obseiving
the signaI at XTAL1 iequiies the same consideiation,
pIus a bIocking capacitoi (switch the osciIIoscope input
to AC), so as to not distuib the DC IeveI at that pin.
AIteinativeIy, a MOSFFT buffei such as the one shown
in Figuie 26 can be used. It shouId be veiified by diiect
measuiement that the giound cIip on the scope piobe is
ohmicaIIy connected to the scope chassis (piobes aie
inciedibIy fiagiIe in this iespect), and the obseivations
shouId be made with the giound cIip on the VSS pin, oi
veiy cIose to it. If the piobe shieId isnt opeiationaI and
in use, the obseivations aie woithIess.
23065943
Figure 26 MOSFET Buffer for Observing
Oscillator Signals
Fiequency checks shouId be made with onIy the osciIIa-
toi ciicuitiy connected to XTAL1 and XTAL2. The
ALF fiequency can be counted, and the osciIIatoi fie-
quency deiived fiom that. In systems wheie the fie-
quency toIeiance is onIy nominaI, the fiequency
shouId stiII be checked to asceitain that the osciIIatoi
isnt iunning in a spuiious iesonance oi ieIaxation
mode. Switching VCC off and on again iepeatedIy wiII
heIp ieveaI a tendency to go into unwanted modes of
osciIIation.
The opeiation of the osciIIatoi shouId then be veiified
undei actuaI system iunning conditions. By this stage
one wiII be abIe to have some confidence that the basic
seIection of components foi the osciIIatoi itseIf is suit-
abIe, so if the osciIIatoi appeais to maIfunction in the
system the fauIt is not in the seIection of these compo-
nents.
Troubleshooting Oscillator Problems
The fiist thing to considei in case of difficuIty is that
between the test jig and the actuaI appIication theie
may be significant diffeiences in stiay capacitances,
paiticuIaiIy if the actuaI appIication is on a muIti-Iayei
boaid.
Noise gIitches, that aient piesent in the test jig but aie
in the appIication boaid, aie anothei possibiIity. Capac-
itive coupIing between the osciIIatoi ciicuitiy and othei
signaI has aIieady been mentioned as a souice of mis-
counts in the inteinaI cIocking ciicuitiy. Inductive cou-
pIing is aIso possibIe, if theie aie stiong cuiients neai-
by. These piobIems aie a function of the PCB Iayout.
Suiiounding the osciIIatoi components with quiet
tiaces (VCC and giound, foi exampIe) wiII aIIeviate ca-
pacitive coupIing to signaIs that have fast tiansition
times. To minimize inductive coupIing, the PCB Iayout
shouId minimize the aieas of the Ioops foimed by the
osciIIatoi components. These aie the Ioops that shouId
be checked:
XTAL1 thiough the iesonatoi to XTAL2:
XTAL1 thiough C
X1
to the VSS pin:
XTAL2 thiough C
X2
to the VSS pin.
It is not unusuaI to find that the giounded ends of C
X1
and C
X2
eventuaIIy connect up to the VSS pin onIy
aftei Iooping aiound the faithest ends of the boaid. Not
good.
FinaIIy, it shouId not be oveiIooked that softwaie piob-
Iems sometimes imitate the symptoms of a sIow-staiting
osciIIatoi oi incoiiect fiequency. Nevei undeiestimate
the peiveisity of a softwaie piobIem.
20
AP-155
REFERENCES
1. Fieiking, M. F., Crystal Oscillator Design and Tem-
perature Compensation Van Nostiand ReinhoId, 1978.
2. Bottom, V., The CiystaI Unit as a Ciicuit Compo-
nent, Ch. 7, Introduction to Quartz Crystal Unit De-
sign Van Nostiand ReinhoId, 1982.
3. Paizen, B., Design of Crystal and Other Harmonic
Oscillators John WiIey & Sons, 1983.
4. HoImbeck, J. D., Fiequency ToIeiance Limitations
with Logic Oate CIock OsciIIatois, 31st Annual Fre-
quency Control Symposium June, 1977.
5. Robeige, J. K., NonIineai Systems, Ch. 6, Opera-
tional Amplifiers Theory and Practice WiIey, 1975.
6. Faton, S. S. Timekeeping Advances Through
COSMOS Technology RCA AppIication Note ICAN-
6086.
7. Faton, S. S., Micropower Crystal-Controlled Oscilla-
tor Design Using RCA COSMOS Inverters RCA Ap-
pIication Note ICAN-6539.
8. Fishei, J. B., Crystal Specifications for the Intel
803180518751 Microcontrollers Standaid CiystaI
Coip. Design Data Note 2F.
9. Muiata Mfg. Co., Ltd., Ceramic Resonator
Ceralock Application Manual
10. Kyoto Ceiamic Co., Ltd., Adaptability Test Between
Intel 8049H and Kyocera Ceramic Resonators
11. Kyoto Ceiamic Co., Ltd., Technical Data on Ce-
ramic Resonator Model KBR-60M KBR-80M KBR-
110M Application for 8051 (Intel)
12. NTK TechnicaI Ceiamic Division, NOK Spaik
PIug Co., Ltd., NTKK Ceramic Resonator Manual
21
AP-155
APPENDIX A
QUARTZ AND CERAMIC RESONATOR FORMULAS
Based on the equivaIent ciicuit of the ciystaI, the im-
pedance of the ciystaI is
Z
XTAL
e
(R
1
a j0L
1
a 1j0C
1
) (1j0C
0
)
R
1
a j0L
1
a 1j0C
1
a 1j0C
0
Aftei some aIgebiaic manipuIation, this caIcuIation can
be wiitten in the foim
Z
XTAL
e
1
j0(C
1
a C
0
)

1 b 0
2
L
1
C
1
a j0R
1
C
1
1 b 0
2
L
1
C
T
a j0R
1
C
T
wheie C
T
is the capacitance of C
1
in seiies with C
0
:
C
T
e
C
1
C
0
C
1
a C
0
The impedance of the ciystaI in paiaIIeI with an extei-
naI Ioad capacitance C
L
is the same expiession, but
with C
0
a
C
L
substituted foi C
0
:
Z
XTAL ll
CL
e
1
j0(C
1
a C
0
a C
L
)

1 b 0
2
L
1
C
1
a j0R
1
C
1
1 b 0
2
L
1
C
T
a j0R
1
C
T
wheie C
T
is the capacitance of C
1
in seiies with (C
0
a
C
L
):
C
T
e
C
1
(C
0
a C
L
)
C
1
a C
0
a C
L
The impedance of the ciystaI in series with the Ioad
capacitance is
Z
XTAL a CL
e Z
XTAL
a
1
j0C
L
e
C
L
a C
1
a C
0
j0C
L
(C
1
a C
0
)

1 b 0
2
L
1
C
T
a j0R
1
C
T
1 b 0
2
L
1
C
T
a j0R
1
C
T
wheie C
T
and C
T
aie as defined above.
The phase angIes of these impedances aie ieadiIy ob-
tained fiom the impedance expiessions themseIves:
i
XTAL
e arctan
0R
1
C
1
1 b 0
2
L
1
C
1
b arctan
0R
1
C
T
1 b 0
2
L
1
C
T
b
q
2
i
XTAL
ll
C
L
e arctan
0R
1
C
1
1 b 0
2
L
1
C
1
b arctan
0R
1
C
T
1 b 0
2
L
1
C
T
b
q
2
i
XTAL a C
L
e arctan
0R
1
C
T
1 b 0
2
L
1
C
T
b arctan
0R
1
C
T
1 b 0
2
L
1
C
T
b
q
2
The iesonant (seiies iesonant) fiequency is the fie-
quency at which the phase angIe is zeio and the imped-
ance is Iow. The antiiesonant (paiaIIeI iesonant) fie-
quency is the fiequency at which the phase angIe is zeio
and the impedance is high.
Fach of the above i-expiessions contains two aictan
functions. Setting the denominatoi of the aigument of
the fiist aictan function to zeio gives (appioximateIy)
the seiies iesonant fiequency foi that configuiation.
Setting the denominatoi of the aigument of the second
aictan function to zeio gives (appioximateIy) the pai-
aIIeI iesonant fiequency foi that configuiation.
Foi exampIe, the iesonant fiequency of the ciystaI is
the fiequency at which
1 b 0
2
L
1
C
1
e 0
0
s
e
1
0L
1
C
1
Thus
f
s
e
1
2q0L
1
C
1
oi
A-1
AP-155
It wiII be noted that the seiies iesonant fiequency of the
XTAL
a
CL configuiation (ciystaI in seiies with CL)
is the same as the paiaIIeI iesonant fiequency of the
XTAL
ll
CL configuiation (ciystaI in paiaIIeI with
C
L
). This is the fiequency at which
1 b 0
2
L
1
C
T
e 0
Thus
0
a
e
1
0L
1
C
T
oi
f
a
e
1
2q0L
1
C
T
This fact is used by ciystaI manufactuieis in the pio-
cess of caIibiating a ciystaI to a specified Ioad capaci-
tance.
By subtiacting the iesonant fiequency of the ciystaI
fiom its antiiesonant fiequency, one can caIcuIate the
iange of fiequencies ovei which the ciystaI ieactance is
positive:
f
a
bf
s
e f
s
(01 a C
1
C
0
b1
f
s

C
1
2C
0J
Oiven typicaI vaIues foi C
1
and C
0
, this iange can
haidIy exceed 0.5% of fs. UnIess the inveiting ampIifiei
in the positive ieactance osciIIatoi is doing something
veiy stiange indeed, the osciIIation fiequency is bound
to be accuiate to that peicentage whethei the ciystaI
was caIibiated foi seiies opeiation oi to any unspecified
Ioad capacitance.
Equivalent Series Resistance
FSR is the ieaI pait of Z
XTAL
at the osciIIation fie-
quency. The osciIIation fiequency is the paiaIIeI ieso-
nant fiequency of the XTAL
ll
CL configuiation
(which is the same as the seiies iesonant fiequency of
the XTAL
a
CL configuiation). Substituting this fie-
quency into the Z
XTAL
expiession yieIds, aftei some
aIgebiaic manipuIation,
ESR e
R
1

C
0
a C
L
C
L J
2
1 a 0
2
C
2
1

C
0
a C
L
C
L J
2
j
R
1

1 a
C
0
C
LJ
2
Drive Level
The powei dissipated by the ciystaI is I
2
1
R
1
, wheie I
1
is
the RMS cuiient in the motionaI aim of the ciystaI.
This cuiient is given by V
x
/
l
Z
1l
, wheie V
x
is the RMS
voItage acioss the ciystaI, and
l
Z
1l
is the magnitude of
the impedance of the motionaI aim. At the osciIIation
fiequency, the motionaI aim is a positive (inductive)
ieactance in paiaIIeI iesonance with (C
0
a
C
L
). Theie-
foie
l
Z
1l
is appioximateIy equaI to the magnitude of the
ieactance of (C
0
a
C
L
):
l
Z
1l
e
1
2qf(C
0
a C
L
)
wheie f is the osciIIation fiequency. Then,
P e I
2
1
R
1
e

V
x
l
Z
1l J
2
R
1
e 2qf (C
0
a C
L
) V
x

2
R
1
The wavefoim of the voItage acioss the ciystaI
(XTAL1 to XTAL2) is appioximateIy sinusoidaI. If its
peak vaIue is VCC, then V
x
is VCC/02. Theiefoie,
P e 2R
1
qf (C
0
a C
L
) VCC
2
A-2
AP-155
APPENDIX B
OSCILLATOR ANALYSIS PROGRAM
The piogiam is wiitten in BASIC. BASIC is exciuciat-
ingIy sIow, but it has some advantages. Foi one thing,
moie peopIe know BASIC than FORTRAN. In addi-
tion, a BASIC piogiam is easy to deveIop, modify, and
fiddIe aiound with. Anothei impoitant advantage is
that a BASIC piogiam can iun on piacticaIIy any smaII
computei system.
Its sIowness is a piobIem, howevei. Foi exampIe, the
ioutine which caIcuIates the stait-up time constant
discussed in the text may take seveiaI houis to com-
pIete. A peison who finds this piogiam usefuI may pie-
fei to conveit it to FORTAN, if the faciIities aie avaiI-
abIe.
Limitations of the Program
The piogiam was deveIoped with specific iefeience to
8051-type osciIIatoi ciicuitiy. That means the on-chip
ampIifiei is a simpIe inveitei, and not a Schmitt Tiig-
gei. The 8096, the 80C51, the 80C48 and 80C49 aII
have simpIe inveiteis. The 8096 osciIIatoi is aImost
identicaI to the 8051, diffeiing mainIy in the input pio-
tection ciicuitiy. The CHMOS ampIifieis have some-
what diffeient paiameteis (highei gain, foi exampIe),
and diffeient tiansition IeveIs than the 8051.
The MCS-48 famiIy is specificaIIy incIuded in the pio-
giam onIy to the extent that the input-output cuive
used in the steady-state anaIysis is that of a Schmitt
Tiiggei, if the usei identifies the device undei anaIysis
as an MCS-48 device. The anaIysis does not incIude the
voItage dependent phase shift of the Schmitt Tiiggei.
The cIamping action of the input piotection ciicuitiy is
impoitant in deteimining the steady-state ampIitudes.
The steady-state ioutine accounts foi it by setting the
negative peak of the XTAL1 signaI at a IeveI which
depends on the ampIitude of the XTAL1 signaI in ac-
coidance with expeiimentaI obseivations. Its an exei-
cise in cuive-fitting. A usei may find a diffeient type of
cuive woiks bettei. Latei steppings of the chips may
behave diffeientIy in this iespect, having somewhat dif-
feient types of input piotection ciicuitiy.
It shouId be noted that the anaIysis ignoies a numbei of
impoitant items, such as high-fiequency effects in the
on-chip ciicuitiy. These effects aie difficuIt to piedict,
and aie no doubt dependent on tempeiatuie, fiequency,
and device sampIe. Howevei, they can be simuIated to a
ieasonabIe degiee by adding an output capacitance of
about 20 pF to the ciicuit modeI (i.e., in paiaIIeI with
CX2) as desciibed beIow.
Notes on Using the Program
The piogiam asks the usei to input vaIues foi vaiious
ciicuit paiameteis. Fiist the ciystaI (oi ceiamic iesona-
toi) paiameteis aie asked foi. These aie R1, L1, C1,
and C0. The manufactuiei can suppIy these vaIues foi
seIected sampIes. To obtain any kind of coiieIation be-
tween caIcuIation and expeiiment, the vaIues of these
paiameteis must be known foi the specific sampIe in
the test ciicuit. The vaIue that shouId be enteied foi C0
is the C0 of the ciystaI itseIf pIus an estimated 7 pF to
account foi the XTAL1-to-XTAL2 pin capacitance,
pIus any othei stiay capacitance paiaIIeIing the ciystaI
that the usei may feeI is significant enough to be incIud-
ed.
Then the piogiam asks foi the vaIues of the XTAL1-to-
giound and XTAL2-to-giound capacitances. Foi
CXTAL1, entei the vaIue of the exteinaIIy connected
buIk capacitoi pIus an estimated 7 pF foi pin capaci-
tance. Foi CXTAL2, entei the vaIue of the exteinaIIy
connected buIk capacitoi pIus an estimated 7 pF foi pin
capacitance pIus about 20 pF to simuIate high-fiequen-
cy ioII-off and phase shifts in the on-chip ciicuitiy.
Next the piogiam asks foi vaIues foi the smaII-signaI
paiameteis of the on-chip ampIifiei. TypicaIIy, foi the
8051/8751,
AmpIifiei Oain Magnitude
e
15
Feedback Resistance
e
2300 KX
Output Resistance
e
2 KX
The same vaIues can be used foi MCS-48 (NMOS and
HMOS) devices, but they aie difficuIt to veiify, because
the Schmitt Tiiggei does not Iend itseIf to smaII-signaI
measuiements.
B-1
AP-155
23065944
B-2
AP-155
23065945
B-3
AP-155
23065946
B-4
AP-155
23065947
B-5
AP-155
23065948
B-6
AP-155
23065949
B-7
AP-155
23065950
B-8
INTEL SUPPLY FILLER
INTEL SUPPLY FILLER
INTEL SUPPLY FILLER
INTEL CORPORATION 2200 Mission College Blvd Santa Clara CA 95052 Tel (408) 765-8080
INTEL CORPORATION (UK) Ltd Swindon United Kingdom Tel (0793) 696 000
INTEL JAPAN kk Ibaraki-ken Tel 029747-8511
Printed in USAxxxx0196B10Mxx xx

También podría gustarte