Detailed explanation of the function and design of the microcontroller reset circuit

Publisher:芳华逝水Latest update time:2023-01-31 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

what is reset

The function of the microcontroller reset circuit is to restore the microcontroller to the starting state, allow the microcontroller program to be executed from the beginning, the running clock is in a stable state, various registers, ports are in the initialization state, etc. The purpose is to enable the microcontroller to execute the program stably and correctly from scratch.


Why add reset?

The default state and data of registers and RAM in digital circuits after power-on are uncertain. If there is a reset, we can reset the register to the initial state, and the RAM data can trigger RAM initialization through reset.

If the program logic enters the wrong state, all logic states can be restored to their initial values ​​through reset. If there is no reset, the logic may always run in the wrong state. (Some simple IC chips do not have a watchdog circuit and require an external reset)

Okay, through the above two paragraphs, you understand the role of the reset circuit and why it is necessary to add a reset circuit

Normal microcontrollers and IC chip resets have a Reset pin. Reset can be achieved by passing the high/low level to the reset pin for a certain period of time.

A typical 51 microcontroller will reset when the RST reset pin remains high for more than two machine cycles.

Like our commonly used STM32F1 series, check the manual and find out that the reset pin needs to be at a low level for more than 20us to complete the reset.

c1293322-e0aa-11ec-ba43-dac502259ad0.png

So how to design the reset circuit specifically, and how many types are there? We generally divide it into:

high reset

low reset

Button reset circuit

Power on reset circuit

A circuit device that restores a circuit to its original state

High level power on reset

c17d1e92-e0aa-11ec-ba43-dac502259ad0.png

Let's take a look at the high-level power-on reset, which is essentially an RC series charging circuit. At the moment of power-on, since the voltage across the capacitor cannot change suddenly, the capacitor is equivalent to a short circuit at the moment after power-on. Capacitor C11 is charged, and the charging current The voltage formed on the resistor is high level; the microcontroller is reset. After a few milliseconds, the capacitor is fully charged, the circuit is open, the current is 0, and the voltage across the resistor is approximately 0V. At this time, RST is low level. The microcontroller will enter normal working state.

Capacitor charging time T/reset duration:

T=(1/9)*R*C

1

Low level power on reset

c1f343ce-e0aa-11ec-ba43-dac502259ad0.png

Low-level power-on reset. Due to the characteristic that the voltage across the capacitor cannot mutate suddenly, the potential of the RST terminal is approximately GND at the moment of power-on. The C11 capacitor is charged through the 10K resistor. At this time, the RST reset pin voltage is low level; The microcontroller is reset. After a few milliseconds, the capacitor is full, the circuit below is open, the current is 0, the current flows into the RST reset pin through the resistor, and the pin is high. At this time, the microcontroller will enter the normal working state.

Capacitor charging time T/reset duration:

T= 9*R*C

1

High level key reset

c2155ab8-e0aa-11ec-ba43-dac502259ad0.png

High level button reset, when VCC is powered on, capacitor C is charged. At this time, the circuit is turned on, voltage appears on the 10K resistor, and the RST pin is high level, causing the microcontroller to reset; after a few milliseconds, C is full, and at this time The circuit is open, the current on the 10K resistor drops to 0, the voltage is also 0, and the RST pin is low level, causing the microcontroller to enter the working state. During operation, when the button Key is pressed, both ends of the capacitor are equivalent to a short circuit, the capacitor C is discharged, and the RST pin is high, causing the microcontroller to reset. Release the key, and the capacitor C is charged again. After a few milliseconds, the charging is completed, the circuit is open, and the microcontroller enters the working state.

Low level key reset

c2537cc6-e0aa-11ec-ba43-dac502259ad0.png

Low level button reset, when VCC is powered on, capacitor C is charged. At this time, the circuit is turned on, and the RST pin is low level, causing the microcontroller to reset; after a few milliseconds, capacitor C is full, and the circuit is open at this time, and the current is The 10K resistor flows into the RST reset pin, and the RST pin is high level, causing the microcontroller to enter the working state. During operation, when the button Key is pressed, the RST reset pin is directly connected to GND, which is low level, and the capacitor C is discharged, causing the microcontroller to reset. Release the key, and the capacitor C is charged again. After a few milliseconds, the charging is completed, the circuit is open, and the microcontroller enters the working state.


Reference address:Detailed explanation of the function and design of the microcontroller reset circuit

Previous article:High level reset and low level reset of microcontroller
Next article:A few tips to teach you how to solve the endless problems of microcontroller reset

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号