“In the actual product design, for the circuit of the crystal oscillator, you will find the following two circuits. In the circuit in Figure 1, there is no 1M resistor; in the circuit in Figure 2, the crystal oscillator will be connected in parallel with a 1M resistor.
Author: Jinan Xingyuan Intelligent Technology Co., Ltd.
In the actual product design, for the circuit of the crystal oscillator, you will find the following two circuits. In the circuit in Figure 1, there is no 1M resistor; in the circuit in Figure 2, the crystal oscillator will be connected in parallel with a 1M resistor.
For the crystal oscillator circuit, you may have the following questions:
・ What is the specific function of the 1M resistor?
・ Why is it sometimes there and sometimes not?
・Why is the resistance value of the resistor is 1M, but not other resistance values?
With these questions, in this article, we will explain in depth the role of resistors in crystal oscillator circuits.
1. Pierce oscillator
The principle that ordinary quartz crystal oscillators can start normally is: the internal circuit of the chip, the external crystal oscillator and matching capacitors form a Pierce oscillator circuit, as shown in Figure 3 below.
Pierce oscillators are widely used in almost all digital IC clock circuits because of their simple composition (an Inverter, a resistor, a crystal oscillator, and two capacitors) and stable operation.
In this article, two conditions for the stable operation of this circuit are described:
・ At the desired oscillation frequency, the product of the loop gain must be equal to or greater than 1.
• The phase shift around the loop must be zero or any integer multiple of 2π (360°).
As shown in Figure 4 below:
If U1 provides a -180° phase shift, the remaining external components require an additional -180° to meet the standard. , the phase shift will automatically adjust to an exact 360° around the loop to maintain oscillation.
If U1 provides -185° phase shift, the remaining components will automatically provide -175° phase shift in a working design.
2. Function of feedback resistor Rf
Rf is the feedback resistance, which makes the inverter U1 work in the linear amplification region.
A feedback resistor is connected between Vin and Vout of U1 in order to bias the amplifier at Vout = Vin and force it to be in the linear region, the shaded region in Figure 5.
In fact, many circuits in the inverter circuit can start to vibrate without this resistor, because the general circuit has a disturbance signal, but some inverting gate circuits cannot start to vibrate without this resistor, because the disturbance signal strength is not enough.
The impedance of the oscillating circuit will also change in a low temperature environment. When the impedance increases to a certain extent, the crystal oscillator will have difficulty in starting or not oscillating.
If your product is under low temperature, the crystal oscillator does not vibrate or the MCU runs abnormally at low temperature (some chips may automatically switch to the internal crystal oscillator when the external oscillator circuit does not vibrate). At this time, we need to check whether the Rf resistor is correct. Is the resistance value reasonable? Should the Rf actually be picked up?
3. The value of Rf
The resistance value of the Rf resistor is selected to meet the following requirements:
4. Is there any Rf?
Now the feedback resistor Rf of many chips has been integrated into the chip. For example, the block diagram of the crystal oscillator circuit of STM32 is shown in Figure 7 below:
If you can’t know whether Rf is integrated inside by consulting the chip manual, you can measure it as follows:
・Measure the voltage at the input and output of the inverter with no external components (C1, C2, and X1) connected:
・ If a feedback resistor is integrated inside the chip, the measured voltage of the input and output pins will be around Vcc/2;
・If there is no integrated feedback resistor inside the chip, the inverter will be latched and the input and output will be in logic “1” or logic “0” state; i.e. the non-shaded area in Figure 5.