The role of microcontroller crystal oscillator

tags: Single chip computer

Crystal oscillator, also known as crystal oscillator, is usually divided into two types: active crystal oscillator and passive crystal oscillator. Passive crystal oscillator is generally called crystal (crystal), while active oscillator is called oscillator (oscillator). From the name of the crystal oscillator, you can know that it is destined to oscillate continuously.

A microcontroller is a complex synchronization timing circuit. In order to ensure the implementation of the synchronization method, the circuit should work strictly in accordance with the timing under the control of a unique clock signal. The function of the crystal oscillator is to provide the microcontroller system with a reference clock signal, similar to the instructor who shouts commands during military training. All soldiers complete the response actions under the instructor's command. All work inside the microcontroller is based on this clock signal. The circuit used to generate the clock signal required for the operation of a microcontroller is the clock circuit.

There is a high-gain inverter oscillator inside the STC89C52 microcontroller, with the input pin being 19-pin XTAL1 and the output pin being 18-pin XTAL2. As long as the crystal oscillator is connected between these two pins and two vibration capacitors, it can generally take about 30pf to form a stable self-exciting oscillator.

For STC microcontrollers, the crystal oscillator frequency range is generally 1.2MHZ~12MHZ. The higher the crystal oscillation frequency, the higher the system clock frequency, and the faster the microcontroller speed. Typically, the frequency of using a crystal oscillator is 6MHZ or 12MHZ. If the serial communication of a microcontroller is used in the system, a crystal oscillator with an oscillation frequency of 11.0592MHZ is generally used, which oscillates 11059200 times per second.

The microcontroller works according to timing. There are 4 timing concepts about the MCS-51 series microcontrollers, which can be explained by timing units. From small to large, they are: beat, state, machine cycle and command cycle. The period of the oscillation pulse is defined as the beat, which is represented by P, that is, the oscillation frequency of the crystal oscillator. After the oscillation pulse fosc passes through the binary frequency, it is the cycle of the microcontroller clock signal, defined as the state, and is represented by S. A state contains two beats, the beat corresponding to the first half cycle is called P1, and the beat corresponding to the second half cycle is called P2. The MCS-51 series microcontrollers adopt a timed control method and have a fixed machine cycle. It is specified that the width of a machine cycle is 6 states, that is, 12 oscillation pulse periods, so the machine cycle is the twelve frequency division of the oscillation pulse. For example, when the oscillation pulse frequency is 12 MHz, one machine cycle is 1 µs; when the oscillation pulse frequency is 6 MHz, one machine cycle is 2 µs. The instruction cycle is the largest timing unit, that is, the time required to execute an instruction. It is generally composed of several machine cycles. Different instructions also require different machine cycles. Instructions that contain one machine cycle are usually called single-cycle instructions, instructions that contain two machine cycles are called double-cycle instructions, and so on. It should also be noted that the "instructions" here refer to assembly instructions, not to C language programs.

 

Intelligent Recommendation

The difference between crystal and oscillator

Transfer from The difference between crystal and crystal: 1) Crystal oscillator is the abbreviation of active crystal oscillator, also called oscillator. The English name is oscillator. A crystal is a...

How crystal oscillator works

Crystal or Jingzhen, or silly? Crystal is short for crystal resonator (Crystal), also known asPassive crystal. Generally, it is an electronic component that uses the piezoelectric effect of quartz cry...

Explanation and application of crystal oscillator

1. The concept of crystal oscillator The crystal oscillator refers to the slice (referred to as the wafer) cut from a piece of quartz crystal at a certain azimuth angle. The quartz crystal resonator i...

Detailed test of crystal oscillator

Precautions for oscilloscope testing crystal oscillator Crystals generally output sine waves, and active crystal oscillators output sine waves or square waves. If the active crystal oscillator incorpo...

The working principle of crystal oscillator

Crystal or crystal, or is it silly to distinguish? Crystal is the abbreviation of crystal resonator (Crystal), also known asPassive crystal. Generally, it is an electronic component that uses the piez...

More Recommendation

Types of crystal oscillator

Cutting method The main frequency characteristics of a crystal oscillator depend on its internal crystal unit. The characteristics of the crystal unit depend on the cutting process. Different cutting ...

STM32 circuit crystal oscillator

The crystal oscillator is composed of a quartz crystal. The reason why a quartz crystal can be used as an oscillator is based on its piezoelectric effect: adding an electric field to the two poles of ...

Crystal Oscillator Circuit

Crystal oscillator circuit and working principle         crystal oscillatoris an electronic oscillator circuit for the mechanical resonance of a vibrating cryst...

The difference and use of crystal crystal and osilator crystal oscillator

Problem description: The use of MCU, MPU, and CPU is inseparable from the problem of crystal oscillator, because PLL needs to be used, crystal oscillator is equivalent to the heartbeat of MCU. I have ...

Detailed Explanation of Crystal Oscillator - Pierce Oscillator

1. Definition: Pierce oscillator (Pierce oscillator): It is an electronic oscillating circuit, which is suitable for generating oscillating signals with a quartz oscillating crystal. R1 in the above f...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top