P. 1
Crystal

Crystal

|Views: 44|Likes:
Publicado porRohin Dadina

More info:

Published by: Rohin Dadina on Sep 30, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

02/13/2011

pdf

text

original

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
Intel’s 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
InteI’s 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 don’t 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 couIdn’t 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.
230659–1
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 you’ie 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.
230659–2
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.
230659–3
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 shouIdn’t be confused with the
haimonics of the fundamentaI. They’ie not haimonics,
but diffeient vibiationaI modes. They’ie 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.
230659–4
Figure 4 Quartz Crystal Symbol and
Equivalent Circuit
C
0
is caIIed the shunt capacitance of the ciystaI. This is
the capacitance of the ciystaI’s 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. It’s 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.
230659–6
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 ciystaI’s 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 osciIIatoi’s 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. That’s be-
cause foi any Ioad capacitance the osciIIation fiequency
is ceitain to be between the ciystaI’s 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 don’t 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.
230659–7
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 ciystaI’s, and an equivaIent ciicuit that
Iooks just Iike a ciystaI’s (with diffeient paiametei vaI-
ues, howevei).
The fiequency toIeiance of a ceiamic iesonatoi is about
two oideis of magnitude widei than a ciystaI’s, 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.
230659–8
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.
They’II 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 we’II discuss
some of the factois that shouId be consideied.
230659–9
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 what’s avaiIabIe. The ciys-
taI iesistance wiII have some effect on stait-up time and
steady-state ampIitude, but not so much that it can’t 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, they’ie 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 won’t take youi oidei untiI you’ve
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.
Don’t 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
don’t 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 won’t 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
230659–10
A) DRIVING FROM XTAL2
230659–11
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 it’s 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 0C–70C
Hermetically Sealed Package
Mass spectiometei Ieak iate max.
1
c
10
b8
atmos. cc/sec. of heIium
Output Waveform
230659–12
INPUT
HS-100 HS-200 HS-500
35 MHz–20 MHz 20
a
MHz–30 MHz 225 KHz–40 MHz 25 MHz–60 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 MHz–20 MHz 20
a
MHz–30 MHz 225 KHz–40 MHz 25 MHz–60 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 osciIIatoi’s 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.
It’s easy to design osciIIatois that woik. AImost aII of
them do woik, even if the designei isn’t 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 designei’s 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.
230659–13
A) TTL OSCILLATOR
230659–14
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
It’s easiei to design an osciIIatoi ciicuit to opeiate in
the iesonatoi’s 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-
pIifiei’s phase shift is stiongIy dependent on fiequency,
tempeiatuie, VCC, and device sampIe.
230659–15
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 ampIifiei’s phase
shift is Iess ciiticaI, compaied to a seiies iesonant cii-
cuit, and since onIy one inveitei is invoIved theie’s 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
chip’s 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
230659–16
A) 8081-Type Circuit Configuration during Start-Up
(Excludes Input Protection Devices)
230659–17
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 it’s 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
230659–18
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
230659–19
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 they’ie in the right-haIf pIane.
An exponentiaIIy giowing sinusoid is exactIy what is
wanted fiom an osciIIatoi that has just been poweied
up.
230659–20
A) Poles in the Left-Half Plane f(t) E e
bat
sin (0t a i)
230659–21
B) Poles in the Right-Half Plane f(t) E e
aat
sin (0t a i)
230659–22
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
230659–23
230659–24
230659–25
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.
230659–26
230659–27
230659–28
Figure 18 Oscillator Start-Up (358 MHz Ceramic
Resonator from NTK Technical Ceramics)
14
AP-155
230659–29
A) Signal Levels at XTAL1
230659–30
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 don’t 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 it’s 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 doesn’t have to meet the
same VIH and VIL specifications that an exteinaI diiv-
ei wouId have to. That’s 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, it’s 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
.
230659–31
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 don’t 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 5–20 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
230659–32
Figure 21 MCS-48 Oscillator Amplifier
16
AP-155
230659–33
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 that’s 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
doesn’t 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 system’s 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
osciIIatoi’s 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-
ei’s 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-
230659–34
A) When VCC Comes Up Fast Relaxation Oscillations
Start First But Then the Crystal Takes Over
230659–35
B) Weak Pullup (1 MX or More) on XTAL1
Discourages Relaxation Mode
230659–36
C) No Relaxation Oscillations When VCC Comes Up
More Slowly
230659–37
230659–38
230659–39
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.
230659–40
A) Inverter Without Hysteresis Output Leads Input by 180
230659–41
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 isn’t 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
230659–42
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-
tem’s 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 isn’t opeiationaI and
in use, the obseivations aie woithIess.
230659–43
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
isn’t 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 aien’t 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. It’s 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
230659–44
B-2
AP-155
230659–45
B-3
AP-155
230659–46
B-4
AP-155
230659–47
B-5
AP-155
230659–48
B-6
AP-155
230659–49
B-7
AP-155
230659–50
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

Information in this document is provided in connection with Intel products Intel assumes no liability whatsoever including infringement of any patent or copyright for sale and use of Intel products except as provided in Intel’s 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 P O Box 7641 Mt Prospect IL 60056-7641 or call 1-800-879-4683
COPYRIGHT INTEL CORPORATION 1995

OSCILLATORS FOR MICROCONTROLLERS

CONTENTS
INTRODUCTION FEEDBACK OSCILLATORS Loop Gain How Feedback Oscillators Work The Positive Reactance Oscillator QUARTZ CRYSTALS Crystal Parameters Equivalent Circuit Load Capacitance ‘‘Series’’ vs ‘‘Parallel’’ Crystals Equivalent Series Resistance Frequency Tolerance Drive Level CERAMIC RESONATORS Specifications for Ceramic Resonators OSCILLATOR DESIGN CONSIDERATIONS On-Chip Oscillators Crystal Specifications Oscillation Frequency Selection of CX1 and CX2 Placement of Components Clocking Other Chips External Oscillators Gate Oscillators vs Discrete Devices Fundamental vs Overtone Operation ‘‘Series’’ vs ‘‘Parallel’’ Operation

PAGE
1 1 1 2 2 3 3 3 4 4 4 5 5 5 6 6 6 6 7 7 7 7 8 10 11 11

CONTENTS

PAGE
11 11 13 15 16 16 16

CONTENTS
Pre-Production Tests Troubleshooting Oscillator Problems

PAGE
19 20 A-1

MORE ABOUT USING THE ‘‘ON-CHIP’’ OSCILLATORS Oscillator Calculations Start-Up Characteristics Steady-State Characteristics Pin Capacitance MCS -51 Oscillator MCS -48 Oscillator

APPENDIX A QUARTZ AND CERAMIC RESONATOR FORMULAS

APPENDIX B OSCILLATOR ANALYSIS PROGRAM B-1

AP-155 INTRODUCTION Intel’s microcontroller families (MCS -48 MCS -51 and iACX-96) contain a circuit that is commonly referred to as the ‘‘on-chip oscillator’’ The on-chip circuitry is not itself an oscillator of course but an amplifier that is suitable for use as the amplifier part of a feedback oscillator The data sheets and Microcontoller Handbook show how the on-chip amplifier and several off-chip components can be used to design a working oscillator With proper selection of off-chip components these oscillator circuits will perform better than almost any other type of clock oscillator and by almost any criterion of excellence The suggested circuits are simple economical stable and reliable We offer assistance to our customers in selecting suitable off-chip components to work with the on-chip oscillator circuitry It should be noted however that Intel cannot assume the responsibility of writing specifications for the off-chip components of the complete oscillator circuit nor of guaranteeing the performance of the finished design in production anymore than a transistor manufacturer whose data sheets show a number of suggested amplifier circuits can assume responsibility for the operation in production of any of them We are often asked why we don’t publish a list of required crystal or ceramic resonator specifications and recommend values for the other off-chip components This has been done in the past but sometimes with consequences that were not intended Suppose we suggest a maximum crystal resistance of 30 ohms for some given frequency Then your crystal supplier tells you the 30-ohm crystals are going to cost twice as much as 50-ohm crystals Fearing that Intel will not ‘‘guarantee operation’’ with 50-ohm crsytals you order the expensive ones In fact Intel guarantees only what is embodied within an Intel product Besides there is no reason why 50-ohm crystals couldn’t be used if the other off-chip components are suitably adjusted Should we recommend values for the other off-chip components Should we do it for 50-ohm crystals or 30ohm crystals With respect to what should we optimize their selection Should we minimize start-up time or maximize frequency stability In many applications neither start-up time nor frequency stability are particularly critical and our ‘‘recommendations’’ are only restricting your system to unnecessary tolerances It all depends on the application Although we will neither ‘‘specify’’ nor ‘‘recommend’’ specific off-chip components we do offer assistance in these tasks Intel application engineers are available to provide whatever technical assistance may be needed or desired by our customers in designing with Intel products This Application Note is intended to provide such assistance in the design of oscillator circuits for microcontroller systems Its purpose is to describe in a practical manner how oscillators work how crystals and ceramic resonators work (and thus how to spec them) and what the on-chip amplifier looks like electronically and what its operating characteristics are A BASIC program is provided in Appendix II to assist the designer in determining the effects of changing individual parameters Suggestions are provided for establishing a pre-production test program FEEDBACK OSCILLATORS Loop Gain Figure 1 shows an amplifier whose output line goes into some passive network If the input signal to the amplifier is v1 then the output signal from the amplifer is v2 e Av1 and the output signal from the passive network is v3 e bv2 e bAv1 Thus bA is the overall gain from terminal 1 to terminal 3 230659 – 1 Figure 1 Factors in Loop Gain Now connect terminal 1 to terminal 3 so that the signal path forms a loop 1 to 2 to 3 which is also 1 Now we have a feedback loop and the gain factor bA is called the loop gain Gain factors are complex numbers That means they have a magnitude and a phase angle both of which vary 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 45 degrees is commonly written this way 3K45 The number 1 is in complex number notation 1K0 while b 1 is 1K180 By closing the feedback loop in Figure 1 we force the equality v1 e bAv1 This equation has two solutions 1) v1 e 0 2) bA e 1K0 1 .

