Forums

Capacitance value for PIC crystal

Started by P E Schoen June 6, 2013
For most of my projects I use either a 14.7456 MHz crystal (57600*256) =
or=20
20.000 MHz (for USB 96 MHz 24*f/5). The 20 MHz crystal I am using =
specifies=20
a 20 pF parallel load, but my boards have 12 pF capacitors. I just =
noticed=20
this and I think the value had been selected for a previous brand of=20
crystal, but the oscillator frequencies measure pretty close to the =
ideal=20
value, as follows for five boards:

Board 1: 20.00258 +0.013% 130PPM
Board 2: 20.00039 +0.002%  20PPM
Board 3: 20.00068 +0.003%  30PPM
Board 4: 20.00085 +0.004%  40PPM
Board 5: 20.00073 +0.004%  40PPM

My specification is 0.02%, or 200 PPM, so all are within spec, but =
perhaps=20
with the 20 pF capacitors the frequency will be much closer and =
variation=20
will be positive and negative. But the application notes I found seem a =
bit=20
confusing as to the correct way to figure the load capacitance:

http://www.statek.com/pdf/tn33.pdf
http://www.foxonline.com/pdfs/xtaldesignnotes.pdf
http://www.oscilent.com/spec_pages/PNDescrpt/Load_Cap.htm

It seems that the capacitance is determined by:

CL =3D (CL1*CL2)/(CL1+CL2)+CS

Where CL1 and CL2 are the load capacitors and CS is the stray =
capacitance,=20
generally figured about 5 pF. So with my 12 pF capacitors the actual CL =
=3D 11=20
pF and with 20 pF capacitors CL =3D 15 pF and with 47 pF capacitors (as =
I=20
think I used at one time), CL =3D 28.5 pF. The ideal value appears to be =
30=20
pF. I don't know the actual stray capacitance, but it is a double sided=20
board with 0805 SMT capacitors and a PIC18F4455 microcontroller in a =
TQFP-44=20
package. It has a value of 15 pF or the OSC2 pin but this is =
characterized=20
for external clock drive into OSC1.

I think the 12 pF capacitors are OK but I think I will try changing to =
20 pF=20
and see if the frequency comes in closer. The crystal itself is rated 30 =
PPM=20
and 100 PPM over the temperature range. Except for board #1, I'm just =
about=20
there.

But the CL formula seems a bit strange. Usually, when I see product over =

sum, its square root is taken, as for parallel resistors. And if one of =
the=20
capacitors is zero, the other apparently has no effect, and that just =
seems=20
wrong.

Paul=20

On 6/6/2013 4:55 PM, P E Schoen wrote:
> For most of my projects I use either a 14.7456 MHz crystal (57600*256) > or 20.000 MHz (for USB 96 MHz 24*f/5). The 20 MHz crystal I am using > specifies a 20 pF parallel load, but my boards have 12 pF capacitors. I > just noticed this and I think the value had been selected for a previous > brand of crystal, but the oscillator frequencies measure pretty close to > the ideal value, as follows for five boards: > > Board 1: 20.00258 +0.013% 130PPM > Board 2: 20.00039 +0.002% 20PPM > Board 3: 20.00068 +0.003% 30PPM > Board 4: 20.00085 +0.004% 40PPM > Board 5: 20.00073 +0.004% 40PPM > > My specification is 0.02%, or 200 PPM, so all are within spec, but > perhaps with the 20 pF capacitors the frequency will be much closer and > variation will be positive and negative. But the application notes I > found seem a bit confusing as to the correct way to figure the load > capacitance: > > http://www.statek.com/pdf/tn33.pdf > http://www.foxonline.com/pdfs/xtaldesignnotes.pdf > http://www.oscilent.com/spec_pages/PNDescrpt/Load_Cap.htm > > It seems that the capacitance is determined by: > > CL = (CL1*CL2)/(CL1+CL2)+CS > > Where CL1 and CL2 are the load capacitors and CS is the stray > capacitance, generally figured about 5 pF. So with my 12 pF capacitors > the actual CL = 11 pF and with 20 pF capacitors CL = 15 pF and with 47 > pF capacitors (as I think I used at one time), CL = 28.5 pF. The ideal > value appears to be 30 pF. I don't know the actual stray capacitance, > but it is a double sided board with 0805 SMT capacitors and a PIC18F4455 > microcontroller in a TQFP-44 package. It has a value of 15 pF or the > OSC2 pin but this is characterized for external clock drive into OSC1. > > I think the 12 pF capacitors are OK but I think I will try changing to > 20 pF and see if the frequency comes in closer. The crystal itself is > rated 30 PPM and 100 PPM over the temperature range. Except for board > #1, I'm just about there. > > But the CL formula seems a bit strange. Usually, when I see product over > sum, its square root is taken, as for parallel resistors. And if one of > the capacitors is zero, the other apparently has no effect, and that > just seems wrong. > > Paul
The parallel resistor equation does not use a square root. The equation you have is for series capacitors, Paul. That's what the crystal sees. John S
"John S"  wrote in message news:kor0kk$vi3$1@dont-email.me...

