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!
Previous article:Realization of Master-Slave Communication between PC and Single-Chip Microcomputer
Next article:Baud rate self-adaptation method of STC microcontroller
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- Brief Analysis of Automotive Ethernet Test Content and Test Methods
- Low-cost intelligent fire and theft alarm system
- 【ufun learning】Environment development and construction
- MSP430 - Timer_A timer interrupt program
- Bear Pai Hongmeng Development Board Review - [Use HUAWEI DevEco Device Tool to create a new project - Blink]
- Max30102 heart rate blood oxygen sensor measuring heart rate problem
- 【Mil MYS-8MMX】Part 2: WIFI connection network
- It's too late if you don't buy it now! Choose this gift for Children's Day and both parents and children will be happy
- [Raspberry Pi Pico Review] Unable to identify USB serial port
- Design and Implementation of Secondary Bootloader for TMS320C6000 Series
- What exactly is the input and output voltage range of an operational amplifier?