When building another project using a CD4060BC and a 32.768 kHz crystal as the timebase I found my breadboard oscillator unreliable. On the Internet I found confusing information about the values of components for the oscillator. There was a wide variation in suggested values for the resistors and capacitors.
The CD4060BC datasheet wasn't very enlightening on this. In the end I found the circuit and values in the MC146818 RTC datasheet the most useful. They are given for various frequencies.
These are the salient points.
- The current limiting resistor R is dependent on the crystal frequency. It should be of the same order of magnitude of the crystal impedance. As the frequency decreases this needs to be increased. The reason is, as one poster to a forum explained, 32.768 kHz crystals don't need much energy (and you can see that the can is smaller). Too much and you actually stop it vibrating. So if you see a low value or even absent in a suggested circuit, look at the crystal frequency, it's probably higher, in the MHz region.
- The stray capacitance becomes important. What you could get away with on a breadboard you cannot with a 32.768 kHz crystal. So to test the circuit you need to mount it on a separate board, as breadboard has significant intercolumn capacitance.
- The 10M or greater feedback resistor is for real. It's to keep the CMOS inverter in the linear region. The impedance of the input is very high so the resistor can be high too. Also with the stray capacitance it becomes part of the loading of the crystal and this should be minimised. 10M is the highest you can easily buy.
The upshot of this is I assembled on a separate perfboard the components for testing a crystal. The unused section of the perfboard is for testing crystals with the MC146818 RTC.
I was gratified to see the LED blink at 2 Hz, giving me confidence that it would work on the final PCB. In a PCB design, I usually create keep out zones for the copper pours in the vicinity of the crystal so that the strays are small.
Aren't you glad that breakout boards have taken care of crystal oscillators for you?