> The parallel resistor equation does not use a square root.
Du-oh! I was thinking of the formula for impedance (or RMS from AC and = DC=20 components).
> The equation you have is for series capacitors, Paul. That's what the=20 > crystal sees.
Hmm. So it's like an LC tank circuit with the crystal acting as an=20 inductance? OK, yes, that is shown in the equivalent circuit of the Fox=20 application note. So, it looks like 30 pF capacitors may be just about right if the stray=20 capacitance is 5 pF, but if it's 15 pF as noted in the Microchip spec, = then=20 the 12 pF may be just about right. Since it seems that I need to drop = the=20 frequency just a tad, maybe the 20 pF will be spot on. This may be a = case=20 where trial and error methods are needed. Thanks, Paul=20
P E Schoen wrote:

> "John S" wrote in message news:kor0kk$vi3$1@dont-email.me... > >> The parallel resistor equation does not use a square root. > > > Du-oh! I was thinking of the formula for impedance (or RMS from AC and > DC components). > >> The equation you have is for series capacitors, Paul. That's what the >> crystal sees. > > > Hmm. So it's like an LC tank circuit with the crystal acting as an > inductance? OK, yes, that is shown in the equivalent circuit of the Fox > application note. > > So, it looks like 30 pF capacitors may be just about right if the stray > capacitance is 5 pF, but if it's 15 pF as noted in the Microchip spec, > then the 12 pF may be just about right. Since it seems that I need to > drop the frequency just a tad, maybe the 20 pF will be spot on. This may > be a case where trial and error methods are needed. > > Thanks, > > Paul
If you're trying to be that critical, wouldn't a trimmer work best? I have some very small ceramic based types that live happy with surface mount constraints. Jamie
On 6/6/2013 7:41 PM, Jamie wrote:
> P E Schoen wrote: > >> "John S" wrote in message news:kor0kk$vi3$1@dont-email.me... >> >>> The parallel resistor equation does not use a square root. >> >> >> Du-oh! I was thinking of the formula for impedance (or RMS from AC and >> DC components). >> >>> The equation you have is for series capacitors, Paul. That's what the >>> crystal sees. >> >> >> Hmm. So it's like an LC tank circuit with the crystal acting as an >> inductance? OK, yes, that is shown in the equivalent circuit of the >> Fox application note. >> >> So, it looks like 30 pF capacitors may be just about right if the >> stray capacitance is 5 pF, but if it's 15 pF as noted in the Microchip >> spec, then the 12 pF may be just about right. Since it seems that I >> need to drop the frequency just a tad, maybe the 20 pF will be spot >> on. This may be a case where trial and error methods are needed. >> >> Thanks, >> >> Paul > If you're trying to be that critical, wouldn't a trimmer work best? > > I have some very small ceramic based types that live happy with surface > mount constraints.
He's not trying to trim each board, he's trying to get the optimal capacitance to optimize the variations. The two capacitors are connected to ground. The crystal sees this as two capacitors in series since it only sees what is connected to it's pins. So the caps are in series. The crystal itself is a mechanically resonant device modeled as a complex LC circuit with both a parallel and a series capacitance along with some damping. Check out a few Xtal maker's web pages, there is usually a document explaining how they work. The external capacitance adds to the equivalent capacitance of the Xtal. They are typically designed to work with the specified amount of external capacitance across their pins. BTW, 20 pF in series with 20 pF is 10 pF plus the 5 pF stray gives 15 pF which you say is the amount specified by the Xtal maker. Is that not right? -- Rick
On Thu, 06 Jun 2013 19:15:17 -0400, P E Schoen wrote:

