Monday, 10 October 2016

microcontroller - Crystal oscillator load capacitance, again


There's a lot of seemingly conflicting information regarding how the load capacitance for a parallel resonant crystal is calculated. Faced with a lot of problems in recent years with non-oscillation and frequency inaccuracy, I'm asking the community's help to get to the bottom of the problem.


How exactly should the values of external load capacitors be calculated?


What's the reason if the oscillator completely fails to start with crystals from some vendor and only completely removing the external load capacitors help? Other vendors' crystals work fine and they advertise seemingly similar parameters (load capacitance, fundamental mode, parallel resonant).



Are all integrated XTAL oscillators in, say, microcontrollers, always Pierce oscillators? Does it have any relevance on the issue?


For reference, here's some information that I've found from the Web regarding the calculation of load capacitance. One IC vendor defines it like this:


AN100


One crystal manufacturer defines it like this: enter image description here


Another website has this to show for an answer:


    The equation is C=2(CL)-(CP+CI)

C = crystal capacitor value
CL = load capacitance
CP = parasitic capacitance (wires, socket, traces)

CI = input capacitance (mcu itself)

Quite many seem to think that the load capacitance is the value the crystal manufacturer recommends for the external capacitors. This, to me, seems completely incorrect. (But, as it turns out, might still work perfectly ok).


One web page puts an emphasis on knowing the oscillator inverter's input and output capacitances and gives this answer: enter image description here


Is there a one true answer to the question? It all seems very frustrating to me. Why doesn't an oscillator start? Why does removing the external load capacitors make it start? How should the external capacitors' value be calculated?


PS. Sorry I can't tell you exactly which ICs I'm working with. But I've seen this happen with quite a few during the years.



Answer




Is there a one true answer to the question? It all seems very frustrating to me. Why doesn't an oscillator start?




A crystal oscillator will fail to start when the crystal and the capacitors attached either side do not fully produce a 180 degrees phase shift back to the input of the inverter inside the chip.


The inverter produces effectively 180 degrees phase shift so, for oscillation to begin, the two capacitors and the crystal together must form an extra 180 degrees phase shift AND there must be an overall voltage gain greater than 1.


Look at this response - it mimics a crystal and one capacitor but it doesn't quite reach 180 degrees: -


enter image description here


V1 is the driving voltage source and R2 (100 ohms) represents the output impedance of the gate involved in the oscillator. Look carefully, the phase angle doesn't quite reach 180 degrees and this will mean NO OSCILLATION.


The extra few degrees of phase shift come from the output capacitor on the invertor - the 100 ohms (or whatever the output impedance of the inverter has) AND this extra capacitance push the phase shift past 180 degrees and the oscillator will then oscillate.


Here's a picture showing the effect of increasing input and output capacitance from 1 pF up to 20 pF: -


enter image description here


The X axis is at 9.9 MHz FYI. As you can possibly see, only when capacitance is 10 pF or 20 pF does the circuit produce 180 degrees of phase shift. This means the oscillator will oscillate at the left hand point on each phase curve that the response crosses 180 degrees (parallel resonant point tuned by the external capacitance).


So, you need capacitors to make this type of oscillator work and the manufacturer tells you what to use but, in my humble opinion, there are a lot of subtleties around that some manufacturers maybe either don't fully know or won't tell you. I'll also add that there appear to be very few web articles about what really is going on and the true importance of each capacitor.




Why does removing the external load capacitors make it start?



Maybe the self capacitance of the tracks and gate input capacitance are sufficient. It depends also on the Q of the crystal and is hard to speculate on. Maybe the inverter's slew rate is too slow?


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...