AP-155 In a given circuit either or both of the solutions may be in effect In the first solution the circuit is quiescent (no output signal) If you’re trying to make an oscillator a no-signal condition is unacceptable There are ways to guarantee that the second solution is the one that will be in effect and that the quiescent condition will be excluded In order for the loop gain to have zero phase angle it is necessary that the feedback element Zf have a positive reactance That is it must be inductive Then the frequency at which the phase angle is zero is approximately the frequency at which Xf e a1 0C How Feedback Oscillators Work A feedback oscillator amplifies its own noise and feeds it back to itself in exactly the right phase at the oscillation frequency to build up and reinforce the desired oscillations Its ability to do that depends on its loop gain First oscillations can occur only at the frequency for which the loop gain has a phase angle of 0 degrees Second build-up of oscillations will occur only if the loop gain exceeds 1 at the frequency Build-up continues until nonlinearities in the circuit reduce the average value of the loop gain to exactly 1 Start-up characteristics depend on the small-signal properties of the circuit specifically the small-signal loop gain Steady-state characteristics of the oscillator depend on the large-signal properties of the circuit such as the transfer curve (output voltage vs input voltage) of the amplifier and the clamping effect of the input protection devices These things will be discussed more fully further on First we will look at the basic operation of the particular oscillator circuit called the ‘‘positive reactance’’ oscillator where Xf is the reactance of Zf (the total Zf being Rf a jXf and C is the series combination of CX1 and CX2 Ce CX1 CX2 CX1 a CX2 In other words Zf and C form a parallel resonant circuit If Zf is an inductor then Xf e 0L and the frequency at which the loop gain has zero phase is the frequency at which 0L e 1 0C or 0e 1 0LC The Positive Reactance Oscillator Figure 2 shows the configuration of the positive reactance oscillator The inverting amplifier working into the impedance of the feedback network produces an output signal that is nominally 180 degrees out of phase with its input The feedback network must provide an additional 180 degrees phase shift such that the overall loop gain has zero (or 360) degrees phase shift at the oscillation frequency Normally Zf is not an inductor but it must still have a positive reactance in order for the circuit to oscillate There are some piezoelectric devices on the market that show a positive reactance and provide a more stable oscillation frequency than an inductor will Quartz crystals can be used where the oscillation frequency is critical and lower cost ceramic resonators can be used where 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 their property of providing a wide range of positive reactance values over a very narrow range of frequencies The reactance will equal 1 0C at some frequency within this range so the oscillation frequency will be within the same range Typically the width of this range is 230659 – 2 Figure 2 Positive Reactance Oscillator 2 .

AP-155 only 0 3% of the nominal frequency of a quartz crystal and about 3% of the nominal frequency of a ceramic resonator With relatively little design effort frequency accuracies of 0 03% or better can be obtained with quartz crystals and 0 3% or better with ceramic resonators QUARTZ CRYSTALS The crystal resonator is a thin slice of quartz sandwiched between two electrodes Electrically the device looks pretty much like a 5 or 6 pF capacitor except that over certain ranges of frequencies the crystal has a positive (i e inductive) reactance The ranges of positive reactance originate in the piezoelectric property of quartz Squeezing the crystal generates an internal E-field The effect is reversible Applying an AC E-field causes the crystal to vibrate At certain vibrational frequencies there is a mechanical resonance As the E-field frequency approaches a frequency of mechanical resonance the measured reactance of the crystal becomes positive as shown in Figure 3 To assure that an oscillator starts in the desired mode on power-up something must be done to suppress the loop gain in the undesired frequency ranges The crystal itself provides some protection against unwanted modes of oscillation too much resistance in that mode for example Additionally junction capacitances in the amplifying devices tend to reduce the gain at higher frequencies and thus may discriminate against unwanted modes In some cases a circuit fix is necessary such as inserting a trap a phase shifter or ferrite beads to kill oscillations in unwanted modes Crystal Parameters Equivalent Circuit Figure 4 shows an equivalent circuit that is used to represent the crystal for circuit analysis The R1-L1-C1 branch is called the motivational arm of the crystal The values of these parameters derive from the mechanical properties of the crystal and are constant for a given mode of vibration Typical values for various nominal frequencies are shown in Table 1 230659 – 4 230659 – 3 Figure 4 Quartz Crystal Symbol and Equivalent Circuit C0 is called the shunt capacitance of the crystal This is the capacitance of the crystal’s electrodes and the mechanical holder If one were to measure the reactance of the crystal at a freuqency far removed from a resonance frequency it is the reactance of this capacitance that would be measured It’s normally 3 to 7 pF Table 1 Typical Crystal Parameters Frequency MHz 2 4 608 11 25 R1 ohms 100 36 19 L1 mH 520 117 8 38 C1 pF 0 012 0 010 0 024 C0 pF 4 29 54 Figure 3 Crystal Reactance vs Frequency Typically there are several ranges of frequencies wherein the reactance of the crystal is positive Each range corresponds to a different mode of vibration in the crystal The main resonsances are the so-called fundamental response and the third and fifth overtone responses The overtone responses shouldn’t be confused with the harmonics of the fundamental They’re not harmonics but different vibrational modes They’re not in general at exact integer multiples of the fundamental frequency There will also be ‘‘spurious’’ responses occurring typically a few hundred KHz above each main response 3 .

AP-155 the antiresonant frequency of the parallel combination of the crystal and CL This frequency is given by fa e 1 2q0L1 C1 (CL a C0) (C1 a CL a C0) The series resonant frequency of the crystal is the frequency at which L1 and C1 are in resonance This frequency is given by fs e 1 2q0L1C1 At this frequency the impedance of the crystal is R1 in parallel with the reactance of C0 For most purposes this impedance is taken to be just R1 since the reactance of C0 is so much larger than R1 These frequency formulas are derived (in Appendix A) from the equivalent circuit of the crystal using the assumptions that the Q of the crystal is extremely high and that the circuit external to the crystal has no effect on the frequency other than to provide the load capacitance CL The latter assumption is not precisely true but it is close enough for present purposes Load Capacitance A crystal oscillator circuit such as the one shown in Figure 2 (redrawn in Figure 5) operates at the frequency for which the crystal is antiresonant (ie parallel-resonant) with the total capacitance across the crystal terminals external to the crystal This total capacitance external to the crystal is called the load capacitance As shown in Figure 5 the load capacitance is given by CL e CX1 CX2 a Cstray CX1 a CX2 ‘‘Series’’ vs ‘‘Parallel’’ Crystals There is no such thing as a ‘‘series cut’’ crystal as opposed to a ‘‘parallel cut’’ crystal There are different cuts of crystal having to do with the parameters of its motional arm in various frequency ranges but there is no special cut for series or parallel operation An oscillator is series resonant if the oscillation frequency is fs of the crystal To operate the crystal at fs the amplifier has to be noninverting When buying a crystal for such an oscillator one does not specify a load capacitance Rather one specifies the loading condition as ‘‘series ’’ If a ‘‘series’’ crystal is put into an oscillator that has an inverting amplifier it will oscillate in parallel resonance with the load capacitance presented to the crystal by the oscillator circuit at a frequency slightly above fs In fact at approximately fa e fs The crystal manufacturer needs to know the value of CL in order to adjust the crystal to the specified frequency 1 a C1 2(CL a C0) J This frequency would typically be about 0 02% above fs Equivalent Series Resistance The ‘‘series resistance’’ often listed on quartz crystal data sheets is the real part of the crystal impedance at the crystal’s calibration frequency This will be R1 if the calibration frequency is the series resonant frequency of the crystal If the crystal is calibrated for parallel resonance with a load capacitance CL the equivalent series resistance will be ESR e R1 230659 – 6 Figure 5 Load Capacitance The adjustment involves putting the crystal in series with the specified CL and then ‘‘trimming’’ the crystal to obtain resonance of the series combination of the crystal and CL at the specified frequency Because of the high Q of the crystal the resonant frequency of the series combination of the crystal and CL is the same as 1 a C0 2 CL J The crystal manufacturer measures this resistance at the calibration frequency during the same operation in which the crystal is adjusted to the calibration frequency 4 .

AP-155 Frequency Tolerance Frequency tolerance as discussed here is not a requirement on the crystal but on the complete oscillator There are two types of frequency tolerances on oscillators frequency acccuracy and frequency stability Frequency accuracy refers to the oscillator’s ability to run at an exact specified frequency Frequency stability refers to the constancy of the oscillation frequency Frequency accuracy requires mainly that the oscillator circuit present to the crystal the same load capacitance that it was adjusted for Frequency stability requires mainly that the load capacitance be constant In most digital applications the accuracy and stability requirements on the oscillator are so wide that it makes very little difference what load capacitance the crystal was adjusted to or what load capacitance the circuit actually presents to the crystal For example if a crystal was calibrated to a load capacitance of 25 pF and is used in a circuit whose actual load capacitance is 50 pF the frequency error on that account would be less than 0 01% In a positive reactance oscillator the crystal only needs to be in the intended response mode for the oscillator to satisfy a 0 5% or better frequency tolerance That’s because for any load capacitance the oscillation frequency is certain to be between the crystal’s resonant and antiresonant frequencies Phase shifts that take place within the amplifier part of the oscillator will also affect frequency accuracy and stability These phase shifts can normally be modeled as an ‘‘output capacitance’’ that in the positive reactance oscillator parallels CX2 The predictability and constancy of this output capacitance over temperature and device sample will be the limiting factor in determining the tolerances that the circuit is capable of holding In a positive reactance oscillator if one assumes the peak voltage across the crystal to be something in the neighborhood of VCC the power dissipation can be approximated 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 Crystals with a standard 1 or 2 mW drive level rating can be used 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 principles as a quartz crsytal Like quartz crsytals they are piezoelectric have a reactance versus frequency curve similar to a crystal’s and an equivalent circuit that looks just like a crystal’s (with different parameter values however) The frequency tolerance of a ceramic resonator is about two orders of magnitude wider than a crystal’s but the ceramic is somewhat cheaper than a crystal It may be noted for comparison that quartz crystals with relaxed tolerances cost about twice as much as ceramic resonators For purposes of clocking a microcontroller the frequency tolerance is often relatively noncritical and the economic consideration becomes the dominant factor Figure 6 shows a graph of impedance magnitude versus frequency for a 3 58 MHz ceramic resonator (Note that Figure 6 is a graph of l Zf l versus frequency where Drive Level Drive level refers to the power dissipation in the crystal There are two reasons for specifying it One is that the parameters in the equivalent circuit are somewhat dependent on the drive level at which the crystal is calibrated The other is that if the application circuit exceeds the test drive level by too much the crystal may be damaged Note that the terms ‘‘test drive level’’ and ‘‘rated drive level’’ both refer to the drive level at which the crystal is calibrated Normally in a microcontroller system neither the frequency tolerances nor the power levels justify much concern for this specification Some crystal manufacturers don’t even require it for microprocessor crystals 5 .

AP-155 as Figure 3 is a graph of Xf versus frequency ) A number of spurious responses are apparent in Figure 6 The manufacturers state that spurious responses are more prevalent in the lower frequency resonators (kHz range) than in the higher frequency units (MHz range) For our purposes only the MHz range ceramics need to be considered frequency and the chip you want it to work with They’ll supply the resonators a circuit diagram showing the positions and values of other external components that may be required and a guarantee that the circuit will work properly at the specified frequency OSCILLATOR DESIGN CONSIDERATIONS Designers of microcontroller systems have a number of options to choose from for clocking the system The main decision is whether to use the ‘‘on-chip’’ oscillator or an external oscillator If the choice is to use the onchip oscillator what kinds of external components are needed to make it operate as advertised If the choice is to use an external oscillator what type of oscillator should it be The decisions have to be based on both economic and technical requirements In this section we’ll discuss some of the factors that should be considered 230659 – 8 Figure 7 Ceramic Resonator Symbol and Equivalent Circuit Figure 7 shows the symbol and equivalent circuit for the ceramic resonator both of which are the same as for the crystal The parameters have different values however as listed in Table 2 Table 2 Typical Ceramic Parameters Frequency MHz 3 58 60 80 11 0 R1 ohms 7 8 7 10 L1 mH 0 113 0 094 0 092 0 057 C1 pF 19 6 83 46 39 C0 pF 140 60 40 30 230659 – 9 Figure 8 Using the ‘‘On-Chip’’ Oscillator Note that the motional arm of the ceramic resonator tends to have less resistance than the quartz crystal and also a vastly reduced L1 C1 ratio This results in the motional arm having a Q (given by (1 R1) 0L1 C1) that is typically two orders of magnitude lower than that of a quartz crystal The lower Q makes for a faster startup of the oscilaltor and for a less closely controlled frequency (meaning that circuitry external to the resonator will have more influence on the frequency than with a quartz crystal) Another major difference is that the shunt capacitance of the ceramic resonator is an order of magnitude higher than C0 of the quartz crystal and more dependent on the frequency of the resonator The implications of these differences are not all obvious but some will be indicated in the section on Oscillator Calculations On-Chip Oscillators In most cases the on-chip amplifier with the appropriate external components provides the most economical solution to the clocking problem Exceptions may arise in severe environments when frequency tolerances are tighter than about 0 01% The external components that need to be added are a positive reactance (normally a crystal or ceramic resonator) and the two capacitors CX1 and CX2 as shown in Figure 8 Crystal Specifications Specifications for an appropriate crystal are not very critical unless the frequency is Any fundamental-mode crystal of medium or better quality can be used Specifications for Ceramic Resonators Ceramic resonators are easier to specify than quartz crystals All the vendor wants to know is the desired 6 .

AP-155 We are often asked what maximum crystal resistance should be specified The best answer to this question is the lower the better but use what’s available The crystal resistance will have some effect on start-up time and steady-state amplitude but not so much that it can’t be compensated for by appropriate selection of the capacitances CX1 and CX2 Similar questions are asked about specifications of load capacitance and shunt capacitance The best advice we can give is to understand what these parameters mean and how they affect the operation of the circuit (that being the purpose of this Application Note) and then decide for yourself if such specifications are meaningful in your application or not Normally they’re not unless your frequency tolerances are tighter than about 0 1% Part of the problem is that crystal manufacturers are accustomed to talking ‘‘ppm’’ tolerances with radio engineers and simply won’t take your order until you’ve filled out their list of specifications It will help if you define your actual frequency tolerance requirements both for yourself and to the crystal manufacturer Don’t pay for 0 003% crystals if your actual frequency tolerance is 1% tor is being used and also on application-specific requirements on start-up time and frequency tolerance Start-up time is sometimes more critical in microcontroller systems than frequency stability because of various reset and initialization requirements Less commonly accuracy of the oscillator frequency is also critical for example when the oscillator is being used as a time base As a general rule fast start-up and stable frequency tend to pull the oscillator design in opposite directions Considerations of both start-up time and frequency stability over temperature suggest that CX1 and CX2 should be about equal and at least 20 pF (But they don’t have to be either ) Increasing the value of these capacitances above some 40 or 50 pF improves frequency stability It also tends to increase the start-up time There is a maximum value (several hundred pF depending on the value of R1 of the quartz or ceramic resonator) above which the oscillator won’t start up at all If the on-chip amplifier is a simple inverter such as in the 8051 the user can select values for CX1 and CX2 between some 20 and 100 pF depending on whether start-up time or frequency stability is the more critical parameter in a specific application If the on-chip amplifier is a Schmitt Trigger such as in the 8048 smaller values of CX1 must be used (5 to 30 pF) in order to prevent the oscillator from running in a relaxation mode Later sections in this Application Note will discuss the effects of varying CX1 and CX2 (as well as other parameters) and will have more to say on their selection Placement of Components Noise glitches arriving at XTAL1 or XTAL2 pins at the wrong time can cause a miscount in the internal clock-generating circuitry These kinds of glitches can be produced through capacitive coupling between the oscillator components and PCB traces carrying digital signals with fast rise and fall times For this reason the oscillator components should be mounted close to the chip and have short direct traces to the XTAL1 XTAL2 and VSS pins Clocking Other Chips Oscillation Frequency The oscillation frequency is determined 99 5% by the crystal and up to about 0 5% by the circuit external to the crystal The on-chip amplifier has little effect on the frequency which is as it should be since the amplifier parameters are temperature and process dependent The influence of the on-chip amplifier on the frequency is by means of its input and output (pin-to-ground) capacitances which parallel CX1 and CX2 and the XTAL1-to-XTAL2 (pin-to-pin) capacitance which parallels the crystal The input and pin-to-pin capacitances are about 7 pF each Internal phase deviations from the nominal 180 can be modeled as an output capacitance of 25 to 30 pF These deviations from the ideal have less effect in the positive reactance oscillator (with the inverting amplifer) than in a comparable series resonant oscillator (with the noninverting amplifier) for two reasons first the effect of the output capacitance is lessened if not swamped by the off-chip capacitor secondly the positive reactance oscillator is less sensitive frequency-wise to such phase errors Selection of CX1 and CX2 Optimal values for the capacitors CX1 and CX2 depend on whether a quartz crystal or ceramic resona- There are times when it would be desirable to use the on-chip oscillator to clock other chips in the system 7 .

AP-155 This can be done if an appropriate buffer is used A TTL buffer puts too much load on the on-chip amplifier for reliable start-up A CMOS buffer (such as the 74HC04) can be used if it’s fast enough and if its VIH and VIL specs are compatible with the available signal amplitudes Circuits such as shown in Figure 9 might also be considered for these types of applications Clock-related signals are available at the TO pin in the MCS-48 products at ALE in the MCS-48 and MCS-51 lines and the iACX-96 controllers provide a CLKOUT signal 230659 – 10 A) DRIVING FROM XTAL2 External Oscillators When technical requirements dictate the use of an external oscillator the external drive requirements for the microcontroller as published in the data sheet must be carefully noted The logic levels are not in general TTLcompatible And each controller has its idiosyncracies in this regard The 8048 for example requires that both XTAL1 and XTAL2 be driven The 8051 can be driven that way but the data sheet suggest the simpler method of grounding XTAL1 and driving XTAL2 For this method the driving source must be capable of sinking some current when XTAL2 is being driven low For the external oscillator itself there are basically two choices ready-made and home-grown 230659 – 11 B) DRIVING FROM XTAL1 Figure 9 Using the On-Chip Oscillator to Drive Other Chips 8 .

