Analysis of the Minimum System of 89C51 Single-Chip Microcomputer

Publisher:滁州鱼儿Latest update time:2015-09-30 Source: eefocusKeywords:89C51 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Students who have studied the 89C51 single-chip microcomputer are more familiar with the minimum system circuit of the single-chip microcomputer. What is the minimum system circuit?

The minimum system circuit refers to the smallest circuit that can make the microcontroller work, mainly including: power supply circuit, reset circuit, and clock circuit.


1: Power circuit

The power supply circuit is the power supply circuit of the microcontroller, which is generally 3.3V or 5V. The specific amount depends on the working voltage of various types of microcontrollers. Usually it is 5V. Here it refers to normal circumstances.

2: Reset circuit: including power-on reset and manual reset

At the moment of power on, the voltage on the capacitor cannot "jump", and the voltage on the reset pull-down resistor is close to the power supply voltage, that is, RST is at a high level. During the process of capacitor charging, the voltage at the RST terminal gradually decreases. When the voltage at the RST terminal is less than a certain value, the CPU leaves the reset state. Since the capacitor C1 is large enough, it can ensure that the effective time of the RST high level is greater than 24 oscillation cycles, and the CPU can be reliably reset. The manual reset button is added to avoid the inability to reliably reset when the system freezes. When the reset button is pressed, the capacitor C1 discharges through R5. When the capacitor C1 is discharged, the potential at the RST terminal is determined by the voltage divider ratio of R1 and R2. Since R11<



Power-on reset: It means that after the microcontroller starts the power, it starts automatically resetting.

Analysis of the Minimum System of 89C51 Single-Chip Microcomputer

The reset circuit is composed of a capacitor and a resistor in series. From the figure and the property that "capacitor voltage cannot change suddenly", we can know that when the system is powered on, the RST pin will have a high level, and the duration of this high level is determined by the RC value of the circuit. A typical 51 microcontroller will reset when the high level of the RST pin lasts for more than two machine cycles, so a proper combination of RC values ​​can ensure a reliable reset. It is generally recommended that C take 10uF and R take 4.7K. Of course, there are other methods, but the principle is to allow the RC combination to produce a high level of no less than 2 machine cycles on the RST pin.

Manual reset: The reset circuit of the microcontroller is like the restart part of a computer. When the computer freezes during use, the program inside the computer will be executed from the beginning by pressing the reset button. The same is true for the microcontroller. When the microcontroller system is running and the program is disturbed by the environment and runs away, the program inside will automatically start from the beginning by pressing the reset button. As shown in the figure below, the waveform of the manual reset RST is 1.37S-1.09S=028S, which meets the requirement of 24 high-level clock cycles.

Analysis of the Minimum System of 89C51 Single-Chip Microcomputer
 

To reset the 51 single-chip microcomputer, you only need to connect a high level to the 9th pin for 2US. How is this process achieved?
In the single-chip microcomputer system, the system is reset once when it is powered on, and the system is reset again when the key is pressed. If it is released and then pressed again, the system will reset. Therefore, the reset can be controlled in the running system by opening and closing the key. How to
calculate the power-on reset?
In the circuit diagram, the size of the capacitor is 10uF and the size of the resistor is 4.7k. So according to the formula, it can be calculated that the time required for the capacitor to charge to 0.7 times the power supply voltage (the power supply of the single-chip microcomputer is 5V, so charging to 0.7 times is 3.5V), is 4.7K*10UF=0.047S.
That is to say, within 0.047S when the computer starts, the voltage across the capacitor increases from 0~3.5V. At this time, the voltage across the 4.7K resistor decreases from 5~1.5V (the sum of the voltages at each point in the series circuit is the total voltage). So within 0.047S, the voltage received by the RST pin is 5V~1.5V. In the 51 MCU working normally at 5V, the voltage signal less than 1.5V is a low-level signal, and the voltage signal greater than 1.5V is a high-level signal. So within 0.047S of power on, the MCU system automatically resets (the high-level signal received by the RST pin takes about 0.1S).
Manual reset calculation?
After the MCU starts for 0.047S, the voltage across the capacitor C continues to charge to 5V. At this time, the voltage across the 4.7K resistor is close to 0V, and RST is at a low level, so the system works normally. When the button is pressed, the switch is turned on. At this time, a loop is formed across the capacitor, and the capacitor is short-circuited. Therefore, during the process of pressing the button, the capacitor begins to release the previously charged electricity. As time goes by, the voltage of the capacitor is released from 5V to 1.5V or even smaller within 0.047S. According to the series circuit voltage is the sum of all the points, at this time the voltage across the 4.7K resistor is 3.5V, or even greater, so the RST pin receives a high level again. The single-chip system automatically resets.
Summary:
a: The principle of the reset circuit is that the RST pin of the single-chip receives a level signal of more than 2US. As long as the charge and discharge time of the capacitor is greater than 2US, the reset can be achieved, so the capacitance value in the circuit can be changed.
b: The system resets when the button is pressed, which is caused by the capacitor being in a short circuit circuit, releasing all the electrical energy, and the voltage across the resistor increases.

 

3: Clock circuit: that is, crystal oscillator circuit

Analysis of the Minimum System of 89C51 Single-Chip Microcomputer
Generally, a 12Mhz crystal oscillator is selected to facilitate the use of timer and counter functions. AT 89C51 has a high-gain inverting amplifier, which is the main unit of the internal oscillator. XTAL2 and pin XTAL1 are the output and input of the amplifier respectively. The off-chip quartz crystal or ceramic resonator and the amplifier together constitute a self-excited oscillator. The bypass capacitors Cl and C2 are connected to the amplifier with feedback function with the external quartz crystal (or ceramic resonator), forming a parallel feedback oscillation circuit. Even if there are no very strict requirements for the external bypass capacitors Cl and C2, the size of the capacitor capacity will slightly affect the stability of the oscillator frequency, the amplitude of the oscillation frequency, the difficulty of starting oscillation, and the temperature stability, etc. If a quartz crystal is used, the capacitor is usually selected as 30pF±10pF, and if a ceramic resonator is used, the capacitor is usually selected as 40pF±10F.

Keywords:89C51 Reference address:Analysis of the Minimum System of 89C51 Single-Chip Microcomputer

Previous article:Design of Matrix Buttons of Single Chip Microcomputer
Next article:In-depth analysis of the internal structure of the 89C51 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号