Detailed description of the role of 22pf or 30pf capacitors in microcontroller crystal oscillator circuits

Publisher:美丽花朵Latest update time:2016-03-09 Source: eefocusKeywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
  • Microcontroller
  • simulation
  • Device Search
  • Principle of single chip microcomputer
  • MCU Timing
  • Microcontroller Classification
  • Analysis of MCU Structure
  • MCU Memory
  • Improvement of MCU Program
  • MCU delay program
  • MCU Addressing
  • MCU instruction system
  • Counters and Timers
  • MCU interrupt system
  • MCU serial port
  • MCU Watchdog
  • MCU Burning
  • Common Problems with Microcontrollers

Your current location: Home  >  Basic Knowledge  >  Microcontrollers  >  Microcontroller FAQs

Detailed description of the role of 22pf or 30pf capacitors in microcontroller crystal oscillator circuits

Source: Internet Author:
Keywords: single chip microcomputer    crystal oscillator   

A senior who just learned about single-chip microcomputers told me that a 22pf or 30pf capacitor should be used in the crystal oscillator circuit of the single-chip microcomputer. I listened to the advice and everything was ok after soldering the circuit. I never thought about why. I knew the reasons but didn't know why. It was really sad. I seem to have been in a bad state recently and it is difficult to explain why. A few days ago, I followed the teacher to other laboratories to attend classes. In fact, I just listened to the teacher and the master talking about all kinds of embedded systems to the students in other laboratories. In addition, the master talked to me alone for a long time that day. I thank them from the bottom of my heart. They made me know how to reflect and adjust. I have a new understanding of what kind of learning attitude I should have and how to put it into action. This is much better than simply giving me some knowledge.

 

Speaking of this little knowledge point, I have such an experience, and I would like to share it with you. I once helped a girl make something. In fact, it was a super simple temperature acquisition system of ATMEGAL16 microcontroller. Although my welding skills are average, I am helping a girl and I am relatively attentive, so there should be no problem. However, the fact is not satisfactory. The smallest system welded out did not work. I checked the circuit several times with a multimeter but could not find the error. Then I suspected that the microcontroller was locked. I changed several microcontrollers but it still did not work. I still thought that I was a good student among my classmates. It was a bit ridiculous. In the end, I found that when I was short of original parts, I confusedly soldered two 0.1uf capacitors in the crystal oscillator circuit, causing the crystal oscillator to not oscillate, so the whole circuit did not work. It worked immediately after replacing it with a 22pf capacitor. I should have figured it out immediately, but I ignored it, which was really wrong. The teacher was right. We really lack the spirit of getting to the bottom of things.

 

Let's take a look at why 22pf or 30pf capacitors are used in crystal oscillator circuits instead of others.

 

In fact, the real name of the oscillation circuit of the microcontroller and some other ICs is "three-point capacitor oscillation circuit", as shown below

Y1 is a crystal, which is equivalent to the inductor in the three-point circuit. C1 and C2 are capacitors. The 5404 NOT gate and R1 realize an NPN transistor. Let's analyze this circuit next.

 

5404 must have a resistor, otherwise it is in the saturation cutoff area instead of the amplification area. R1 is equivalent to the bias of the transistor, which puts 5404 in the amplification area. Then 5404 is an inverter, which realizes the role of the NPN transistor. The NPN transistor is also an inverter when connected in common emitter.

 

As we all know, the condition for a sinusoidal oscillation circuit to oscillate is that the system amplification factor is greater than 1. This is easy to achieve. The phase satisfies 360 degrees, and a very small oscillation with the same oscillation frequency as the crystal oscillator is amplified. Next, we will mainly explain this phase problem:

 

Because 5404 is an inverter, that is to say, it realizes 180° phase shift, then C1, C2 and Y1 are needed to realize 180° phase shift. Coincidentally, when C1, C2 and Y1 form resonance, 180° phase shift can be realized. You can solve equations and treat Y1 as an inductor. You can also use the characteristics of capacitors and inductors, such as the capacitor voltage lags behind the current by 90°, and the inductor voltage leads the current by 90°. Both are possible. When C1 increases, the amplitude of C2 increases, and when C2 decreases, the amplitude also increases. Sometimes C1 and C2 can oscillate without soldering. This is not because there is no C1 and C2, but because of the distributed capacitance of the chip pins. Because C1 and C2 do not need to be very large, this is very important. Next, analyze the impact of these two capacitors on the oscillation stability.

 