AP-155 TTL Crystal Clock Oscillator The HS-100 HS-200 HS-500 all-metal package series of oscillators are TTL compatible fit a DIP layout Standard electrical specifications are shown below Variations are available for special applications 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 g 0 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 3 5 MHz–20 MHz Supply Voltage (VCC) Supply Current (ICC) max 5V g 10% 30 mA 20 a MHz – 30 MHz 5V g 10% 40 mA OUTPUT HS-100 3 5 MHz–20 MHz VOH (Logic ‘‘1’’) VOL (Logic ‘‘0’’) Symmetry TR TF (Rise Fall Time) Output Short Circuit Current Output Load a 2 4V min 1 a 0 4V max 3 HS-200 225 KHz – 4 0 MHz 5V g 10% 85 mA HS-500 25 MHz – 60 MHz 5V g 10% 50 mA HS-200 225 KHz – 4 0 MHz a 2 4V min 1 a 0 4V max 3 a 2 7V min 2 a 0 5V max 4 HS-500 25 MHz – 60 MHz a 2 7V min 2 a 0 5V max 4 20 a MHz – 30 MHz 60 40%5 k 10 ns6 60 40%5 k 5 ns6 55 45%5 k 15 ns6 60 40%5 k 5 ns6 18 mA min 1 to 10 TTL Loads7 40 mA min 1 to 10 TTL Loads8 18 mA min 1 to 10 TTL Loads7 40 mA min 1 to 10 TTL Loads8 CONDITIONS 1I source e b 400 mA max 0 2I0 source e b 1 0 mA max 3I0 sink e 16 0 mA max 41 sink e 20 00 mA max 0 5VO e 1 4V 6(0 4V to 2 4V) 71 6 mA per load 82 0 mA per load Figure 10 Pre-Packaged Oscillator Data Reprinted with the permission of Midland-Ross Corporation 1982 9 .

