Electronic – Matching load capacitors to crystal

capacitormicrocontroller

Edit: Sorry, had messed up the capacitor values as I didn't take into account the values halve per leg. This should be fixed now…

I'm needing to attach a crystal to a microcontroller (a PIC16F84A), but the crystals I'm looking at are the 32.768Khz crystals which have either a 6pF, 12pF or as 12.5pF load capacitance. The thing is, I cannot get any capacitors with those values, the closest I can get is a 10pF (5pF per leg), a 15pF (7.5pF per leg) and a 22pF (11pF per leg). Also, the datasheet for the microcontroller says that when running at 32kHz it recommends I use 68-100pF for each capacitor. So:

1) Is the datasheet for the microcontroller really specifying a 32Khz crystal, or is it standard to refer to 32.768 crystal as a 32kHz crystal?

2) Would the capacitors I can actually buy (10, 15 and 22 pF) be suitable, when considering the crystal is specifying slightly different values?

3) Why are the capacitor values specified on the microcontroller datasheet so wildly different from those specified by the crystal? Surely only one of them can be correct, and what effect would this have if one of them is ignored?

Thank you!

Best Answer

  1. Yes, a 32.768 kHz crystal is often referred to as a 32 kHz crystal. I think it's rather sloppy personally, as it only costs another 4 characters to make certain of avoiding any potential confusion.

  2. Yes, they will all work. Unless you need the frequency to be absolutely spot on then e.g. 22pF will do.

  3. If you look at the notes in the datasheet it says they are for design guidance only, for exact values consult the crystal manufacturer. So the crystal datasheet is the one to go from. As Endolith says the microcontroller doesn't affect the correct load capacitance value (well maybe a tiny bit with the pin capacitance)

I agree with Olin that the 16F84A is an antique - if you grab one of the newer PICs you will give yourself far more options. The PIC16F1828 is a nice part, internal RC/PLL up to 32MHz and loads of nice peripherals. Probably won't be much more than the 16F84A, may even be cheaper.