51 MCU clock circuit principle

Publisher:心灵的旅程Latest update time:2021-02-04 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.


Reference address:51 MCU clock circuit principle

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?

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号