AP-155 Prepackaged oscillators are available from most crystal manufacturers and have the advantage that the system designer can treat the oscillator as a black box whose performance is guaranteed by people who carry many years of experience in designing and building oscillators Figure 10 shows a typical data sheet for some prepackaged oscillators Oscillators are also available with complementary outputs If the oscillator is to drive the microcontroller directly one will want to make a careful comparison between the external drive requirements in the microcontroller data sheet and the oscillator’s output logic levels and test conditions If oscillator stability is less critical than cost the user may prefer to go with an in-house design Not without some precautions however It’s easy to design oscillators that work Almost all of them do work even if the designer isn’t too clear on why The key point here is that almost all of them work The problems begin when the system goes into production and marginal units commence malfunctioning in the field Most digital designers after all are not very adept at designing oscillators for production Oscillator design is somewhat of a black art with the quality of the finished product being very dependent on the designer’s experience and intuition For that reason the most important consideration in any design is to have an adequate preproduction test program Preproduction tests are discussed later in this Application Note Here we will discuss some of the design options and take a look at some commonly used configurations The feedback resistance has to be quite low however since it must conduct current sourced by the input pin without allowing the DC input voltage to get too far above the DC output voltage For biasing purposes the feedback resistance should not exceed a few k-ohms But shunting the crystal with such a low resistance does not encourage start-up 230659 – 13 A) TTL OSCILLATOR 230659 – 14 B) CMOS OSCILLATOR Figure 11 Commonly Used Gate Oscillators Consequently the configuration in Figure 11A might be suggested By breaking Rf into two parts and ACgrounding the midpoint one achieves the DC feedback required to hold the inverter in its active region but without the negative signal feedback that is in effect telling the circuit not to oscillate However this biasing scheme will increase the start-up time and relaxationtype oscillations are also possible A CMOS inverter such as the 74HC04 might work better in this application since a larger Rf can be used to 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 resistor Rx is often added to the feedback network as shown in Figures 11A and B At higher frequencies a 20 or 30 pF capacitor is sometimes used in the Rx position to compensate for some of the internal propagation delay Reference 1 contains an excellent discussion of gate oscillators and a number of design examples Gate Oscillators versus Discrete Devices Digital systems designers are understandably reluctant to get involved with discrete devices and their peculiarities (biasing techniques etc ) Besides the component count for these circuits tends to be quite a bit higher than what a digital designer is used to seeing for that amount of functionality Nevertheless if there are unusual requirements on the accuracy and stability of the clock frequency it should be noted that discrete device oscillators can be tailored to suit the exact needs of the application and perfected to a level that would be difficult for a gate oscillator to approach In most cases when an external oscillator is needed the designer tends to rely on some form of a gate oscillator A TTL inverter with a resistor connecting the output to the input makes a suitable inverting amplifier The resistor holds the inverter in the transition region between logical high and low so that at least for start-up purposes the inverter is a linear amplifier 10 .

AP-155 Fundamental versus Overtone Operation It’s easier to design an oscillator circuit to operate in the resonator’s fundamental response mode than to design one for overtone operation A quartz crystal whose fundamental response mode covers the desired frequency can be obtained up to some 30 MHz For frequencies above that the crystal might be used in an overtone mode Several problems arise in the design of an overtone oscillator One is to stop the circuit from oscillating in the fundamental mode which is what it would really rather do for a number of reasons involving both the amplifying device and the crystal An additional problem with overtone operation is an increased tendency to spurious oscillations That is because the R1 of various spurious modes is likely to be about the same as R1 of the intended overtone response It may be necessary as suggested in Reference 1 to specify a ‘‘spurious-to-mainresponse’’ resistance ratio to avoid the possibility of trouble Overtone oscillators are not to be taken lightly One would be well advised to consult with an engineer who is knowledgeable in the subject during the design phase of such a circuit Series versus Parallel Operation Series resonant oscillators use noninverting amplifiers To make a noninverting amplifier out of logic gates requires that two inverters be used as shown in Figure 12 This type of circuit tends to be inaccurate and unstable in frequency over variations in temperature and VCC It has a tendency to oscillate at overtones and to oscillate through C0 of the crystal or some stray capacitance rather than as controlled by the mechanical resonance of the crystal The demon in series resonant oscillators is the phase shift in the amplifier The series resonant oscillator wants more than just a ‘‘noninverting’’ amplifier it wants a zero phase-shift amplifier Multistage noninverting amplifiers tend to have a considerably lagging phase shift such that the crystal reactance must be capacitive in order to bring the total phase shift around the feedback loop back up to 0 In this mode a ‘‘12 MHz’’ crystal may be running at 8 or 9 MHz One can put a capacitor in series with the crystal to relieve the crystal of having to produce all of the required phase shift and bring the oscillation frequency closer to fs However to further complicate the situation the amplifier’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’’) use inverting amplifiers A single logic inverter can be used for the amplifier as in Figure 11 The amplifier’s phase shift is less critical compared to a series resonant circuit and since only one inverter is involved there’s less phase error anyway The oscillation frequency is effectively bounded by the resonant and antiresonant frequencies of the crystal itself In addition the feedback network includes capacitors that parallel the input and output terminals of the amplifier thus reducing the effect of unpredictable capacitances at these points MORE ABOUT USING THE ‘‘ON-CHIP’’ OSCILLATORS In this section we will describe the on-chip inverters on selected microcontrollers in some detail and discuss criteria for selecting components to work with them Future data sheets will supplement this discussion with updates and information pertinent to the use of each chip’s oscillator circuitry Oscillator Calculations Oscillator design though aided by theory is still largely an empirical exercise The circuit is inherently nonlinear and the normal analysis parameters vary with instantaneous voltage In addition when dealing with the on-chip circuitry we have FETs being used as resistors resistors being used as interconnects distributed delays input protection devices parasitic junctions and processing variations Consequently oscillator calculations are never very precise They can be useful however if they will at least indicate the effects of variations in the circuit parameters on start-up time oscillation frequency and steady-state amplitude Start-up time for example can be taken as an indication of start-up reliability If preproduction tests indicate a possible start-up problem a relatively inexperienced designer can at least be made aware of what parameter may be causing the marginality and what direction to go in to fix it 11 .

AP-155 230659 –16 A) 8081-Type Circuit Configuration during Start-Up (Excludes Input Protection Devices ) 230659 – 18 Figure 14 Loop Gain versus Frequency (4 608 MHz Crystal) 230659 – 17 B) AC Equivalent of (A) The gain of the feedback network is be Zi Zi a Zf Figure 13 Oscillator Circuit Model Used in Start-Up Calculations The analysis used here is mathematically straightforward but algebraically intractable That means it’s relatively 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 list of parameters A listing of a BASIC program that implements the analysis will be found in Appendix II When the circuit is first powered up and before the oscillations have commenced (and if the oscillations fail to commence) the oscillator can be treated as a small signal linear amplifier with feedback In that case standard small-signal analysis techniques can be used to determine start-up characteristics The circuit model used in this analysis is shown in Figure 13 The circuit approximates that there are no high-frequency effects within the amplifier itslef such that its high-frequency behavior is dominated by the load impedance ZL This is a reasonable approximation for single-stage amplifiers of the type used in 8051-type devices Then the gain of the amplifier as a function of frequency is Ae Av ZL ZL a R0 And the loop gain is bA e Zi Av ZL c Zi a Zf ZL a R0 The impedances ZL Zf and Zi are defined in Figure 13B Figure 14 shows the way the loop gain thus calculated (using typical 8051-type parameters and a 4 608 MHz crystal) varies with frequency The frequency of interest is the one for which the phase of the loop gain is zero The accepted criterion for start-up is that the magnitude of the loop gain must exceed unity at this frequency This is the frequency at which the circuit is in resonance It corresponds very closely with the antiresonant frequency of the motional arm of the crystal in parallel with CL Figure 15 shows the way the loop gain varies with frequency when the parameters of a 3 58 MHz ceramic resonator are used in place of a crystal (the amplifier parameters being typical 8051 as in Figure 14) Note the different frequency scales 12 .

AP-155 230659 – 20 A) Poles in the Left-Half Plane f(t) E e b at sin (0t a i) 230659 – 21 B) Poles in the Right-Half Plane f(t) E e a at sin (0t a i) 230659 – 19 Figure 15 Loop Gain versus Frequency (3 58 MHz Ceramic) 230659 – 22 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 interest in oscillators is 1 (1 b bA) Its poles are at the complex frequencies where bA e 1K0 because that value of bA causes the gain function to go to infinity The oscillator will start up if the real part of the pole frequency is positive More importantly the rate at which it starts up is indicated by how much greater than 0 the real part of the pole frequency is The circuit in Figure 13B can be used to find the pole frequencies of the oscillator gain function All that needs to be done is evaluate the impedances at complex frequencies s a j0 rather than just at 0 and find the value of s a j0 for which bA e 1K0 The larger that value of s is the faster the oscillator will start up Of course other things besides pole frequencies things like the VCC rise time are at work in determining the start-up time But to the extend that the pole frequencies do affect start-up time we can obtain results like those in Figures 17 and 18 To obtain these figures the pole frequencies were computed for various values of capacitance CX from XTAL1 and XTAL2 to ground (thus CX1 e CX2 e CX) Then a ‘‘time constant’’ for start-up was calculat1 ed as Ts e where s is the real part of the pole fre- Start-Up Characteristics It is common in studies of feedback systems to examine the behavior of the closed loop gain as a function of complex frequency s e s a j0 specifically to determine the location of its poles in the complex plane A pole is a point on the complex plane where the gain function goes to infinity Knowledge of its location can be used to predict the response of the system to an input disturbance The way that the response function depends on the location of the poles is shown in Figure 16 Poles in the left-half plane cause the response function to take the form of a damped sinusoid Poles in the right-half plane cause the response function to take the form of an exponentially growing sinusoid In general v(t) E eat sin (0t a i) where a is the real part of the pole frequency Thus if the pole is in the right-half plane a is positive and the sinusoid grows If the pole is in the left-half plane a is negative and the sinusoid is damped The same type of analysis can usefully be applied to oscillators In this case however rather than trying to ensure that the poles are in the left-half plane we would seek to ensure that they’re in the right-half plane An exponentially growing sinusoid is exactly what is wanted from an oscillator that has just been powered up s quency (rad sec) and this time constant is plotted versus CX 13 .

AP-155 As previously mentioned start-up time can be taken as an indication of start-up reliability Start-up problems are normally associated with CX1 and CX2 being too small or too large for a given resonator If the parameters of the resonator are known curves such as in Figure 17 or 18 can be generated to define acceptable ranges of values for these capacitors As the oscillations grow in amplitude they reach a level at which they undergo severe clipping within the amplifier in effect reducing the amplifier gain As the amplifier gain decreases the poles move towards the j0 axis In steady-state the poles are on the j0 axis and the amplitude of the oscillations is constant 230659 – 23 230659 – 24 230659 – 26 230659 – 25 230659 – 27 Figure 17 Oscillator Start-Up (4 608 MHz Crystal from Standard Crystal Corp ) A short time constant means faster start-up A long time constant means slow start-up Observations of actual start-ups are shown in the figures Figure 17 is for a typical 8051 with a 4 608 MHz crystal supplied by Standard Crystal Corp and Figure 18 is for a typical 8051 with a 3 58 MHz ceramic resonator supplied by NTK Technical Ceramics Ltd It can be seen in Figure 17 that for this crystal values of CX between 30 and 50 pF minimize start-up time but that the exact value in this range is not particularly important even if the start-up time itself is critical 230659 – 28 Figure 18 Oscillator Start-Up (3 58 MHz Ceramic Resonator from NTK Technical Ceramics) 14 .

