You are here

Crystal Oscillator Challenges

Have you ever tried to design an xtal oscillator, and it would not work? This article lists several common problems with xtals that you are likely to run into.

Explanation of the "LabProg-48LV and 20 MHz Xtals" and "T-EMU52 and 24 MHz Xtals" issues.

I have been using crystals in microcontroller systems for a long time without problems - until a certain moment. I have always believed that whatever is written on the xtal is what I will get when I connect it to a microcontroller. And, of course, that an xtal either oscillates (then it is OK) or it does not (and is bad).

The first impulse was given by several of our customers using the T-EMU52 emulator, who have reported that their calculated and actual delays in a delay loop do not even remotely agree. After some measurements, they found that a crystal labelled "24 MHz" was oscillating at 8 MHz. Our supplier responded to our query with "24 MHz is for third harmonics, in fundamental mode the crystal operates at 8 MHz." I would like to point out that a special oscillator circuit is necessary to make the xtal operate at its third harmonics.

Recommendation No. 1:

Always specify xtal mode of operation in your order. For microcontrollers, that is always its fundamental frequency, so say "mode: fundamental."

A couple of months later, our beta-testers reported that 20 MHz xtals wouldn't work in the LabProg-48LV programmer. Several occurencies were reported, so I assumed that simply some xtals in the batch were bad. When the issue repeated itself in the next series, we started testing the crystals in one of the LabProg-48LV's and returned the faulty ones. In addition, we started ordering xtals from another supplier, testing those as well. Results were alarming - 25% to 30% faulty pieces. Both suppliers just shrugged their shoulders and said, "nobody has complained before."

Then we have looked into the smart books, and found out that one of the xtal parameters (actually, the only one given besides the operating frequency) is its maximum load capacitance. In other words, it is the maximum value of those two capacitors connected to ground and to each of the xtal terminals. For standard xtals, this parameter is usually 12, 16, 20 or 30 pF, for sub-miniature xtals even less.

So, we tried changing the 30 pF (median in the 15pF to 47pF range recommended by Microchip) to 22pF, and hey!, from 25% faulty ones we dropped down to 10% bad ones. We tried 12pF - out of 28 xtals originally considered "bad", 26 worked. We could not manage to get the remaining two working in a circuit using a PIC microcontroller; however, they worked fine in an external oscillator based on CMOS invertors.

Recommendation No. 2:

In your order, always specify load capacitance as well, according to your circuit requirements - e.g. "load capacitance: xx pF". And, of course, use the lowest possible capacitors in your circuit, if the supplier (or manufacturer) accidentally "misses the mark."

Of course, I won't mention the exact suppliers (one in Czech Republic, one in Slovakia). One of them has confirmed that "noname" xtals were shipped, and their parameters were unknown - although the company's official catalogue lists everything. Both suppliers have shipped parts they had in stock at the moment, and their staff did not know about the above mentioned issues that had caused our problems. Or did they intentionally avoid pointing them out when we claimed the xtals defective?

Conclusion

When placing an xtal order, always specify xtal parameters. Besides the frequency, specify operating mode (fundamental, Nth harmonics) and maximum load capacitance. Example: "Xtal 20 Mhz, mode: fundamental, load capacitance: 20pF," and add a packaging specification (most comon packages are HC49, HC49-low profile, etc.)

If you choose to use "noname" xtals, use the smallest capacitors allowed by the microcontroller manufacturer (e.g. Microchip allows 15pF, Intel/Philips 30pF) and hope that the circuit will work under all possible circumstances (power supply, temperature, etc.).


Author : Ing. Jan Puobis
ELNEC s.r.o. Presov, Slovakia
In Presov, July 19, 1999
Translated by Joe Hlavac

Hodnocení článku: