Timer 1 oscillator

Discuss PIC and electronic related things

Moderators: David Barker, Jerry Messina

Post Reply
blackcattech
Posts: 113
Joined: Mon Jan 11, 2010 10:39 pm
Location: Chesterfield

Timer 1 oscillator

Post by blackcattech » Wed Jan 01, 2014 6:55 pm

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)

User avatar
RangerBob
Posts: 152
Joined: Thu May 31, 2007 8:52 am
Location: Beds, UK

Re: Timer 1 oscillator

Post by RangerBob » Thu Jan 02, 2014 10:54 am

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).

blackcattech
Posts: 113
Joined: Mon Jan 11, 2010 10:39 pm
Location: Chesterfield

Re: Timer 1 oscillator

Post by blackcattech » Thu Jan 02, 2014 5:41 pm

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.

Ralph
Posts: 15
Joined: Tue Apr 01, 2008 3:15 am
Location: Melbourne, Australia

Re: Timer 1 oscillator

Post by Ralph » Fri Jan 03, 2014 5:25 am

Not sure of the circuit you are using, but two 22pF caps in parallel is 44pF, not 11pF. :shock:

Cheers,
Ralph.

blackcattech
Posts: 113
Joined: Mon Jan 11, 2010 10:39 pm
Location: Chesterfield

Re: Timer 1 oscillator

Post by blackcattech » Fri Jan 03, 2014 9:19 am

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.

Post Reply