AP-155 and source connected to ground (VSS) as shown in Figure 20 for the 8051 and in Figure 21 for the 8048 Its function is to limit the positive voltage at the gate of the input FET to the avalanche voltage of the drain junction If the input pin is driven below VSS the drain and source of the protection FET interchange roles so its gate is connected to what is now the drain In this condition the device resembles a diode with the anode connected to VSS There is a parasitic pn junction between the ohmic resistor and the substrate In the ROM parts (8015 8048 etc ) the substrate is held at approximately b 3V by the on-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 oscillator is that if the XTAL1 signal goes negative its negative peak is clamped to b VDS of the protection FET in the ROM parts and to about b 0 5V in the EPROM parts These negative voltages on XTAL1 are in this application self-limiting and nondestructive The clamping action does however raise the DC level at XTAL1 which in turn tends to reduce the positive peak at XTAL2 The waveform at XTAL2 resembles a sinusoid riding on a DC level and whose negative peaks are clipped off at zero Since it’s normally the XTAL2 signal that drives the internal clocking circuitry the question naturally arises as to how large this signal must be to reliably do its job In fact the XTAL2 signal doesn’t have to meet the same VIH and VIL specifications that an external driver would have to That’s because as long as the oscillator is working the on-chip amplifier is driving itself through its own 0-to-1 transition region which is very nearly the same as the 0-to-1 transition region in the internal buffer that follows the oscillator If some processing variations move the transition level higher or lower the on-chip amplifier tends to compensate for it by the fact that its own transition level is correspondingly higher or lower (In the 8096 it’s the XTAL1 signal that drives the internal clocking circuitry but the same concept applies ) The main concern about the XTAL2 signal amplitude is an indication of the general health of the oscillator An amplitude of less than about 2 5V peak-to-peak indicates that start-up problems could develop in some units (with low gain) with some crystals (with high R1) The remedy is to either adjust the values of CX1 and or CX2 or use a crystal with a lower R1 The amplitudes at XTAL1 and XTAL2 can be adjusted by changing the ratio of the capacitors from XTAL1 and XTAL2 to ground Increasing the XTAL2 capacitance for example decreases the amplitude at XTAL2 and increases the amplitude at XTAL1 by about the same amount Decreasing both caps increases both amplitudes 15 230659 – 29 A) Signal Levels at XTAL1 230659 – 30 B) Signal Levels at XTAL2 Figure 19 Calculated and Experimental SteadyState Amplitudes vs Bulk Capacitance from XTAL1 and XTAL2 to Ground Steady-State Characteristics Steady-state analysis is greatly complicated by the fact that we are dealing with large signals and nonlinear circuit response The circuit parameters vary with instantaneous voltage and a number of clamping and clipping mechanisms come into play Analyses that take all these things into account are too complicated to be of general use and analyses that don’t take them into account are too inaccurate to justify the effort There is a steady-state analysis in Appendix B that takes some of the complications into account and ignores others Figure 19 shows the way the steady-state amplitudes thus calculated (using typical 8051 parameters and a 4 608 MHz crystal) vary with equal bulk capacitance placed from XTAL1 and XTAL2 to ground Experimental results are shown for comparison The waveform at XTAL1 is a fairly clean sinusoid Its negative peak is normally somewhat below zero at a level which is determined mainly by the input protection circuitry at XTAL1 The input protection circuitry consists of an ohmic resistor and an enhancement-mode FET with the gate .

AP-155 Pin Capacitance Internal pin-to-ground and pin-to-pin capacitances at XTAL1 and XTAL2 will have some effect on the oscillator These capacitances are normally taken to be in the range of 5 to 10 pF but they are extremely difficult to evaluate Any measurement of one such capacitance will necessarily include effects from the others One advantage of the positive reactance oscillator is that the pin-to-ground capacitances are paralleled by external bulk capacitors so a precise determination of their value is unnecessary We would suggest that there is little justification for more precision than to assign them a value of 7 pF (XTAL1-to-ground and XTAL1-toXTAL2) This value is probably not in error by more than 3 or 4 pF The XTAL2-to-ground capacitance is not entirely ‘‘pin capacitance ’’ but more like an ‘‘equivalent output capacitance’’ of some 25 to 30 pF having to include the effect of internal phase delays This value will vary to some extent with temperature processing and frequency MCS -51 Oscillator The on-chip amplifier on the HMOS MCS-51 family is shown in Figure 20 The drain load and feedback ‘‘resistors’’ are seen to be field-effect transistors The drain load FET RD is typically equivalent to about 1K to 3 K-ohms As an amplifier the low frequency voltage gain is normally between b 10 and b 20 and the output resistance is effectively RD used than those which minimize start-up time Larger values than those can be used in applications where increased frequency stability is desired at some sacrifice in start-up time Standard Crystal Corp (Reference 8) studied the use of their crystals with the MCS-51 family using skew sample supplied by Intel They suggest putting 30 pF capacitors from XTAL1 and XTAL2 to ground if the crystal is specified as described in Reference 8 They noted that in that configuration and with crystals thus specified the frequency accuracy was g 0 01% and the frequency stability was g 0 005% and that a frequency accuracy of g 0 005% could be obtained by substituting a 25 pF fixed cap in parallel with a 5 – 20 pF trimmer for one of the 30 pF caps MCS-51 skew samples have also been supplied to a number of ceramic resonator manufacturers for characterization with their products These companies should be contacted for application information on their products In general however ceramics tend to want somewhat larger values for CX1 and CX2 than quartz crystals do As shown in Figure 18 they start up a lot faster that way In some application the actual frequency tolerance required is only 1% or so the user being concerned mainly that the circuit will oscillate In that case CX1 and CX2 can be selected rather freely in the range of 20 to 80 pF As you can see ‘‘best’’ values for these components and their tolerances are strongly dependent on the application and its requirements In any case their suitability should be verified by environmental testing before the design is submitted to production MCS -48 Oscillator The NMOS and HMOS MCS-48 oscillator is shown in Figure 21 It differs from the 8051 in that its inverting 230659 – 31 Figure 20 MCS -51 Oscillator Amplifier The 80151 oscillator is normally used with equal bulk capacitors placed externally from XTAL1 to ground and from XTAL2 to ground To determine a reasonable value of capacitance to use in these positions given a crystal of ceramic resonator of known parameters one can use the BASIC analysis in Appendix II to generate curves such as in Figures 17 and 18 This procedure will define a range of values that will minimize start-up time We don’t suggest that smaller values be 16 230659 – 32 Figure 21 MCS -48 Oscillator Amplifier .

AP-155 more slowly but it eventually takes over and dominates the operation of the cirucit This is shown in Figure 23A Due to processing variations some units seem to have a harder time coming out of the relaxation mode particularly at low temperatures In some cases the resonator oscillations may fail entirely and leave the device in the relaxation mode Most units will stick in the relaxation mode at any temperature if CX1 is larger than about 50 pF Therefore CX1 should be chosen with some care particularly if the system must operate at lower temperatures 230659 – 33 Figure 22 Schmitt Trigger Characteristic amplifier is a Schmitt Trigger This configuration was chosen to prevent crosstalk from the TO pin which is adjacent to the XTAL1 pin All Schmitt Trigger circuits exhibit a hysteresis effect as shown in Figure 22 The hysteresis is what makes it less sensitive to noise The same hysteresis allows any Schmitt Trigger to be used as a relaxation oscillator All you have to do is connect a resistor from output to input and a capacitor from input to ground and the circuit oscillates in a relaxation mode as follows If the Schmitt Trigger output is at a logic high the capacitor commences charging through the feedback resistor When the capacitor voltage reaches the upper trigger point (UTP) the Schmitt Trigger output switches to a logic low and the capacitor commences discharging through the same resistor When the capacitor voltage reaches the lower trigger point (LTP) the Schmitt Trigger output switches to a logic high again and the sequence repeats The oscillation frequency is determined by the RC time constant and the hysteresis voltage UTP-LTP The 8048 can oscillate in this mode It has an internal feedback resistor All that’s needed is an external capacitor from XTAL1 to ground In fact if a smaller external feedback resistor is added an 8048 system could be designed to run in this mode Do it at your own risk This mode of operation is not tested specified documented or encouraged in any way by Intel for the 8048 Future steppings of the device might have a different type of inverting amplifier (one more like the 8051) The CHMOS members of the MCS-48 family do not 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-chip components needed to complete the oscillator circuit When an 8048 is powered up if VCC has a short rise time the relaxation mode starts first The frequency is normally about 50 KHz The resonator mode builds One method that has proven effective in all units to b 40 C is to put 5 pF from XTAL1 to ground and 20 pF from XTAL2 to ground Unfortunately while this method does discourage the relaxation mode it is not an optimal choice for the resonator mode For one thing it does not swamp the pin capacitance Also it makes for a rather high signal level at XTAL1 (8 or 9 volts peak-to-peak) The question arises as to whether that level of signal at XTLA1 might damage the chip Not to worry The negative peaks are self-limiting and nondestructive The positive peaks could conceivably damage the oxide but in 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 as the devices shrink in size For an extra margin of safety the HMOS II chips (eg 8048AH) have an internal diode clamp at XTAL1 to VCC In reality CX1 doesn’t have to be quite so small to avoid relaxation oscillations if the minimum operating temperature is not b 40 C For less severe temperature requirements values of capacitance selected in much the same way as for an 8051 can be used The circuit should be tested however at the system’s lowest temperature limit Additional security against relaxation oscillations can be obtained by putting a 1M-ohm (or larger) resistor from XTAL1 to VCC Pulling up the XTAL1 pin this way seems to discourage relaxation oscillations as effectively as any other method (Figure 23B) Another thing that discourages relaxation oscillations is low VCC The resonator mode on the other hand is much less sensitive to VCC Thus if VCC comes up relatively slowly (several milliseconds rise time) the resonator mode is normally up and running before the relaxation mode starts (in fact before VCC has even reached operating specs) This is shown in Figure 23C A secondary effect of the hysteresis is a shift in the oscillation frequency At low frequencies the output signal from an inverter without hysteresis leads (or lags) the input by 180 degrees The hysteresis in a Schmitt Trigger however causes the output to lead the 17 .

