Determining values of capactiors for crystal on PICS

Discussion in 'Embedded Systems and Microcontrollers' started by spinnaker, Dec 14, 2010.

  1. spinnaker

    Thread Starter AAC Fanatic!

    Oct 29, 2009
    I have seen a number of circuits using crystals on PICS. Some use capacitors and others do not.

    The ones that use them seem to be around 22pf.

    How do I determine if I need capacitors and if I do, their proper values? For example on this crystal?
  2. maxpower097

    Well-Known Member

    Feb 20, 2009
    Last edited: Jan 16, 2011
  3. spinnaker

    Thread Starter AAC Fanatic!

    Oct 29, 2009

    So I think I understand. The crystal does not really matter? It is what my PIC datasheet says to use. I think it said 22pf but I thought it mentioned consulting the crystal datasheet for actual value.
  4. AlexR

    Well-Known Member

    Jan 16, 2008
    The capacitors across the crystal provide a load for the crystal and determine the amount drive that the oscillator provides. The higher the capacitor values the greater the drive.

    Watch type crystals as referred to in your link are very sensitive to drive levels and can be damaged or even destroyed if the drive levels are too high. This is why you should always use the low power oscillator option for driving watch crystals and why you should follow the crystal manufactures recommendations with respect to capacitor values.

    If you look through the specs on your link you will see that the crystal is designed to work with a load capacitance of 12.5pF. The standard arrangement is to have a capacitor going from each end of the crystal to earth so the crystal sees the capacitors as being effectively in series therefore each capacitor should be double the recommended load value or in this case 25pF. The nearest preferred values would be 22pF or 27pF so try a 22pF and see that it works reliably. If the oscillator has difficulty starting with a 22pF you can try 27pF capacitors.
    As a general rule use the lowest capacitor value that will give reliable operation.

    One further point, be careful, watch crystals come in two types, the ones shown in your data sheet that expect a 12.5pF load and ones designed for a 6pF load. Those need a pair 12pF capacitors and using 22pF will damage or destroy them.
  5. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    Here are a few links that cover the options for PIC clocks and clocks in general quite well:

    PIC RC and Xtal Oscillator Options w/cap values where needed

    Microchip AN826 Crystal Oscillator Basics and Crystal Selection for rfPICTM and PICmicro® Devices

    I usually use the ceramic resonators or the 4 wire crystal oscillators that have pwr/gnd connections and internal caps for the crystal.
  6. t06afre

    AAC Fanatic!

    May 11, 2009