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< 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. 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? 3: Clock circuit: that is, crystal oscillator circuit
Power-on reset: It means that after the microcontroller starts the power, it starts automatically resetting.
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.
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.
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.
Previous article:Design of Matrix Buttons of Single Chip Microcomputer
Next article:In-depth analysis of the internal structure of the 89C51 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
- 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
- [Qinheng RISC-V core CH582] Bluetooth HID keyboard code interpretation
- Ask: Why SP485REN-L/TR is frequently damaged
- Xunwei i.MX6ULL Terminator transplant ssh service installation test
- [Must-have for power supply design] List of common safety requirements for switching power supplies!
- Why is 16MHZ not available for msp430?
- The live broadcast has ended [Microchip Embedded Security Solutions | Anti-counterfeiting protection for disposable products]
- Comparison of the advantages of three-resistance current sampling and single-resistance
- [TI recommended course] #Innovation of general-purpose op amp and comparator chips#
- An application example of a certain brand of high power density power module
- Will the DS1100 delay chip affect my analog signal?