I have been using resonators since I started with PICs and now need to start using crystals. I have a few questions on how to pick them.
Microchip PIC16F87XA datasheet
The PIC16F87XA
oscillator design requires the use of a parallel cut crystal. Use of a series cut crystal may give a frequency out of the crystal manufacturer’s specifications.
...
20 MHz 15-33 pF 15-33 pF for C1 and C2 (crystal caps)
...
Note 1: Higher capacitance increases the stability
of oscillator but also increases the start-up
time.
As with integrated circuits, crystal manufacturers have datasheets which give all sorts of interesting information assuming that you can find an accurate part number. The chances are pretty good that a crystal listed as a microprocessor crystal will be a parallel cut type. As Ronald Reagan was fond of saying about the Soviets -- "Trust, but verify"
Since I do not recall that anyone places a cap between osc1/osc2 then the CL must either be internal to the PIC, or we use a series resonance crystal which does not require a CL. I did not see a load capacitance value in the processor spec sheet, thinking it must be a series resonance crystal.
Well, yes and no. A capacitor from each leg of the crystal to ground is the same thing in an AC sense of having the series combination of those two capacitors in PARALLEL with the crystal and OSC1/OSC2. AC analysis is tricky stuff - eh batman?
Mind you crystal oscillator is really a misnomer. They're more a resonant filter than anything else, they just filter at very sharp frequencies, that's one of the reasons they can be so finicky in certain situations. If the rise or fall time of the initial power up pulse to the crystal isn't of sufficient frequency/amplitude the crystal will never start oscillating. They're also VERY sensitive to damping (like from scope probes) during startup. The term crystal isn't a misnomer after all =) It is a wafer thin slice of quartz crystal, with physically tuned electrical properties.
If I use a crystal with the same CL and ESR as the EPSON CA-301 20.000M-C specified by the 16F877A datasheet along with the shunt caps specified on the 16F877A datasheet it should work. Is that right?
I use 22pF for all speeds from 4Mhz to 20Mhz - yet to have an issue.
The crystals I buy from www.futurlec.com for $0.30 each, and the 22pF ceramic capacitors for $0.05 each.
The most common of all crystals that I use is the 4Mhz for 16F PIC's, as each instruction takes 1uS (a clean value to work with)
For 18F PIC's, I usually use 10Mhz crystals, to utilize the PLL feature, and have the PIC operate at 10 MIPS (Million Instructions Per Second) - 100nS between instructions.
A few horrible general statements about crystals, which in some instances may be not quite correct:
1 Crystals are inherently series resonant.
2 By putting a capacitor in parallel with the crystal it will behave like a parallel tuned circuit.
3 The series and parallel resonant frequencies are slightly different.
4 Unless you are worried about the EXACT frequency, it is usually not important whether you use a crystal cut for series or parallel resonance.
5 Depending on the circuit, to vary the oscillator frequency, you can:
Put a variable capacitor in series with the crystal
Put a variable capacitor in parallel with the crystal
Put a variable inductor in series with the crystal.
6 Crystals can suffer from "sleeping sickness".
They wont oscillate in the "low power" circuit in which they are normally used.
When tested using a crystal test set or a collection of test equipment which runs the crystal at a higher power, the crystal works ok.
Put the crystal back in its original circuit and it will work OK, "for ever".
Weird! I have experienced this problem several times, and read about it in one or two technical articles.
I hope this is still on topic, but out of curisity, what happens if you plug more than one different crystal into the same oscilator circuit or even two of the same type of crystal?
I hope this is still on topic, but out of curisity, what happens if you plug more than one different crystal into the same oscilator circuit or even two of the same type of crystal?
I hope this is still on topic, but out of curisity, what happens if you plug more than one different crystal into the same oscilator circuit or even two of the same type of crystal?