Searching \ for '[PIC]: cap sizes to use with 20Mhz Crystal' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'cap sizes to use with 20Mhz Crystal'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: cap sizes to use with 20Mhz Crystal'
2002\04\14@044253 by James Fitzsimons

flavicon
face
Hi all,
Sorry for the newbie question, but I couldn't find the info in the
datasheet.

What size caps should I be using with a 20Mhz crystal for a 16F628?

Thanks all,
James Fitzsimons

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\04\14@072048 by kees zeehuisen

flavicon
face
Hello James,

Depending on the Xtal 22pF on both sides to ground should do it.

Kees

----- Oorspronkelijk bericht -----
Van: "James Fitzsimons" <spam_OUTjamesfitTakeThisOuTspamPARADISE.NET.NZ>
Aan: <.....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU>
Verzonden: zondag 14 april 2002 10:43
Onderwerp: [PIC]: cap sizes to use with 20Mhz Crystal


{Quote hidden}

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\04\14@074201 by Code

flavicon
face
20 - 30pf ceramics will do.

Regards,
Tan Chun Chiek
----- Original Message -----
From: "James Fitzsimons" <jamesfitspamKILLspamPARADISE.NET.NZ>
To: <.....PICLISTKILLspamspam.....MITVMA.MIT.EDU>
Sent: Sunday, April 14, 2002 4:43 PM
Subject: [PIC]: cap sizes to use with 20Mhz Crystal


{Quote hidden}

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\04\14@100909 by Olin Lathrop

face picon face
> Sorry for the newbie question, but I couldn't find the info in the
> datasheet.

The oscillator is discussed in the "Special Features of the CPU" section.

> What size caps should I be using with a 20Mhz crystal for a 16F628?

22pF works most of the time.  Of course this depends on your particular
crystal.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\04\14@102502 by Sid Weaver

picon face
For the "newbie" who iniated this question:

You can get 20MHz crystals with the caps built in at Rentron.com.  Very
small, 3-legged, inexpensive.

Sid
Port Richey, FL

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\04\14@113133 by Glen Wiley

flavicon
face
Note that the datasheet for the respective crystal should be
consulted.  I thought that I understood that the capacitance between
the crystal and the PIC should be matched carefully with the crystal
if you need the frequency of the oscillator to be accurate.

On Sun, Apr 14, 2002 at 08:43:48PM +1200, James Fitzsimons wrote:
{Quote hidden}

--
Glen Wiley

Those who can - code.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\04\14@121501 by Spehro Pefhany

picon face
At 11:33 AM 4/14/02 -0400, you wrote:
>Note that the datasheet for the respective crystal should be
>consulted.  I thought that I understood that the capacitance between
>the crystal and the PIC should be matched carefully with the crystal
>if you need the frequency of the oscillator to be accurate.

The more you know about analog electronics, the less straightforward
the answers are. Despite the apparent simplicity, the oscillator
circuit is a rather complex thing to analyze, especially when you
take into account the possibility of overdriving some of the modern
crystals that have maximum drive powers << 1mW.

You are correct, that the load capacitance should be matched to the
crystal for optimum accuracy. Generally you'd use about double
the specified capacitance minus maybe 5pF. So with a crystal that
calls for 20pF parallel load, you'd use about 33pF (the two
caps are effectively in series, and there is a bit of capacitance
in the input and output of the amplifier on the PIC).

The other requirements are that the circuit not overdrive the
crystal and that it actually oscillate(!) (including starting,
even if Vdd is low and the temperature is low). Those requirements may
call for different values, a series resistor, or for asymmetrical
capacitor values. It's dependent on the crystal parameters, the
transconductance of the amplifier in the PIC, and how those
parameters vary from unit to unit and over temperature.

If you want more information, do a search on "Pierce oscillator".
When I first analyzed this many years ago, it bothered me that
the information published by the crystal and chip manufacturers,
taken together, is NOT sufficient to guarantee proper operation
and starting of the oscillator (for all units, over temperature).
It still bothers me, and there are occasional problems.

