SparkFun Forums 

Where electronics enthusiasts find answers.

General project discussion / help
Did you make a robotic coffee pot which implements HTCPCP and decafs unauthorized users? Show it off here!
By qwertymodo
#166159
I'm trying to build a RTC clock driver for a CPLD board using a 32.768kHz tuning fork and a Pierce Oscillator, but I'm having trouble getting the component values to work out right, and I'm currently not getting any oscillation out of it. I don't have access to an oscilloscope right now, so I can't see what's going on on the clock signal line in detail, but it seems to be holding at a logic high, so to start out, I just want to figure out if I even chose reasonable values for the various components of the circuit, because after doing the math, several of the components I ended up with seem kind of extreme to me. I've looked at several references, but this document has been the best at laying out the component selection. The inverter I'm using is the TI SN74LVC1GX04, and the crystal is rated for a load capacitance of 6pF. According to the inverter's datasheet, the input capacitance is 7pF max. So the external load capacitors are calculated by the formula:
Code: Select all
         -(C1 + Cin)(C2 + Cout) -
Cload = | ---------------------- | + Cstray
         - C1 + Cin + C2 + Cout -
so for my 6pF crystal, and assuming a stray capacitance of 2pF, I get
Code: Select all
       -(C1 + 7pF)(C2 + 7pF) -
6pF = | --------------------- | + 2pF
       - C1 + 7pF + C2 + 7pF -
with C1 = C2, that works out to exactly 1pF... which seems really low, compared to the ~20-30pF I typically see suggested.

Next up, RF is pretty straightforward. From everything I'm read, the value is not critical, and the document I linked suggests 10-15Mohm for 32.768kHz. 10Mohm is the biggest I have on hand, so I'm going with that.

Finally, RS is calculated by the formula:
Code: Select all
     1
------------
2(pi)(f)(C2)
so
Code: Select all
          1
--------------------
2(pi)(32.768kHz)(1pF)
which comes out to ~4.857Mohm... which seems awfully high, considering that earlier in that document, they talk about tuning fork crystals needing "large" values for RS >10K, so if 10K is "large" then 500x that is... well... REALLY large.

Am I just going crazy, or did I miss something in the math somewhere?
By qwertymodo
#166172
rrpilot wrote:At first glance, your Rs is way too high. Try in the order of 100 to 1k Ohm. I'll take a closer look at your math when I get home.
From the document I linked in my post (which is what I was using for my formulas):
Rs must be used with “Tuning-Fork” (watch) crystals. Tuning-Fork crystals have a maximum drive level of 1µW maximum. Without a large Rs (greater than 10k ohms), the inverter will physically damage the crystal!
I tried values as low as 10K, still no oscillation.
By qwertymodo
#166317
My multimeter's battery died, so I didn't get the chance to check it out until today, and whaddya know, it works just fine -_-.

The only thing I can think of is that maybe there was still some water under the chip from washing it off after soldering, and it finally dried after a few days. Sheesh...