View previous topic :: View next topic |
Author |
Message |
E_Blue
Joined: 13 Apr 2011 Posts: 417
|
LP Oscillator doesn't oscillate at main frequency |
Posted: Mon May 15, 2017 9:35 am |
|
|
32.768KHz LP Oscillator doesn't oscillate at main frequency on PIC16F627-04; instead oscillate at 194KHz.
I tried to reduce the drive by putting a 100K resistor in series at OSCO (pin 15) without success.
When I connect the 10x oscilloscope tip in about 1 to 2 seconds goes from 194KHz to 32.744KHz.
Any recommendation about this? _________________ Electric Blue
Last edited by E_Blue on Mon May 15, 2017 11:29 am; edited 1 time in total |
|
![](templates/subSilver/images/spacer.gif) |
newguy
Joined: 24 Jun 2004 Posts: 1903
|
|
Posted: Mon May 15, 2017 9:39 am |
|
|
Adding the scope probe is changing the capacitance. What crystal are you using (specifically, what is the crystal's rated capacitance), and what crystal load capacitors are you using? |
|
![](templates/subSilver/images/spacer.gif) |
E_Blue
Joined: 13 Apr 2011 Posts: 417
|
|
Posted: Mon May 15, 2017 11:18 am |
|
|
I have no data about the crystal, is a watch cylindrical crystal.
I tried with 33pF and 66pF. _________________ Electric Blue |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19384
|
|
Posted: Mon May 15, 2017 11:43 am |
|
|
Why use parts without data?.
It just wastes your time and money....
Everything has specifications, and it is well worth taking the time to get a crystal that matches the drive requirements of the chip.
Trying to use a crystal without data is about as sensible as a 'chocolate fireguard'. The only way to get good accuracy from a crystal is to have a good impedance match, and the right drive. There is no point at all in using a crystal, if these are not happening....
Now, it's quite exceptional to need a Rs over 100K.
Look at AN849 page 8. You do realise that you need two capacitors?. |
|
![](templates/subSilver/images/spacer.gif) |
newguy
Joined: 24 Jun 2004 Posts: 1903
|
|
Posted: Mon May 15, 2017 11:45 am |
|
|
Those values sound to be too high. The one time I created a RTC with a 32.768kHz crystal, I seem to remember using caps that were just a few pF each. Then again, that could be a function of the crystal I was using.
Can you try removing the caps entirely, so that the only capacitance is the stray capacitance (which will be pretty small)? |
|
![](templates/subSilver/images/spacer.gif) |
E_Blue
Joined: 13 Apr 2011 Posts: 417
|
|
Posted: Mon May 15, 2017 12:06 pm |
|
|
Where I live there's not big suppliers, as Digikey, Arrow, Mouser and so.
So, for components like crystals there's no code to search as if there are for microcontroller or ICs.
The resistance was a try because we see some pictures on the web where some people use it for CMOS oscillators. _________________ Electric Blue |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19384
|
|
Posted: Mon May 15, 2017 1:15 pm |
|
|
If you look at the AN I refer to, you will see that they suggest that if the Rs has to go over about 100K, you should be adding a larger loading capacitor on the source drive pin, to bring the value down, or it'll make the oscillator to sensitive to noise.
The crystal sees the two capacitors in series as it's load. So you can keep the right loading by increasing the source capacitor and reducing the capacitor on the other side of the crystal.
It should be possible to find data about any part these days. Part number on the crystal case?. |
|
![](templates/subSilver/images/spacer.gif) |
E_Blue
Joined: 13 Apr 2011 Posts: 417
|
|
Posted: Wed May 17, 2017 1:29 pm |
|
|
Finally I make a new prototype board with new components except the microcontroller and work fine with 27pF in OSCON and OSCIN. _________________ Electric Blue |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19384
|
|
Posted: Thu May 18, 2017 12:06 am |
|
|
Well done. |
|
![](templates/subSilver/images/spacer.gif) |
|