AP-155 input by less than 180 degrees (or lag by more than 180 degrees) by an amount that depends on the signal amplitude as shown in Figure 24 At higher frequencies there are additional phase shifts due to the various reactances in the circuit but the phase shift due to the hysteresis is still present Since the total phase shift in the oscillator’s loop gain is necessarily 0 or 360 degrees it is apparent that as the oscillations build up the frequency has to change to allow the reactances to compensate for the hysteresis In normal operation this additional phase shift due to hysteresis does not exceed a few degrees and the resulting frequency shift is negligible Kyocera a ceramic resonator manufacturer studied the use of some of their resonators (at 6 0 MHz 8 0 MHz and 11 0 MHz) with the 8049H Their conclusion as to the value of capacitance to use at XTAL1 and XTAL2 was that 33 pF is appropriate at all three frequencies One should probably follow the manufacturer’s recommendations in this matter since they will guarantee operation Whether one should accept these recommendations and guarantees without further testing is however another matter Not all users have found the recommendations to be without occasional problems If you run into diffi- 230659 – 34 A) When VCC Comes Up Fast Relaxation Oscillations Start First But Then the Crystal Takes Over 230659 – 37 230659 – 35 B) Weak Pullup (1 MX or More) on XTAL1 Discourages Relaxation Mode 230659 – 38 230659 – 36 C) No Relaxation Oscillations When VCC Comes Up More Slowly 230659 – 39 Figure 23 Relaxation Oscillations in the 8048 18 .

AP-155 culties using their recommendations both Intel and the ceramic resonator manufacturer want to know about it It is to their interest and ours that such problems be resolved It will be helpful to build a test jig that will allow the oscillator circuit to be tested independently of the rest of the system Both start-up and steady-state characteristics should be tested Figure 25 shows the circuit that A) Software for Oscillator Test SOURCE ORG 0000 H JMP ORG 000B H CPL RETI ORG 0001BH CPL DJNZ CPL RETI START MOV MOV MOV START T1 TIMER 0 INTERRUPT TOGGLE T1 TIMER 1 INTERRUPT TOGGLE CRO TRIGGER DELAY TOGGLE VCC CONTROL P1 1 P2 $ P1 0 230659 – 40 A) Inverter Without Hysteresis Output Leads Input by 180 MOV MOV JMP END TH1 OFAH TIMER 1 RELOAD VALUE TL1 OFAH START TL1 AT RELOAD VALUE TMOD 61H TIMER 1 TO COUNTER AUTO RELOAD TIMER 0 TO TIMER 16-BIT IE BAH ENABLE TIMER INTERRUPTS ONLY TCON 50H TURN ON BOTH TIMERS $ IDLE 230659 – 41 B) 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 ready for production until it has proven its ability to function acceptably well under worst-case environmental conditions and with parameters at their worst-case tolerance limits Unexpected temperature effects in parts that may already be near their tolerance limits can prevent start-up of an oscillator that works perfectly well on the bench For example designers often overlook temperature effects in ceramic capacitors (Some ceramics are down to 50% of their room-temperature values at b 20 C and a 60 C) The problem here isn’t just one of frequency stability but also involves start-up time and steady-state amplitude There may also be temperature effects in the resonator and amplifier 230659 – 42 B) Oscillator Test Circuit (Shown for 8051 Test) Figure 25 Oscillator Test Circuit and Software 19 .

AP-155 was used to obtain the oscillator start-up photographs in this Application Note This circuit or a modified version of it would make a convenient test vehicle The oscillator and its relevant components can be physically separated from the control circuitry and placed in a temperature chamber Start-up should be observed under a variety of conditions including low VCC and using slow and fast VCC rise times The oscillator should not be reluctant to start up even when VCC is below its spec value for the rest of the chip (The rest of the chip may not function but the oscillator should work ) It should also be verified that start-up occurs when the resonator has more than its upper tolerance limit of series resistance (Put some resistance in series with the resonator for this test ) The bulk capacitors from XTAL1 and XTAL2 to ground should also be varied to their tolerance limits The same circuit with appropriate changes in the software to lengthen the ‘‘on’’ time can be used to test the steady-state characteristics of the oscillator specifically the frequency frequency stability and amplitudes at XTAL1 and XTAL2 As previously noted the voltage swings at these pins are not critical but they should be checked at the system’s temperature limits to ensure that they are in good health Observing these signals necessarily changes them somewhat Observing the signal at XTAL2 requires that the capacitor at that pin be reduced to account for the oscilloscope probe capacitance Observing the signal at XTAL1 requires the same consideration plus a blocking capacitor (switch the oscilloscope input to AC) so as to not disturb the DC level at that pin Alternatively a MOSFET buffer such as the one shown in Figure 26 can be used It should be verified by direct measurement that the ground clip on the scope probe is ohmically connected to the scope chassis (probes are incredibly fragile in this respect) and the observations should be made with the ground clip on the VSS pin or very close to it If the probe shield isn’t operational and in use the observations are worthless Frequency checks should be made with only the oscillator circuitry connected to XTAL1 and XTAL2 The ALE frequency can be counted and the oscillator frequency derived from that In systems where the frequency tolerance is only ‘‘nominal ’’ the frequency should still be checked to ascertain that the oscillator isn’t running in a spurious resonance or relaxation mode Switching VCC off and on again repeatedly will help reveal a tendency to go into unwanted modes of oscillation The operation of the oscillator should then be verified under actual system running conditions By this stage one will be able to have some confidence that the basic selection of components for the oscillator itself is suitable so if the oscillator appears to malfunction in the system the fault is not in the selection of these components Troubleshooting Oscillator Problems The first thing to consider in case of difficulty is that between the test jig and the actual application there may be significant differences in stray capacitances particularly if the actual application is on a multi-layer board Noise glitches that aren’t present in the test jig but are in the application board are another possibility Capacitive coupling between the oscillator circuitry and other signal has already been mentioned as a source of miscounts in the internal clocking circuitry Inductive coupling is also possible if there are strong currents nearby These problems are a function of the PCB layout Surrounding the oscillator components with ‘‘quiet’’ traces (VCC and ground for example) will alleviate capacitive coupling to signals that have fast transition times To minimize inductive coupling the PCB layout should minimize the areas of the loops formed by the oscillator components These are the loops that should be 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 CX1 and CX2 eventually connect up to the VSS pin only after looping around the farthest ends of the board Not good Finally it should not be overlooked that software problems sometimes imitate the symptoms of a slow-starting oscillator or incorrect frequency Never underestimate the perversity of a software problem 230659 – 43 Figure 26 MOSFET Buffer for Observing Oscillator Signals 20 .

AP-155 REFERENCES 1 Frerking M E Crystal Oscillator Design and Temperature Compensation Van Nostrand Reinhold 1978 2 Bottom V ‘‘The Crystal Unit as a Circuit Component ’’ Ch 7 Introduction to Quartz Crystal Unit Design Van Nostrand Reinhold 1982 3 Parzen B Design of Crystal and Other Harmonic Oscillators John Wiley Sons 1983 4 Holmbeck J D ‘‘Frequency Tolerance Limitations with Logic Gate Clock Oscillators 31st Annual Frequency Control Symposium June 1977 5 Roberge J K ‘‘Nonlinear Systems ’’ Ch 6 Operational Amplifiers Theory and Practice Wiley 1975 6 Eaton S S Timekeeping Advances Through COS MOS Technology RCA Application Note ICAN6086 7 Eaton S S Micropower Crystal-Controlled Oscillator Design Using RCA COS MOS Inverters RCA Application Note ICAN-6539 8 Fisher J B Crystal Specifications for the Intel 8031 8051 8751 Microcontrollers Standard Crystal Corp Design Data Note 2F 9 Murata Mfg Co Ltd ‘‘Ceralock’’ Application Manual Ceramic Resonator 10 Kyoto Ceramic Co Ltd Adaptability Test Between Intel 8049H and Kyocera Ceramic Resonators 11 Kyoto Ceramic Co Ltd Technical Data on Ceramic Resonator Model KBR-6 0M KBR-8 0M KBR11 0M Application for 8051 (Intel) 12 NTK Technical Ceramic Division NGK Spark Plug Co Ltd NTKK Ceramic Resonator Manual 21 .

