How to distinguish the internal crystal oscillator and external crystal oscillator of the microcontroller

Publisher:平凡幸福Latest update time:2014-01-16 Source: dzscKeywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  1. Brief introduction of single chip microcomputer crystal oscillator

  The crystal oscillator of the microcontroller is a component that generates the clock frequency required by the microcontroller's internal circuit. The higher the clock frequency provided by the microcontroller crystal oscillator, the faster the microcontroller runs. The execution of all instructions of the microcontroller is based on the clock frequency provided by the microcontroller crystal oscillator. The crystal oscillator combines with the internal circuit of the microcontroller to generate the clock frequency required by the microcontroller. The higher the clock frequency provided by the microcontroller crystal oscillator, the faster the microcontroller runs. The execution of all instructions of the microcontroller is based on the clock frequency provided by the microcontroller crystal oscillator.

  2. The principle of single chip microcomputer crystal oscillator

  The crystal oscillator of the microcontroller generally adopts a three-terminal (Colpitts) AC equivalent oscillation circuit; in the actual crystal oscillator AC equivalent circuit, Cv is used to adjust the oscillation frequency, which is generally achieved by adding different reverse bias voltages to a varactor diode, which is also the mechanism of voltage control; after replacing the crystal with the equivalent circuit of the crystal. Among them, Co, C1, L1, and RR are the equivalent circuits of the crystal. When the microcontroller is working, it takes instructions from the RoM one by one and then executes them step by step. The time it takes for the microcontroller to access the memory once is called a machine cycle, which is a time base.

  Analysis of the entire oscillation tank shows that using Cv to change the frequency is limited. The entire tank circuit that determines the oscillation frequency C=Cbe, Cce, Cv is connected in series, then connected in parallel with Co and then in series with C1. It can be seen that: the smaller C1 is, the larger Co is, and the smaller the effect on the entire tank circuit when Cv changes. Therefore, the frequency range that can be "voltage-controlled" is also smaller. In fact, since C1 is very small (1E-15 order of magnitude), Co cannot be ignored (1E-12 order of magnitude, a few PF). Therefore, when Cv becomes larger, the effect of reducing the tank circuit frequency becomes smaller and smaller, and when Cv becomes smaller, the effect of increasing the tank circuit frequency becomes larger and larger. On the one hand, this causes the nonlinearity of the voltage-controlled characteristics. The larger the voltage-controlled range, the more severe the nonlinearity; on the other hand, the feedback voltage (the voltage on Cbe) allocated to the oscillation becomes smaller and smaller, and finally causes the oscillation to stop. Through the schematic diagram of the crystal oscillator, you should have a general understanding of the role and working process of the crystal oscillator. The higher the number of overtones of the crystal oscillator, the smaller its equivalent C1; therefore, the smaller the frequency change range. >The necessity of single-chip crystal oscillator

  Simply put, without a crystal oscillator, there will be no clock cycle. Without a clock cycle, the program code cannot be executed and the microcontroller cannot work.

  3. The role of single chip crystal oscillator

  The function of the microcontroller crystal oscillator is to provide a basic clock signal for the system. Usually a system shares a crystal oscillator to facilitate synchronization of various parts. Some communication systems use different crystal oscillators for baseband and radio frequency, and synchronize them by electronically adjusting the frequency.

  Crystal oscillators are usually used in conjunction with phase-locked loop circuits to provide the clock frequency required by the system. If different subsystems require clock signals of different frequencies, they can be provided by different phase-locked loops connected to the same crystal oscillator.

  Under normal working conditions, the absolute accuracy of ordinary crystal oscillator frequency can reach 50 parts per million. Advanced ones have higher accuracy. Some crystal oscillators can also adjust the frequency within a certain range by applying an external voltage, which is called a voltage-controlled oscillator (VCO). Crystal oscillators use a crystal that can convert electrical energy and mechanical energy to work in a resonant state to provide stable and accurate single-frequency oscillation.

  4. How to distinguish the internal crystal oscillator and external crystal oscillator of the microcontroller

  The external crystal oscillator of the microcontroller is stable, less affected by environmental factors such as temperature and humidity than the internal oscillator, and has higher accuracy. Moreover, when the design needs to reduce power consumption, such as portable instruments, an external crystal oscillator is required, because the internal oscillator cannot be stopped as needed, while the external crystal oscillator can be stopped in time, thereby entering a dormant state and reducing power consumption.

  The internal crystal oscillator of the microcontroller is generally not accurate enough and has a large error. However, the internal crystal oscillator and the external crystal oscillator of the microcontroller have the same function, which is to provide the system with a clock. If the frequency requirement is not high (for example, if it does not involve serial communication and precise timing, etc.), the internal crystal oscillator is sufficient, and the cost is low. The frequency of the internal clock is affected by temperature and other factors, but it can save the money of the crystal oscillator and there are 2 I/Os. Therefore, if the frequency requirement is not high, the internal oscillation is generally preferred. If you want to save power and use SLEEP, then you can't use the internal oscillation, and the internal oscillation will stop!

Keywords:MCU Reference address:How to distinguish the internal crystal oscillator and external crystal oscillator of the microcontroller

Previous article:Realization of Master-Slave Communication between PC and Single-Chip Microcomputer
Next article:Baud rate self-adaptation method of STC 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号