BTW, the "three legged" devices that someone mentioned are ceramic
resonators, not crystals. They are available with or without
capacitors (without, they have only 2 leads obviously). They have
a much poorer accuracy and much lower "Q" than crystals,
so they tend to start rapidly but be of much poorer accuracy than
*most* crystals (they might be better stability than some high
freqency miniature cylinder crystals). They *do* have high enough
accuracy and stability for reliable asynch serial comms, unlike
(most) RC oscillators.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
EraseMEspeffspam_OUTspamTakeThisOuTinterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
9/11 United we Stand

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\04\14@174404 by Olin Lathrop

face picon face
> You are correct, that the load capacitance should be matched to the
> crystal for optimum accuracy. Generally you'd use about double
> the specified capacitance minus maybe 5pF. So with a crystal that
> calls for 20pF parallel load, you'd use about 33pF (the two
> caps are effectively in series, and there is a bit of capacitance
> in the input and output of the amplifier on the PIC).

Huh!?  Care to cite a reference for this, because this sounds about as
scientific as waving a dead fish over the crystal during a full moon.

The two caps have different purposes, and they are not in series (I can't
even imagine where that came from).  The cap on the input side of the
crystal is really part of the crystal driver and reduces the harmonics
driven into the crystal.  The output cap works with the reactance of the
crystal in its parallel resonant mode to produce the desired overall
reactance and phase shift at the rated frequency.  It also reduces the loop
gain for higher frequencies so that the circuit won't oscillate at an
overtone of the crystal.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\04\14@200431 by Spehro Pefhany

picon face
At 05:43 PM 4/14/02 -0400, you wrote:
> > You are correct, that the load capacitance should be matched to the
> > crystal for optimum accuracy. Generally you'd use about double
> > the specified capacitance minus maybe 5pF. So with a crystal that
> > calls for 20pF parallel load, you'd use about 33pF (the two
> > caps are effectively in series, and there is a bit of capacitance
> > in the input and output of the amplifier on the PIC).
>
>Huh!?  Care to cite a reference for this, because this sounds about as
>scientific as waving a dead fish over the crystal during a full moon.

Unh, okay, Olin:-

1)  From ECS (they make crystals, n'est pas?)
http://www.ecsxtal.com/techtalk.htm

Load Capacitance
Load capacitance is one of the most overlooked parameters when specifying
crystals. In the popular Pierce oscillator circuit, which has a capacitor
to ground at each leg of the crystal, the load capacitance is equal to the
series combination of the two capacitors plus the stray capacitance (Co).
(Co, stray capacitance is the sum capacitance's that are contributed to the
circuit by the layout, board material and the input and output impedance of
the active device.)
A typical Co is 5pF

2)  One of the original App notes from Intel
developer.intel.com/design/mcs51/applnots/23065901.pdf
(Page 4)
As shown in Figure 5, the load capacitance is given by
CL = (Cx1 + Cx2)/(Cx1 * Cx2) + Cstray
The crystal manufacturer needs to know the value of
CL in order to adjust the crystal to the specified frequency

3) If your German is up to snuff: http://www.qsl.net/dk1ag/Kap6.pdf
(page 17 bottom, page 18 top)
You bet your "Schwingkristallen"!


4) http://www.euroquartz.co.uk/pdf/cx-1-03.pdf

There's also a formula there so you can figure out how far
off the oscillator will be if you use an incorrect load
capacitance.

And, a personal thanks to me for this simple formula:

> Astonishing ! I went from 22 to 55pF - now my crystal runs
> at the correct frequency give or take 10 ppm
> Thanks again - Richard

This is really just the tip of the iceberg when it comes to
crystal oscillators. There are whole books on the subject
(such as _Crystal Oscillator Circuits_ by Robert Matthys)
There's also almost 100 references in 3) above. The load
capacitance is the EASY bit, guaranteeing start-up and
keeping crystal dissipation in check (even simulating/
measuring those two) is the difficult part.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
speffspamspam_OUTinterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
9/11 United we Stand

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\04\14@202435 by James Fitzsimons

