Crystal with capacitor problem in Microcontroller

Discussion in 'General Electronics Chat' started by samridh, Jun 11, 2015.

  1. samridh

    Thread Starter Active Member

    Apr 25, 2010
    4
    0
    Why would a crystal fail in a circuit for a PIC chip
     
    Last edited: Jul 24, 2015
  2. #12

    Expert

    Nov 30, 2010
    16,261
    6,768
    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...
     
  3. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    ...and what is driving the crystal?

    A partial (at the least) schematic would clarify things immensely.
     
  4. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    So you are using a PIC, then...

    What are your configuration bits?
     
  5. RichardO

    Well-Known Member

    May 4, 2013
    1,231
    382
    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. :(
     
    flat5 likes this.
  6. upand_at_them

    Active Member

    May 15, 2010
    246
    29
    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
     
  7. RichardO

    Well-Known Member

    May 4, 2013
    1,231
    382
    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.
     
  8. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,675
    2,723
    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?
     
  9. RichardO

    Well-Known Member

    May 4, 2013
    1,231
    382
    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?
     
Loading...