Because the voltage feedback of 5404 depends on C2, if C2 is too large, the feedback voltage is too low, which is also unstable. If C2 is too small, the feedback voltage is too high, the stored energy is too little, and it is easy to be disturbed by the outside world, and it will also radiate and affect the outside world. The effect of C1 is just the opposite to that of C2. Because when we lay out the board, assuming a double-sided board, which is relatively thick, the influence of distributed capacitance is not very large. If it is a high-density multi-layer board, distributed capacitance needs to be considered.

 

For some projects used in industrial control, it is recommended not to use the passive crystal oscillator method to start the oscillation, but to directly connect the active crystal oscillator. This is mainly because the passive crystal oscillator needs to start the oscillation, and the industrial control project requires good stability, so the active crystal oscillator will be used directly. The higher the frequency of the crystal oscillator, the lower the stability, so when the speed requirement is not high, a lower frequency crystal oscillator will be used.


Keywords:MCU Reference address:Detailed description of the role of 22pf or 30pf capacitors in microcontroller crystal oscillator circuits

Previous article:Basic issues to consider when designing hardware circuits for embedded systems
Next article:How does a microcontroller detect a high level?

Recommended ReadingLatest update time:2024-11-25 11:16

PIC MCU 4X4 matrix keyboard detection principle and implementation of C language program
#include pic.h     #define uchar unsigned char    #define uint  unsigned int    __CONFIG(0x3B31);    const uchar table ={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,                            0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};    uchar key_num;    void delay(uint x);    void init();    void scan();    void didi(uc
[Microcontroller]
Design of air pressure altimeter based on MCU
The altimeter uses the law of atmospheric pressure changes to measure the altitude and atmospheric pressure changes of the location, as well as the relative height caused by regional changes. It is generally suitable for outdoor activities, including mountaineering, rock climbing, skiing, and traveling. In view of the
[Microcontroller]
Design of air pressure altimeter based on MCU
STC12c5a60s2 MCU internal ADC application test external voltage
#include #include intrins.h        /*use _nop_() function*/ #define uchar unsigned char #define uint  unsigned int uint k; uchar ch ; /*******************Delay********************/ void Delay (uint j)  {  uint i;  while(j--)  {   i=111;while(i--);  } } void InitADC()  {  P1M0=0X01;  P1M1=0X01;  P1A
[Microcontroller]
Analysis of the working principle of PIC microcontroller 4×4 column keyboard
In this article, the editor will introduce the working principle of the 4×4 column keyboard of the PIC microcontroller to help everyone enhance their understanding of the PIC microcontroller keyboard system and facilitate later programming. (1) Principle of single chip computer system keyboard The connection method
[Microcontroller]
Analysis of the working principle of PIC microcontroller 4×4 column keyboard
Design of Low Power Consumption System Based on PIC Microcontroller
introduction Since the 1990s, with the continuous reduction of the feature line width of integrated circuits and the corresponding increase in chip density and operating frequency, reducing power consumption has become a major consideration in the design of submicron and deep submicron VLSI. The increase in power cons
[Microcontroller]
Design of Low Power Consumption System Based on PIC Microcontroller
Design of industrial circulating water polarization control system based on STM32 microcontroller
0 Introduction The circulating water system in industrial production consumes a lot of fresh water during operation. At the same time, in order to prevent scaling of industrial equipment, various chemical agents need to be continuously added to the circulating water, and sewage needs to be continuously discharged an
[Microcontroller]
Design of industrial circulating water polarization control system based on STM32 microcontroller
AT90S8515 MCU SPI driver 74LS595 source program
AT90S8515 uses SPI to drive 74LS595. I use SS port line PB.4 as the latch signal of 74LS595. The key is to set PB.4 as output. 74LS595 drives the LED to display plus 1 count. I use the highest speed of SPI, so the display shows the high eight bits of 16-bit count, and the low eight bits are too fast to be seen clear
[Microcontroller]
AT90S8515 MCU SPI driver 74LS595 source program
MCU program memory ROM
  The English abbreviation of single-chip program memory is ROM. The data stored in ROM is generally written in advance before being installed in the whole machine. It can only be read out during the operation of the whole machine, and it cannot be quickly and conveniently rewritten like random access memory. The data
[Microcontroller]
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号