Standard vs Tuning Fork crystals

Thread Starter

cmartinez

Joined Jan 17, 2007
7,174
I bought a few 32.768 KHz crystals so I could use them on an AT89LP4052 MCU. This chip has an internal crystal oscillator that I've successfully been using with crystals of between 4 and 22 MHz, but this is the first time I've attempted to use a crystal with such low frequency. And unfortunately, I couldn't make it work.

It turns out that this type of crystal is of the "flexural", or "tunning fork" type, and it appears to function under a different principle from the other traditional XO (or standard) crystals. And also, it seems that at this low frequencies this is the only type of crystal available out there.

I'd like to avoid using an external oscillator for this application, because they normally don't work within the wide voltage range that I'll be using (2.4 to 5.5V) and because they consume too much current (about 3mA) compared to the MCU chip itself, which consumes about 7mA.

Is there a way to adapt this sort of crystal so that it could work with my chip's internal oscillator?
 

MrChips

Joined Oct 2, 2009
22,090
I don't know much about the AT89LP4052 but the datasheet shows application with both low frequency and high frequency crystals.

I am currently running an ATmega48 with a 32768Hz external crystal. The nice thing about this is that I can run the MCU at full speed with its internal RC oscillator while I use the external xtal for timer functions.

Are you committed to use the 8051-type MCU?
 

OBW0549

Joined Mar 2, 2015
3,566
Is there a way to adapt this sort of crystal so that it could work with my chip's internal oscillator?
Probably not; I'm not familiar with your chip, but from looking at the data sheet it appears it doesn't have the equivalent of the LP (Low Power) oscillator mode frequently found on PICs, and most likely it can work only with higher-frequency crystals.

All I can suggest is to try playing with the crystal load capacitors: fiddle with the ratio between the two caps, while keeping their series equivalent value close to the load capacitance specified for the crystal; I recall doing this years ago while trying to run a 68HC11 off a 200 kHz ceramic resonator, and it worked.

Tuning fork crystals are usually low-power devices, and can be damaged if overdriven; so it may be necessary to insert a resistor (no idea what value) between the MCU's oscillator output pin (the drive pin) and the crystal to cut down the drive power.
 

MaxHeadRoom

Joined Jul 18, 2013
21,623
I use the XC1392-ND from Digikey on Picmicro successfully and used PIC suggested 22pf caps to GND.
I have used them for 1sec timers using the TMR1 input.
Max.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
7,174
Try a circuit with values such as this to start except use your micro for the input and output to the crystal:
I just tried to make it work, but using values of 220K, 10M and 27pF for the components (because that's what I have available at this moment) ... and nope ... couldn't make it work. The thing oscillated, but at a very erratic (and noisy) rate of approximately 10 MHz
 

crutschow

Joined Mar 14, 2008
25,653
You could try building the oscillator with a CD4049 CMOS inverter or other CMOS inverter gate.
They will work down to 3V and take very little power.
(Be sure and tie all unused inputs to ground).

If nothing else, it will give you some experience with using those low frequency crystals.
It will also verify that your crystal is still good.
 

ebp

Joined Feb 8, 2018
2,332
Many tuning fork crystals require much lower loading capacitance than AT-cut HF crystals. The linked datasheet shows loading capacitances of 7, 9 or 12.5 pF. Each discrete loading cap should be (twice the required value, minus (the capacitance of the oscillator "pin" and "stray" capacitance)). For example, if the crystal is spec'd for 7 pF, the total capacitance at each end would be 14 pF. The spec for the 4060 is 5 pF typical, 7.5 pF max for "any input" (no separate spec for the oscillator in the TI sheet). This would mean the external capacitor at each pin should be about 6 to 11 pF - 10 might be appropriate. But then there is the capacitance of a breadboard to consider.

The processor in question shows 10 pF internally at each oscillator pin, so probably around 5 pF as discrete caps would be suitable. If a series resistor is used between the oscillator output pin and the crystal, the internal 10 pF would be largely "hidden" an so the discrete cap on that side of the xtal would be back to the 14 pF realm. (again - all these values are for a crystal requiring 7 pF loading, so without knowing the required loading it may be necessary to experiment; 12,5 pF loading is not uncommon but is pretty much the max for 32 kHz xtals). 10 pF at a pin seems rather high, but there is so much stuff that can be optionally configured to connect to pins on processors it isn't too surprising.

A drive limiting resistance in the range of about 100k to 300k is probably appropriate. Most tuning fork crystals are designed for a maximum of one microwatt of drive, which is not something easily calculated. Provided the oscillator will start up at all, very low drive may work but it may take tens to hundreds of milliseconds for the oscillator amplitude to get up to normal operating level.

Tuning fork crystals generally have a rather nasty sharp peak in the frequency versus temperature curve, which can be something of a pain in some applications.

Provided the drive limiting resistor is discrete and external to the oscillator inverter, you can scope the output pin of the inverter but scoping the input pin may stop the oscillator.

If you are using a plug in breadboard with a crystal requiring low loading capacitance it might be best to bend the oscillator input pin up and solder the crystal and cap to it, keeping the leads short.
 

RichardO

Joined May 4, 2013
2,271
You could try building the oscillator with a CD4049 CMOS inverter or other CMOS inverter gate.
They will work down to 3V and take very little power.
(Be sure and tie all unused inputs to ground).

If nothing else, it will give you some experience with using those low frequency crystals.
It will also verify that your crystal is still good.
Use one of the gates to buffer the oscillator. You never want to measure the signal on the oscillator directly because it effects the operation of the oscillator. This is especially true for low power oscillators like yours.

Unfortunately it sounds like you may have damaged the 32KHz crystal. The 10 MHz oscillation could be from the stray capacitance and inductance in your oscillator circuit.

Try another (higher frequency) crystal in the oscillator circuit to see if that works.
 
Top