The clock circuit is an oscillator that provides a beat for the microcontroller. The microcontroller must perform various operations under the control of this beat. Therefore, the microcontroller will not work properly without a clock circuit. The clock circuit itself does not control anything, but you use the program to let the microcontroller do the corresponding work according to the clock.
There is a high-gain inverting amplifier in the MCS-51 microcontroller. The input of the inverting amplifier is XTAL1 and the output is XTAL2. The oscillator circuit and the clock circuit formed by the amplifier together constitute the clock mode of the microcontroller. According to the different hardware circuits, the clock connection mode of the microcontroller can be divided into internal clock mode and external clock mode, as shown in Figure 1.
(a) Internal clock circuit (b) External clock circuit
Figure 1 Clock circuit
Internal clock schematic (a self-excited oscillation circuit)
In the internal clock circuit, a quartz crystal oscillator and two fine-tuning capacitors must be connected across the XTAL1 and XTAL2 pins to form an oscillation circuit. Usually, C1 and C2 are 30pF, and the frequency of the crystal oscillator is between 1.2MHz and 12MHz. For the external clock circuit, XTAL1 is required to be grounded and XTAL2 is connected to the external clock. There are no special requirements for the external clock signal, as long as a certain pulse width is guaranteed and the clock frequency is lower than 12MHz.
The oscillation signal of the crystal oscillator is sent to the internal clock circuit from the XTAL2 terminal, which divides the oscillation signal into two and generates a two-phase clock signal P1 and P2 for the single-chip microcomputer. The period of the clock signal is called the state time S, which is twice the oscillation period. The P1 signal is valid in the first half of each state, and the P2 signal is valid in the second half of each state. The CPU uses the two-phase clock P1 and P2 as the basic beat to coordinate the effective operation of various parts of the single-chip microcomputer.
Previous article:51 MCU ultrasonic module digital tube program writing
Next article:How to use 51 single-chip digital tube to realize the function of marquee?
- 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
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- 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
- What is the secret to keep your spectrum analyzer from getting sick?
- FPGA Simplified Design Method Case 4
- Accelerometer, gyroscope, magnetometer, air pressure angle measurement sensor
- TI_ADS1293 Bluetooth Wireless Heart Monitoring Reference Design_
- "Recommend Chinese Chip" + Qinheng CH549
- Today is Double 11, have you grabbed the goods? Don’t forget to participate in our product sharing event!
- How to solve the design problem of irregular PCB?
- I am poor and I want to earn some download points
- EEWORLD University Hall----Live Replay: Develop AI Intelligent Robots Based on TI's Newly Released Robotics SDK
- The 2022 provincial competition questions are out