I'm having some issues with the timer 1 oscillator and was wondering if anyone else had come across this.
I use a 32768Hz watch crystal, 12.5pF and 2x 22pF load capacitors. At room temperature all works fine but if I move the unit in to a cool, moist place (garage for example) then the oscillator stops.
Any ideas what to look for? Due to PCB layout constraints there is maybe 0.5" between the PIC and the xtal.
Operation is from a 3V coin cell on the PIC18LF14K22 - battery voltage is fine, well above the 1.8V the processor is specced to. (I've tried with several cells from around 2.3V at peak load to a brand new Duracell)
Timer 1 oscillator
Moderators: David Barker, Jerry Messina
-
- Posts: 113
- Joined: Mon Jan 11, 2010 10:39 pm
- Location: Chesterfield
Re: Timer 1 oscillator
What's the rated load capacitance for the crystal?
22pF in my experience seems a bit high for a 32kHz crystal. You might want to try reducing it a bit, and to account for the long(ish) crystal traces (depending on your track/board geometery, Co on the traces can easily be up to 1pF/CM).
22pF in my experience seems a bit high for a 32kHz crystal. You might want to try reducing it a bit, and to account for the long(ish) crystal traces (depending on your track/board geometery, Co on the traces can easily be up to 1pF/CM).
-
- Posts: 113
- Joined: Mon Jan 11, 2010 10:39 pm
- Location: Chesterfield
Re: Timer 1 oscillator
The xtal is rated for 12.5pF. From what I've read (from an app note from the manufacturer) you calculate the parallel value for the capacitors you choose and add a bit for parasitics so 22pF seems about right. (22/2 = 11 + 1.5pF parasitic)
The Microchip datasheet actually suggests 33pF for a 32kHz xtal which seems high for me. It does say that a higher value will make the oscillator more stable but may take longer to stabilise, doesn't suggest it will cause it to stop completely.
The Microchip datasheet actually suggests 33pF for a 32kHz xtal which seems high for me. It does say that a higher value will make the oscillator more stable but may take longer to stabilise, doesn't suggest it will cause it to stop completely.
Re: Timer 1 oscillator
Not sure of the circuit you are using, but two 22pF caps in parallel is 44pF, not 11pF.
Cheers,
Ralph.
Cheers,
Ralph.
-
- Posts: 113
- Joined: Mon Jan 11, 2010 10:39 pm
- Location: Chesterfield
Re: Timer 1 oscillator
Correct, I meant series... Product over sum and all that...
Anyway, the calculation I saw shows that 22pF capacitors are about right for a 12.5pF xtal, depending on the parasitics. I guess 18pF or even 15pF might be closer if the parasitics are more than a couple of pF. However, the datasheet suggests that a higher capacitance isn't an issue anyway.
What is confusing me is that everything I read suggests that high temperature rather than low is what causes the most problems to an oscillator.
I think I may have an idea as to the problem though. This batch of PCBs seems to be tarnishing much more than previous batches from the same supplier. I was reading that moisture can react with tarnish to mess up the feedback loop. I'm going to try building some new boards, taking great care to ensure the PCB is as clean as possible and is washed as well as possible to see if that makes any difference.
Anyway, the calculation I saw shows that 22pF capacitors are about right for a 12.5pF xtal, depending on the parasitics. I guess 18pF or even 15pF might be closer if the parasitics are more than a couple of pF. However, the datasheet suggests that a higher capacitance isn't an issue anyway.
What is confusing me is that everything I read suggests that high temperature rather than low is what causes the most problems to an oscillator.
I think I may have an idea as to the problem though. This batch of PCBs seems to be tarnishing much more than previous batches from the same supplier. I was reading that moisture can react with tarnish to mess up the feedback loop. I'm going to try building some new boards, taking great care to ensure the PCB is as clean as possible and is washed as well as possible to see if that makes any difference.