View previous topic :: View next topic |
Author |
Message |
pattousai
Joined: 23 Aug 2006 Posts: 37
|
how to determine the load capacitance of a crystal? |
Posted: Wed Sep 03, 2008 8:19 am |
|
|
hi everybody,
Sorry to run out a litle bit of the main theme discussion (CCS C) in this forum, but since every pic has a crystal associated and think this could be apropriate
Anyway, the question is simple, how to determine the load capacitance of a crystal?
Because i was reading about it in some datasheets and manuals and i understood that every crystal has a load capacitance associated to it (is that right?). But i never found this 'specification' and in the crystal itself only have his frequency, so i don't have a clue of how i will know his load capacitance
well, i think this is it, thanks for everybody and sorry for the bad english |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Wed Sep 03, 2008 8:28 am |
|
|
Just be happy with the capacitance values suggested in the PIC application circuits, they guarantee a stable oscillator operation.
Some crystals may expect slightly different capacitances, if so, a frequency deviation of a few 10 ppm may exist. If you have an application that requires extraordnary frequency accuracy, determine the deviation and adjust the capacitance, if actually necessary. Otherwise - ignore it. |
|
|
RLScott
Joined: 10 Jul 2007 Posts: 465
|
Re: how to determine the load capacitance of a crystal? |
Posted: Wed Sep 03, 2008 8:30 am |
|
|
Every crystal has a series resonant frequency. That is the most intrinsic characteristic of the crystal. But when used in a PIC clock oscillator, the crystal plus its load capacitance forms a parallel resonant circuit, not a series resonant circuit. While the series resonant frequency is inherant in the crystal, the parallel resonant frequency is not. The parallel resonant frequency is offset from the series resonant frequency and the amount of the offset is affected mostly by the load capacitance you put in the circuit. The crystal manufacturer specifies a load capacitance along with the parallel resonant frequency to help you get the correct parallel resonant frequency in your oscillator. Using a slightly different capacitance will just make the frequency slightly different. It would take a very large error in load capacitance to make the crystal stop oscillating altogether. _________________ Robert Scott
Real-Time Specialties
Embedded Systems Consulting |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Sep 03, 2008 9:03 am |
|
|
Any catalog of crystals will specify the load capacitance. Here is
a page from the Digikey catalog for ECS crystals. Look in the
"Load Capacitance" column.
http://dkc3.digikey.com/PDF/T083/P1347.pdf
Don't use the "series" type with PICs. |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Wed Sep 03, 2008 9:27 am |
|
|
If the crystal datasheet does not specify the capacitance, like if it is from Joe's Super Cheapo Discount Surplus House, I would not use that crystal for any project where that degree of accuracy is required (like a wall clock). For serial comms you can usually get away with +/- 2 or 3% timing error, so most any half decent crystal will do with the caps from the PIC datasheet.
Beware of using the PIC internal RC oscillators for serial comms. At extremes of voltage and temperature the specs can get pretty bad. Make sure it is good enough for your application. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
Guest
|
|
Posted: Wed Sep 03, 2008 9:36 pm |
|
|
Here is a link to a very good Intel App note on the whole Crystal thing.
http://www.intel.com/design/mcs51/applnots/230659.htm
With PIC's you also need to be careful to follow the data sheet and specify the proper oscillator fuse or the oscillator will likely not work correctly.
The PIC data sheet gives decent starting values if you have to use an unknown crystal - but you should use a Parallel specified crystal that is specified for a load capacitance somewhat near the PIC data sheet typicals.
The required capacitance is different with different frequencies. The capacitance is actually needed by the circuit to produce a phase shift so that the total phase shift around the circuit is 180 degrees at the frequency of interest.
HTH - Steve H. |
|
|
Ttelmah Guest
|
|
Posted: Thu Sep 04, 2008 2:30 am |
|
|
Remember also, that given a crystal with a particular specified load capacitance, you then need to calculate the capacitors to use to give this capacitance (they are not the same thing..). You need to know the pin capacitance of the chip (in the data sheet), estimate the capacitance of the PCB (this is best kept low, which then minimises the error in estimation - so if you have a ground plane for example, _don't_run this around the crystal pins). Then if you assume the two capacitors used are the same value (they don't have to be, but it is the simplest solution), you have:
Cl = ((C^2)/2C) + Cs
With 'Cl' being the load capacitance required, 'C' being the capacitor value we are after, and 'Cs' being the stray capacitance. A typical value for Cs, will be perhaps 4 to 5pF. Say 5pF. Work in pF. Then the formula re-arranges to give:
C = (Cl - 5) * 2
So for a typical crystal requiring perhaps 18pF capacitance, you get:
C = (18-5) * 2 = 26
This is why 27pF, is a very common value seen (nearest standard value).
Conversely, some small HC18 crystals require 33pF loading, and for these, the same formula then results in the 56pF capacitor being selected.
Best Wishes |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Thu Sep 04, 2008 3:43 am |
|
|
You may get slightly different results, dependig on where you assume the stray capacitance in the equivalent circuit. Some additional points should be considered anyway:
Selecting a capacitor according to the load capacitance specified by the crystal manufacturer doesn't guarantee a microprocessors oscillator to operate. It sets correct frequency, but unfortunately the processor may dislike the load. This is a topic particularly with today's low EMI oscillators, and it may even happen, that an oscillator specification is changed during the lifetime of a product. At worst case a realiable product runs into serious issues if the change isn't noticed. This happened e. g. with some devices of Microchip competitor A****.
Microchip found a solution by this statement (from a PIC18F datasheet):
Quote: | Different capacitor values may be required to produce acceptable oscillator operation. The user should test the performance of the oscillator over the expected VDD and temperature range for the application. |
Additionally, they suggest 15 pF capacitors as typical dimensioning for common HS crystals. On the other hand, for volume production, crystal manufacturers are dimensioning the load capacitance to customer needs (within certain limits of course) by grinding the crystal down to the respective resonance frequency.
To my opinion, a 15 to 22 pF range should be mainly considered for the HS range. As I said, I typically use 15 pF for standard applications without further considerations. |
|
|
pattousai
Joined: 23 Aug 2006 Posts: 37
|
|
Posted: Thu Sep 04, 2008 11:26 am |
|
|
thanks to everybody for the explanations... i will read the links and do some tests...
but the topic already explains a lot |
|
|
|