Crystal with capacitor problem in Microcontroller

#12

Joined Nov 30, 2010
18,224
It would help if you posted a datasheet so I don't have to guess what, "Cs" means.

Then a photo of the circuit board...
 

RichardO

Joined May 4, 2013
2,270
You have made a common error. The series combination of C1 and C2 is the crystal's load capacitance. So, ignoring the stray capacitance, C1 and C2 would each have to be 25 pF to load the crystal to 12.5 pF.

It took me years before I realized this. :(
 

upand_at_them

Joined May 15, 2010
939
According to the 16F88 datasheet that I have handy you need higher capacitance for such a low frequency crystal. Also, are you using XT mode?

6-11-2015 2-15-26 PM.png
 

RichardO

Joined May 4, 2013
2,270
If i go for values of C1 and C2 anything above 18pF. It does not work. It only works if I go lower.
What are your configuration bits?
This was a very good question. It looks like your oscillator does not have enough gain. You can try different oscillator settings to see if the oscillator will start. If I remember correctly, the HS setting has the highest gain.
 

joeyd999

Joined Jun 6, 2011
6,279
According to the 16F88 datasheet that I have handy you need higher capacitance for such a low frequency crystal. Also, are you using XT mode?
And, quite possibly, a series resistor Rs (to prevent overdriving). Are the crystals physically failing (i.e. cooked), or are they intermittently failing to oscillate?
 

RichardO

Joined May 4, 2013
2,270
According to the 16F88 datasheet that I have handy you need higher capacitance for such a low frequency crystal.
Another good point. You should verify the loading specification of the crystal you are actually using.

Another possibility is that the PCB layout is at fault. Can you give us a picture showing the parts and traces around the crystal and PIC?
 
Top