flavicon
face
Hi all,
firstly thanks to all who responded to my question.  I never thought it would
be as complicated a topic as it appears to be!

As I probably don't need super accuracy I am going to try a couple of 22pf caps
and see if they work. Basically if I can get serial coms working at 9600baud on
my 20mhz 16F628 then I'll be happy.

The more recent posts on this tread have been somewhat over my head, but have
certianly been interesting reading!

Thanks again,
James Fitzsimons.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\04\15@005101 by Jinx

face picon face
> As I probably don't need super accuracy I am going to try
> a couple of 22pf caps and see if they work. Basically if I
> can get serial coms working at 9600baud on my 20mhz
> 16F628 then I'll be happy

22pF will work fine. I've always used hexadecimal values
for crystals when working with comms. For example use
18.432MHz for high speed and 3.6864MHz for low speed.
They are just as common as 20MHz and 4MHz. Check out
the data for a comparable AVR micro like the AT90S2313
and you'll see a table based on hex crystals that is error-
free. The F628 table on the other hand is largely based
on, in my opinion, ridiculous crystals (3.579545 ?) with
errors that have to be accounted for. Sure, this can be
done, but why fight for it ? If comms are a primary concern,
then use an appropriate crystal - it should make little
difference to the rest of the software

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email @spam@listservKILLspamspammitvma.mit.edu with SET PICList DIGEST in the body


2002\04\15@105935 by Spehro Pefhany

picon face
At 12:21 PM 4/15/02 +1200, you wrote:

>As I probably don't need super accuracy I am going to try a couple of 22pf
>caps and see if they work. Basically if I can get serial coms working at
>9600baud on my 20mhz 16F628 then I'll be happy.

They almost certainly will. You cannot "pull" a quartz crystal far enough to
cause a problem with serial coms. Timekeeping, measuring instruments (my
specialty) and similar tasks are where you want to pay special attention to
CL.
Even a cheap/rugged ceramic resonator is fine for what you describe.

Just the same CL/2 - 5pF isn't very difficult to calculate, assuming you know
CL (it is always specified on the crystal data sheet and should be in any
catalog). If you want the specified accuracy (often +/-50ppm for an ordinary
high-frequency crystal- ceramic resonators are often +/-5000ppm- 100 times
worse), you need to use close to the specified CL (or buy
crystals that match your capacitors). It will usually oscillate fine with
CL significantly off (sometimes better), but the frequency will not be
as close as it could be to whatis marked on the crystal.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
KILLspamspeffKILLspamspaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
9/11 United we Stand

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservTakeThisOuTspammitvma.mit.edu with SET PICList DIGEST in the body


2002\04\15@121446 by Alan B. Pearce

face picon face
>>As I probably don't need super accuracy I am going to try a couple of 22pf
>>caps and see if they work. Basically if I can get serial coms working at
>>9600baud on my 20mhz 16F628 then I'll be happy.

>They almost certainly will. You cannot "pull" a quartz crystal far enough
to
>cause a problem with serial coms. Timekeeping, measuring instruments (my

....
>Just the same CL/2 - 5pF isn't very difficult to calculate, assuming you
know
>CL (it is always specified on the crystal data sheet and should be in any

Almost every crystal that you are likely to use will be specified to use a
load capacitance value in the region of 20-30pF. It is pretty safe to assume
30pF as the likely specified capacitance, most manufacturers seem to use
this value unless manufacturing to a specific specification that requires a
different capacitance. The exception is likely to be at lower frequencies,
below about 500kHz, where this value of capacitance will have minimal effect
on the crystal.

You are unlikely to see any variation in frequency with the different values
of capacitor unless you use a frequency counter to measure some output
frequency. You are more likely to see erratic starting behaviour of the
oscillator if you go to too large or too small value of capacitance. Hence
to achieve around 20-30pF of load capacitance for the crystal, I would be
expecting to use a pair of capacitors of 40-60pF each, and typically use
about 47pF. It may well be that a pair of 22pF capacitors is enough to make
the crystal operate reliably.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamBeGonelistservspamBeGonespammitvma.mit.edu with SET PICList DIGEST in the body


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