Tel: 0755-83807850
Email: achenwei2000@126.com
Address: Baihua Community, Guangming New District, Shenzhen Dahong Science and Technology Park Building D
The importance of a crystal oscillator in a microcontroller is self-evident, but as software for recording the operating frequency in a microcontroller, it is very fragile. A slight touch may cause it to malfunction. Therefore, it is also a common phenomenon that a single-chip crystal cannot vibrate. Many customers will inquire about this issue. This article by Yang Xing will introduce the problems and solutions often encountered in microcontroller crystals.
First of all, we analyze what causes the single-chip crystal oscillator to fail.
1. PCB wiring is wrong. The current PCB is no longer a single function circuit (digital or analog circuit), but is composed of a mixture of digital and analog circuits. Therefore, there may be problems during PCB wiring that cause the crystal to fail to vibrate.
2, the quality of the microcontroller or crystal;
3.The load diode or matching capacitor does not match the crystal or there is a problem with the quality of the capacitor;
4. The PCB is wet, which causes impedance mismatch and cannot start vibration;
5. The crystal circuit's trace is too long or there is a trace between the two pins, which will cause the crystal to fail to vibrate. Usually, when we PCB layout, the trace of the crystal circuit should be as short as possible and as close to the oscillator as possible. Traces;
6. Crystal oscillator is not affected by peripheral circuits.
Besides, there are other reasons to pay attention to:
1. Selection of crystal oscillator. Choosing the right crystal oscillator is very important for the microcontroller. When selecting the crystal oscillator, we must at least consider the parameters of resonance frequency, load capacitance, excitation power, and long-term stability of temperature characteristics. A proper crystal can ensure that the microcontroller can work normally.
2. The crystal oscillation caused by capacitors is unstable. The two capacitors C1 and C2 in the crystal circuit have a great influence on the stability of the crystal. Each crystal has its own characteristics, so we must follow the instructions provided by the crystal manufacturer. The value selects external components. Generally within the allowable range, the lower the values of C1 and C2, the better. Although a large value of C is beneficial to the stability of the oscillator, it will increase the start-up time. In general, we make the value of C2 greater than the value of C1, which can speed up the crystal oscillation when powering on.
3. The problem caused by excessive driving of the single crystal of the single chip microcomputer, the excessive driving of the crystal will gradually lose the contact plating of the crystal and cause the frequency of the crystal to rise. We can use an oscilloscope to detect the OSC and output pins. If a very clear sine wave is detected and the upper and lower limits of the sine wave meet the requirements of the clock input, the crystal oscillator is not overdriven. On the contrary, if the sine waveform The peaks and troughs of the valley are flattened to make the waveform square, and the crystal oscillator is driven excessively. At this time, the resistor RS is needed to prevent the crystal oscillator from being driven excessively. The simplest way to determine the value of the resistor RS is to connect a 5k or The 10k trimming resistor is gradually increased from 0 until the sine wave is no longer flattened. This method can be used to find the closest resistance RS value.
4. When drawing the PCB, the closer the crystal oscillator is to its amplifier circuit (IC pin), the better. This is due to the limited output capability of the crystal oscillator, which only outputs electrical energy in milliwatts. Within the IC (integrated circuit), this signal can be amplified hundreds or even thousands of times by an amplifier to be used normally. The crystal and the IC are usually connected by copper traces. This trace can be regarded as a section of capacitor or several sections of wire. When the wire cuts the magnetic field line, a current will be generated. The longer the wire, the stronger the current.
The crystal oscillator is like the core guide of a single-chip microcomputer. The crystal oscillator provides the basic clock signal for the single-chip microcomputer. Usually a crystal is shared in a system. If a single crystal is abnormal, the single-chip microcomputer cannot work normally. If you find that the single-chip microcomputer is not working properly, a large part of the reason is caused by the crystal market.
深圳鸿晶宝科技有限公司
SHENZHEN HJB TECHHOLOGY CO.,LTD
地址:深圳光明区白花社区大鸿科技园D栋
电话:0755-83807850/13510762586
传真:0755-83807853/QQ578950488
邮箱:achenwei2000@126.com
官网:www.hjb-hk.com
Copyright ©SHENZHEN HJB TECHHOLOGYCO.,LTD Address: Building D, Dahong Science and Technology Park, Baihua Community, Guangming New District, Shenzhen
Legal statement / sales policy / 粤ICP备2021076367号 电脑版 | 手机版