# Xtal load capacitors

#### spinnaker

Joined Oct 29, 2009
7,830
I have a few of these Xtals

http://www.digikey.com/scripts/DkSearch/dksus.dll?vendor=0&keywords=300-8303-nd

So to calculate the load capacitor

C=(25)-(5) or 20pF

5 being the parasitic capacitance and 25 = 2x12.5 the load capacitance.

I found this calculation here:

http://www.piclist.com/techref/clocks.htm

Does this seem correct?

Some other clarifications on the article:

If I read it correctly, it suggests taking one capacitor lead to ground and the other to VCC. But every circuit I have ever seen takes both caps to ground, including the PICS datasheet. Which is it?

And do I read it correctly that both caps to go straight to the ground and VCC pin of the PIC.

The datasheet shows an "RS" resistor and says "RS may be required to avoid overdriving crystals with low drive level specifications."

How do I know if the XTAL has a low drive spec? and how do I calculate the value of RS?

I am going to take the advice of Wookie in this thread and add an adjustable cap.

But what is a good way of timing the accuracy of my adjustment? Other than the obvious, eye balling it off of a known good timing source.

#### MrChips

Joined Oct 2, 2009
29,819
What kind of PIC are you connecting to this XTAL?
Don't get too fancy. Just use a couple of 22pF and you should be OK.

#### spinnaker

Joined Oct 29, 2009
7,830
It is a PIC18F47J53.

So a couple of 22pf will be accurate enough for a clock to be used for logging of temperature?

Would I be just as good to use the onboard RC OSC?

#### spinnaker

Joined Oct 29, 2009
7,830
Oh and I have 22pfs in stock!

#### MrChips

Joined Oct 2, 2009
29,819
Would I be just as good to use the onboard RC OSC?
Probably, depending on the details of your application.

Are you doing timing, PWM, USART, USB? Then use a crystal.

#### ErnieM

Joined Apr 24, 2011
8,362
Don't over think this. Just put a couple of small caps there, something in the 22pF range, but there is a lot of wiggle room there.

If all you need is for the PIC to execute code then any time source is OK. Crystals are only required when the PIC is acting as a precision timing source.

If I read it correctly, it suggests taking one capacitor lead to ground and the other to VCC. But every circuit I have ever seen takes both caps to ground, including the PICS datasheet. Which is it?

And do I read it correctly that both caps to go straight to the ground and VCC pin of the PIC.
As far as any AC analysis goes, all supply rails are the same and look like ground. If that seems strange, just ask yourself what the AC impedance is between power and ground once you get done adding all your bypass caps.

One cap to VDD and the other to VSS is a new one on me. I've connected both together to either terminal, so I assume one up and one down would work too. But I'd stick with whatever potential is closest.

#### t06afre

Joined May 11, 2009
5,934
Would I be just as good to use the onboard RC OSC?
If you want a precise 4MHz clock. You should use a crystal. However it will not matter much if you use the internal clock in the development phase.

#### Markd77

Joined Sep 7, 2009
2,806
I've seen both ways of connecting them and they are equivalent in a steady state. I did wonder if having them connected to different rails would help the startup of the oscillation, but didn't give it too much thought.
I've always used ground and not had any problems apart from on breadboards which are sometimes unreliable with crystals.