Edit: My primary objective is to learn the mathematical model to compute the load resistor \$R_s\$ to satisfy a given crystal's drive level, not just fixing the one instance below.
I'm building a Pierce-Gate oscillator circuit using a 74HC4060 and a 32kHz 12.5pF watch crystal.
I'm a novice, but AFAICT the oscillator circuit of the SN74HC4060 is just a buffered CMOS inverter:
My circuit's schematic:
Below the oscillator section on the PCB (the IC on the left is the 4060). The back of the board underneath the oscillator section is clear; no signal traces and no copper pours:
While I get the crystal to oscillate, it's sometimes unstable and varies in frequency. I'm a novice and I'm struggling trying to work out the appropriate values for the load resistor \$R_1\$.
As I understand, the crystal's 12.5pF load capacitance should be equal to:
\$C_{load} = {(C_1 + C_{in}) (C_2 + C_{out}) \over (C_1 + C_{in} + C_2 + C_{out})} + C_{stray}\$
where \$C_{in}\$ and \$C_{out}\$ are the CMOS inverter's circuit capacitances and \$C_{stray}\$ represents any parasitic PCB capacitance. I'm a little in the dark on the values for \$C_{in}\$ and \$C_{out}\$ and I can't seem to find them in the IC's datasheet.
Following online rules of thumb, I've been using 3pF for each and 1pF for \$C_{stray}\$. Substitution then gives:
\$C_1\$ = 20pF
\$C_2\$ = 20pF
What I struggle with is \$R_1\$ though.
The value of 470k in the schematic above was taken from https://www.eevblog.com/forum/beginners/using-a-32-768khz-crystal-with-4060-frequency-divider/ but I don't really understand how it was derived.
I understand it's acceptable for \$R_1\$ to match the capacitive resistance of \$C_1\$ (§6.1.2 from http://www.ti.com/lit/an/szza043/szza043.pdf) which for 20pF at 32768Hz I think is 241k.
Yet, I also understand that \$R_1\$ serves to lower the current through the crystal. The crystal's datasheet lists the drive level as \$1 {\mu}W\$ and 241k would seem too low to achieve that.
My circuit runs at 5V. With \$R_1\$ and \$X_{C_1}\$ both equal to 242k and the crystal's effective series resistance at 35k, how do I calculate the current through and voltage over the crystal?
This is probably where I go off the rails (if I'm not already), but do I approach this as the following equivalent resistor network?
Where Ohm's law would put the parallel resistance over the crystal and \$X_{C_1}\$ at 31k, the voltage at \$V_1\$ at 0.57V, the current through \$R_1\$ at 18\$ \mu A\$, \$I_{XTAL}\$ at ~\$16 \mu A\$ and by extension the power consumption of the crystal at \$0.57V \cdot 16 \mu A = 9 \mu W\$?
How do I approach calculating appropriate values for \$R_1\$ that satisfy the crystal's specifications?