.

AP-155 APPENDIX A QUARTZ AND CERAMIC RESONATOR FORMULAS Based on the equivalent circuit of the crystal the impedance of the crystal is ZXTAL e (R1 a j0L1 a 1 j0C1) (1 j0C0) R1 a j0L1 a 1 j0C1 a 1 j0C0 iXTAL l CL e arctan 0R1 C1 1 b 02L1C1 0R1 C T q b 1 b 02L1C T 2 b arctan After some algebraic manipulation this calculation can be written in the form ZXTAL e 1 1 b 02L1C1 a j0R1C1  j0(C1 a C0) 1 b 02L1CT a j0R1CT iXTAL a CL e arctan 0R1C T 1 b 02L1C T 0R1 CT q b 1 b 02L1CT 2 b arctan where CT is the capacitance of C1 in series with C0 CT e C1C0 C1 a C0 The resonant (‘‘series resonant’’) frequency is the frequency at which the phase angle is zero and the impedance is low The antiresonant (‘‘parallel resonant’’) frequency is the frequency at which the phase angle is zero and the impedance is high Each of the above i-expressions contains two arctan functions Setting the denominator of the argument of the first arctan function to zero gives (approximately) the ‘‘series resonant’’ frequency for that configuration Setting the denominator of the argument of the second arctan function to zero gives (approximately) the ‘‘parallel resonant’’ frequency for that configuration For example the resonant frequency of the crystal is the frequency at which 1 b 02L1C1 e 0 The impedance of the crystal in parallel with an external load capacitance CL is the same expression but with C0 a CL substituted for C0 1 1 b 02L1C1 a j0R1C1 ZXTAL ll CL e  j0(C1 a C0 a CL) 1 b 02L1C T a j0R1C T where C T is the capacitance of C1 in series with (C0 a CL) CTe C1(C0 a CL) C1 a C0 a CL The impedance of the crystal in series with the load capacitance is ZXTAL a CL e ZXTAL a 1 j0CL Thus 0s e 1 0L1C1 or fs e 1 2q0L1C1 e CL a C1 a C0 1 b 02L1C T a j0R1C T  j0CL (C1 a C0) 1 b 02L1CT a j0R1CT where CT and C T are as defined above The phase angles of these impedances are readily obtained from the impedance expressions themselves iXTAL e arctan 0R1 C1 1 b 02L1C1 0R1 CT q b 1 b 02L1CT 2 b arctan A-1 .

AP-155 It will be noted that the series resonant frequency of the ‘‘XTAL a CL’’ configuration (crystal in series with CL) is the same as the parallel resonant frequency of the ‘’XTAL ll CL’’ configuration (crystal in parallel with CL) This is the frequency at which 1 b 02L1C T e 0 Equivalent Series Resistance ESR is the real part of ZXTAL at the oscillation frequency The oscillation frequency is the parallel resonant frequency of the ‘‘XTAL ll CL’’ configuration (which is the same as the series resonant frequency of the ‘‘XTAL a CL’’ configuration) Substituting this frequency into the ZXTAL expression yields after some algebraic manipulation C0 a CL 2 CL ESR e C0 a CL 2 2 1 a 0 2C 1 CL R1 Thus 0a e 1 0L1C T or 1 fa e 2q0L1C T  This fact is used by crystal manufacturers in the process of calibrating a crystal to a specified load capacitance By subtracting the resonant frequency of the crystal from its antiresonant frequency one can calculate the range of frequencies over which the crystal reactance is positive fa b fs e fs(01 a C1 C0 b 1 fs  J J j R1  C0 2 1a CL J Drive Level The power dissipated by the crystal is I 2 R1 where I1 is 1 the RMS current in the motional arm of the crystal This current is given by Vx l Z1 l where Vx is the RMS voltage across the crystal and l Z1 l is the magnitude of the impedance of the motional arm At the oscillation frequency the motional arm is a positive (inductive) reactance in parallel resonance with (C0 a CL) Therefore l Z1 l is approximately equal to the magnitude of the reactance of (C0 a CL)  2C J C1 0 Given typical values for C1 and C0 this range can hardly exceed 0 5% of fs Unless the inverting amplifier in the positive reactance oscillator is doing something very strange indeed the oscillation frequency is bound to be accurate to that percentage whether the crystal was calibrated for series operation or to any unspecified load capacitance lZ1l e 2qf(C0 a CL) where f is the oscillation frequency Then P e I 2 R1 e 1 1  lZ l J R Vx 1 2 1 e 2qf (C0 a CL) Vx 2 R1 The waveform of the voltage across the crystal (XTAL1 to XTAL2) is approximately sinusoidal If its peak value is VCC then Vx is VCC 02 Therefore P e 2R1 qf (C0 a CL) VCC 2 A-2 .

AP-155 APPENDIX B OSCILLATOR ANALYSIS PROGRAM The program is written in BASIC BASIC is excruciatingly slow but it has some advantages For one thing more people know BASIC than FORTRAN In addition a BASIC program is easy to develop modify and ‘‘fiddle around’’ with Another important advantage is that a BASIC program can run on practically any small computer system Its slowness is a problem however For example the routine which calculates the ‘‘start-up time constant’’ discussed in the text may take several hours to complete A person who finds this program useful may prefer to convert it to FORTAN if the facilities are available It should be noted that the analysis ignores a number of important items such as high-frequency effects in the on-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 a reasonable degree by adding an ‘‘output capacitance’’ of about 20 pF to the circuit model (i e in parallel with CX2) as described below Notes on Using the Program The program asks the user to input values for various circuit parameters First the crystal (or ceramic resonator) parameters are asked for These are R1 L1 C1 and C0 The manufacturer can supply these values for selected samples To obtain any kind of correlation between calculation and experiment the values of these parameters must be known for the specific sample in the test circuit The value that should be entered for C0 is the C0 of the crystal itself plus an estimated 7 pF to account for the XTAL1-to-XTAL2 pin capacitance plus any other stray capacitance paralleling the crystal that the user may feel is significant enough to be included Then the program asks for the values of the XTAL1-toground and XTAL2-to-ground capacitances For CXTAL1 enter the value of the externally connected bulk capacitor plus an estimated 7 pF for pin capacitance For CXTAL2 enter the value of the externally connected bulk capacitor plus an estimated 7 pF for pin capacitance plus about 20 pF to simulate high-frequency roll-off and phase shifts in the on-chip circuitry Next the program asks for values for the small-signal parameters of the on-chip amplifier Typically for the 8051 8751 Amplifier Gain Magnitude e 15 e 2300 KX Feedback Resistance e 2 KX Output Resistance The same values can be used for MCS-48 (NMOS and HMOS) devices but they are difficult to verify because the Schmitt Trigger does not lend itself to small-signal measurements Limitations of the Program The program was developed with specific reference to 8051-type oscillator circuitry That means the on-chip amplifier is a simple inverter and not a Schmitt Trigger The 8096 the 80C51 the 80C48 and 80C49 all have simple inverters The 8096 oscillator is almost identical to the 8051 differing mainly in the input protection circuitry The CHMOS amplifiers have somewhat different parameters (higher gain for example) and different transition levels than the 8051 The MCS-48 family is specifically included in the program only to the extent that the input-output curve used in the steady-state analysis is that of a Schmitt Trigger if the user identifies the device under analysis as an MCS-48 device The analysis does not include the voltage dependent phase shift of the Schmitt Trigger The clamping action of the input protection circuitry is important in determining the steady-state amplitudes The steady-state routine accounts for it by setting the negative peak of the XTAL1 signal at a level which depends on the amplitude of the XTAL1 signal in accordance with experimental observations It’s an exercise in curve-fitting A user may find a different type of curve works better Later steppings of the chips may behave differently in this respect having somewhat different types of input protection circuitry B-1 .

AP-155 230659 – 44 B-2 .

AP-155 230659 – 45 B-3 .

AP-155 230659 – 46 B-4 .

AP-155 230659 – 47 B-5 .

AP-155 230659 – 48 B-6 .

AP-155 230659 – 49 B-7 .

AP-155 230659 – 50 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 (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 .

You're Reading a Free Preview

Descarga
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->