PDA

View Full Version : Crystal oscillator tied to supply voltage?



achilles03
- 26th March 2009, 04:15
Is it acceptable to connect a crystal oscillator circuit to the supply voltage instead of ground? I've gotten into the practice of doing this because (1) the OSC pins are closer to the supply voltage so it's easier to solder, and (2) it works...so far.

Is there any drawbacks to this? (design, reliability, or otherwise?)

Thanks in advance!
Dave

ErnieM
- 26th March 2009, 13:44
I was once flamed on the piclist for suggesting just that: connecting the common terminal of a resonator (or a crystal cap common, same thing) to Vdd instead of Vss, as the Vdd pin is usually on the same side and makes routing simpler, shorter and cleaner.

My argument is Vdd is an AC ground (for those of us who remember our small signal analysis). The counter arguments I was flamed with were the current is going thru a reactive element and therefor I was RADIATING EMI, and also the Microchip data sheet did not explicitly allow this.

The first argument is nonsense, capacitors are not radiating elements. They do generate RF but that is the displacement current going plate to plate. The second argument may hold some weight but I doubt it.

Bottom line: I've had literally thousands of a medical use sensor I designed ship with the resonator connected to Vdd. If this device was to fail at the wrong moment it is possible someone would literally die.

I sleep well knowing just where I put that resonator.

Gusse
- 26th March 2009, 15:22
I think both ways are OK. More important is to understand, which is more noiseless: Vdd or Vss. You should always try to minimise noise, which can couple to XTAL.

If decoupling to Vss (=GND) is sharing common impedance with some other high current source, then it might be wiser to connect XTAL caps to Vdd. This requires that PDN (power delivery network) has a low impedance also at XTAL frequencies and above. Might require some capacitor optomizations...

Normally GND potential has lower noise level than power supply, but not always. Basic EMC!

BR,
-Gusse-

ErnieM
- 27th March 2009, 01:35
Actually, oscillators like a little noise: one old guy trick from the days men were men and oscillators were built on a single transistor and gains were very finite one trick to make sure an oscillator oscillated was to put a cheap carbon resistor in the signal path. The resistor did nothing but generate some nice thermal noise pulses that were enough to kick start the oscillations.

If your power supply has enough noise riding on it to disturbs the oscillator then it's gonna break something else before the frequency goes off.

As the resonator operates at a small multiple (ummm, FOUR?) of the processor frequency (the major power line noise source) you dang well better optimize your capacitors for that frequency. But that's pretty simple anyway, just bypass anything using Vcc at the part. Ceramic caps are good and cheap.

Gusse
- 27th March 2009, 17:28
If your power supply has enough noise riding on it to disturbs the oscillator then it's gonna break something else before the frequency goes off.
PIC's can operate in quite large voltage range (2.0 - 5.5V, some smaller 4.2 -5.5V). So (small) voltage drops in supply are not problematic for PIC itself, but might be high enough to upset XTAL, if caps are connected to Vdd. Therefore you have to pay attention to PDN impedances at frequencies you are operating. If you have resonaces in PDN at peak current frecuencies, that will generate lots of noise to power supply. And that noise can couple to XTAL, if caps are also connected to Vdd.

Therefore it is more save to use GND for XTAL caps.

BR,
-Gusse-