Searching \ for 'Crystals and microcontrollers' in subject line. ()
Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=crystals+microcontrollers
Search entire site for: 'Crystals and microcontrollers'.

Truncated match.
'Crystals and microcontrollers'
2000\02\27@021942 by

What is the difference in using just a crystal on the pic or using it with
the 2 capacitors?
As usual, a quick look at the 200 page data sheets for the 16F876 didn't
produce an obvious answer so I assume someone here knows.

I have been running with just a bare 4MHz crystal on osc1/osc2 and no
capacitors, and someone told me that's fine and capacitors would probably
cause trouble if anything for me since they have to be properly calculated
etc.  He said he is putting capacitors on his circuits though because his
will be going outside and he wanted some stability.

So how does one decide?

Also what's the difference between crystal types?  I am using "general
purpose microcontroller" parts but there's those other series or parallel or
other specific types.  Again how would I know what to choose?

Hi Lorick,

The purpose in using capacitors with a crystal is two fold:

#1) The oscillator consists of the inverter inside the PIC, the crystal,
and external capacitance (both parasitic and actual capacitors). The total
phase shift around the loop (from one inverter terminal, through the
inverter, across the crystal/capacitor network, back into the inverter) has
to be either 0 or 360 (the same thing) degrees for oscillation. The
capacitance adjusts the phase shift of the network to allow oscillation.

#2) Crystals are designed to "see" a certain type of load. Most are
designed to see a certain, specified capacitance, referred to as the Load
Capacitance. In order for your crystal to operate at the correct frequency,
it must see this value of capacitance at its terminals.

The total value of capacitance at the crystal's terminals is (Ca+Cp)/2,
where Ca is the actual value of capacitor, per pin, that you place at the
OSC1 and OSC2 pins, and Cp is the per pin parasitic capacitance. Cp is
will need to put 32pF capacitors at both OSC1 and OSC2: (36+8)/2 = 40pF
This is one of the very useful and neat things that I learned from the
PICLIST :-)

In your case, it probably "just works" because the parasitic capacitance is
enough to satisfy #1 and your oscillator is probably running with perhaps
0.1% frequency error, a few kHz with an xtal in the several MHz range.

Your question is almost a FAQ, and every time it comes up, there is always
a debate about the last point that you make: what is the difference between
"series" and "parallel" crystals. Here is the usual consensus: there is no
difference. Every crystal has a parallel resonant frequency and a series
resonant frequency. They are separated by a few kHz and which one you get
depends on what value of external capacitance you place on the crystal (I
think it ultimately has to do with #2 and exactly what frequency gives the
0 deg phase shift through the whole network). Crystals sold as "parallel"
crystals achieve their rated frequency when loaded with the recommended
load capacitance. Those sold as "series" crystals acheive their rated
frequency when operated in series resonant mode (determined by the external
capacitance, but I'm not sure how to figure this one out numerically,since
it isn't specified for xtals sold as "series").

If you need a rough frequency standard, just use the (Ca+Cp)/2 formula. If
you need strict accuracy, you will have to use a trimmer cap for one of the
caps and use it to adjust the frequency.

Sean

At 02:21 AM 2/27/00 -0500, you wrote:
{Quote hidden}

| Sean Breheny
| Electrical Engineering Student
\--------------=----------------
Save lives, please look at http://www.all.org
Personal page: http://www.people.cornell.edu/pages/shb7
shb7cornell.edu ICQ #: 3329174

The requirement for capacitors on crystals when used with any microprocessor
varies with the circuit inside the chip. Some chips require capacitors to
oscillate, others dont. Some crystals require capacitors to oscillate, others
dont. The differences in the gain of the inverter chip inside the micro, and the
effective impedance of the crystal all combine to make life a bit of a black art
in determining just what caps are required.

having said that, most chip manufacturers have got themselves organised to
design the oscillator portion of the chip so it is pretty laid back about the
crystal characteristics, and most crystal manufacturers now make crystals which
are well enough defined in their characteristics to always oscillate with any
micro. If you find a crystal that does not work, then it is most likely at an
extreme of the characteristic of either the micro or the crystal. It can
sometimes be made to oscillate by fitting one or two capacitors to shift the
oscillation frequency enough to change the effective impedance of the crystal,
thereby getting enough phase shift around the loop.

It is possible to change the frequency of oscillation using capacitors, but this
would really only be necessary if you were wanting to use the micro for a clock,
as in the type of clock displaying the time. If you were wishing to time stamp
data collection functions I suspect you would probably find it more cost
effective to have a separate dedicated clock chip you could read, or have a
radio locked receiver listening to one of the 60khz time stations. Does anyone
know where I can get info on the UK Rugby 60khz time transmissions used by the

To change the frequency of a series tuned crystal, the normal method is to have
both a capacitor and an inductor, which form a series resonant circuit at the
frequency of interest. By varying either the capacitor or the inductor, the
crystal sees a change in the impedance in series with it. If the series resonant
circuit is tuned so that at the nominal series frequency of the crystal, the
circuit looks inductive, then the crystal will operate at a frequency where the
crystal has a matching capacitive impedance. If the resonant circuit is tuned to
look capacitive, then the crystal will operate at a frequency where it will look
inductive.

There are various problems to using a crystal as a series tuned device, so in
the sort of circuit used for micros this is not usually done. Unless the crystal
is very carefully made, it is highly likely to try and run at an odd multiple of
its fundamental frequency, and so this almost always requires a tuned circuit
somewhere around the oscillator at the desired frequency. This is generally done
as a series resonant circuit in series with the crystal, which has the advantage
of frequency trimming as mentioned above. Some notable oscillator units that did
this sort of thing in the past were the original oscillator block for the 8080
micro, and I think the one for the 8086 also.

In short I just about guarantee that a one chip micro, or any chip with an
onboard oscillator is using a parallel resonant crystal.

From: "Alan Pearce" <A.B.PearceRL.AC.UK>

> effective to have a separate dedicated clock chip you could read, or
have a
> radio locked receiver listening to one of the 60khz time stations.
Does anyone
> know where I can get info on the UK Rugby 60khz time transmissions
used by the

Yes, there's a PDF with the full format at
http://www.npl.co.uk/npl/ctm/msf.html.

Cheers
Andy.

.

On Sun, 27 Feb 2000 02:21:24 -0500, you wrote:

>What is the difference in using just a crystal on the pic or using it with
>the 2 capacitors?
>As usual, a quick look at the 200 page data sheets for the 16F876 didn't
>produce an obvious answer so I assume someone here knows.
>
>I have been running with just a bare 4MHz crystal on osc1/osc2 and no
>capacitors, and someone told me that's fine and capacitors would probably
>cause trouble if anything for me since they have to be properly calculated
>etc.  He said he is putting capacitors on his circuits though because his
>will be going outside and he wanted some stability.
>
>So how does one decide?
>
>Also what's the difference between crystal types?  I am using "general
>purpose microcontroller" parts but there's those other series or parallel or
>other specific types.  Again how would I know what to choose?
You should always use caps. There is a risk of unreliable operation,
or operation at the wrong frequency without them. It could be that
your PCB has enough stray capacitance to make it work.
Check out Microchip App note AN588 for everything you ever wanted to
know about crystals, but don't be put off by all the detail - cap
values aren't usually too critical in most apps  -15 to 33 pf is
usually fine.

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...