> "John S" wrote in message news:kor0kk$vi3$1@dont-email.me... > >> The parallel resistor equation does not use a square root. > > Du-oh! I was thinking of the formula for impedance (or RMS from AC and > DC components). > >> The equation you have is for series capacitors, Paul. That's what the >> crystal sees. > > Hmm. So it's like an LC tank circuit with the crystal acting as an > inductance? OK, yes, that is shown in the equivalent circuit of the Fox > application note. > > So, it looks like 30 pF capacitors may be just about right if the stray > capacitance is 5 pF, but if it's 15 pF as noted in the Microchip spec, > then the 12 pF may be just about right. Since it seems that I need to > drop the frequency just a tad, maybe the 20 pF will be spot on. This may > be a case where trial and error methods are needed.
I'm not sure where in the Microchip spec you're looking, but it should say what the per-pin capacitance is for the chip itself. You still need to add in any capacitance that comes from your board. You want to look at the pin capacitance for the chip and package, if they go into that much detail. Can you find 20pF caps? 22pF is the standard value. -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com
On Thu, 06 Jun 2013 19:15:17 -0400, P E Schoen wrote:

> "John S" wrote in message news:kor0kk$vi3$1@dont-email.me... > >> The parallel resistor equation does not use a square root. > > Du-oh! I was thinking of the formula for impedance (or RMS from AC and > DC components). > >> The equation you have is for series capacitors, Paul. That's what the >> crystal sees. > > Hmm. So it's like an LC tank circuit with the crystal acting as an > inductance? OK, yes, that is shown in the equivalent circuit of the Fox > application note.
Actually the crystal itself acts very much like a tank circuit. When it's specified for parallel operation it's cut so that it's a bit inductive at the rated frequency. -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com
"P E Schoen" <paul@peschoen.com> wrote in message 
news:kor080$vjd$1@dont-email.me...
> For most of my projects I use either a 14.7456 MHz crystal (57600*256) > or 20.000 MHz (for USB 96 MHz 24*f/5). The 20 MHz crystal I am using > specifies a 20 pF parallel load, but my boards have 12 pF capacitors. > I just noticed this and I think the value had been selected for a > previous brand of crystal, but the oscillator frequencies measure > pretty close to the ideal value, as follows for five boards: > > Board 1: 20.00258 +0.013% 130PPM > Board 2: 20.00039 +0.002% 20PPM > Board 3: 20.00068 +0.003% 30PPM > Board 4: 20.00085 +0.004% 40PPM > Board 5: 20.00073 +0.004% 40PPM > > My specification is 0.02%, or 200 PPM, so all are within spec, but > perhaps with the 20 pF capacitors the frequency will be much closer > and variation will be positive and negative. But the application notes > I found seem a bit confusing as to the correct way to figure the load > capacitance: > > http://www.statek.com/pdf/tn33.pdf > http://www.foxonline.com/pdfs/xtaldesignnotes.pdf > http://www.oscilent.com/spec_pages/PNDescrpt/Load_Cap.htm > > It seems that the capacitance is determined by: > > CL = (CL1*CL2)/(CL1+CL2)+CS > > Where CL1 and CL2 are the load capacitors and CS is the stray > capacitance, generally figured about 5 pF. So with my 12 pF capacitors > the actual CL = 11 pF and with 20 pF capacitors CL = 15 pF and with 47 > pF capacitors (as I think I used at one time), CL = 28.5 pF. The ideal > value appears to be 30 pF. I don't know the actual stray capacitance, > but it is a double sided board with 0805 SMT capacitors and a > PIC18F4455 microcontroller in a TQFP-44 package. It has a value of 15 > pF or the OSC2 pin but this is characterized for external clock drive > into OSC1. > > I think the 12 pF capacitors are OK but I think I will try changing to > 20 pF and see if the frequency comes in closer. The crystal itself is > rated 30 PPM and 100 PPM over the temperature range. Except for board > #1, I'm just about there. > > But the CL formula seems a bit strange. Usually, when I see product > over sum, its square root is taken, as for parallel resistors. And if > one of the capacitors is zero, the other apparently has no effect, and > that just seems wrong. > > Paul
See appnote 949 <http://ww1.microchip.com/downloads/en/AppNotes/00949a.pdf> Cheers
P E Schoen wrote:
> "John S" wrote in message news:kor0kk$vi3$1@dont-email.me... > >> The parallel resistor equation does not use a square root. > > Du-oh! I was thinking of the formula for impedance (or RMS from AC and > DC components). > >> The equation you have is for series capacitors, Paul. That's what the >> crystal sees. > > Hmm. So it's like an LC tank circuit with the crystal acting as an > inductance? OK, yes, that is shown in the equivalent circuit of the Fox > application note. > > So, it looks like 30 pF capacitors may be just about right if the stray > capacitance is 5 pF, but if it's 15 pF as noted in the Microchip spec, > then the 12 pF may be just about right. Since it seems that I need to > drop the frequency just a tad, maybe the 20 pF will be spot on. This may > be a case where trial and error methods are needed. > > Thanks, > > Paul
I used two 18pf (one on each side of xtal to gnd).
Martin Riddle wrote:
> "P E Schoen"<paul@peschoen.com> wrote in message > news:kor080$vjd$1@dont-email.me... >> For most of my projects I use either a 14.7456 MHz crystal (57600*256) >> or 20.000 MHz (for USB 96 MHz 24*f/5). The 20 MHz crystal I am using >> specifies a 20 pF parallel load, but my boards have 12 pF capacitors. >> I just noticed this and I think the value had been selected for a >> previous brand of crystal, but the oscillator frequencies measure >> pretty close to the ideal value, as follows for five boards: >> >> Board 1: 20.00258 +0.013% 130PPM >> Board 2: 20.00039 +0.002% 20PPM >> Board 3: 20.00068 +0.003% 30PPM >> Board 4: 20.00085 +0.004% 40PPM >> Board 5: 20.00073 +0.004% 40PPM >> >> My specification is 0.02%, or 200 PPM, so all are within spec, but >> perhaps with the 20 pF capacitors the frequency will be much closer >> and variation will be positive and negative. But the application notes >> I found seem a bit confusing as to the correct way to figure the load >> capacitance: >> >> http://www.statek.com/pdf/tn33.pdf >> http://www.foxonline.com/pdfs/xtaldesignnotes.pdf >> http://www.oscilent.com/spec_pages/PNDescrpt/Load_Cap.htm >> >> It seems that the capacitance is determined by: >> >> CL = (CL1*CL2)/(CL1+CL2)+CS >> >> Where CL1 and CL2 are the load capacitors and CS is the stray >> capacitance, generally figured about 5 pF. So with my 12 pF capacitors >> the actual CL = 11 pF and with 20 pF capacitors CL = 15 pF and with 47 >> pF capacitors (as I think I used at one time), CL = 28.5 pF. The ideal >> value appears to be 30 pF. I don't know the actual stray capacitance, >> but it is a double sided board with 0805 SMT capacitors and a >> PIC18F4455 microcontroller in a TQFP-44 package. It has a value of 15 >> pF or the OSC2 pin but this is characterized for external clock drive >> into OSC1. >> >> I think the 12 pF capacitors are OK but I think I will try changing to >> 20 pF and see if the frequency comes in closer. The crystal itself is >> rated 30 PPM and 100 PPM over the temperature range. Except for board >> #1, I'm just about there. >> >> But the CL formula seems a bit strange. Usually, when I see product >> over sum, its square root is taken, as for parallel resistors. And if >> one of the capacitors is zero, the other apparently has no effect, and >> that just seems wrong. >> >> Paul > > See appnote 949 > > <http://ww1.microchip.com/downloads/en/AppNotes/00949a.pdf> > > Cheers > > >
Does NOT give any "spec" or useful value; very good on hand-waving, tho.