High and low level reset circuit principle and the function of adding capacitors

what is reset

The function of the single-chip reset circuit is to restore the single-chip microcomputer to the initial state, let the single-chip microcomputer program execute from the beginning, the running clock is in a stable state, various registers and ports are in an initialized state, and so on. The purpose is to enable the microcontroller to execute the program from scratch stably and correctly.

Why add reset?

  • The default state and data of registers and RAM in digital circuits are uncertain after power-on. If there is a reset, we can reset the registers to the initial state, and the data of RAM can be reset to trigger RAM initialization.
  • If the program logic enters the wrong state, all logic states can be restored to the initial value by resetting. If there is no reset, the logic may run in the wrong state forever. (Some simple IC chips do not have a watchdog circuit and require an external reset)

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

Normal single-chip microcomputer and IC chip reset have a Reset pin, and the reset pin can be reset by passing a high/low level for a certain period of time.


A typical 51 single-chip microcomputer will reset when the RST reset pin lasts for more than two machine cycles.

Like our commonly used STM32F1 series, check the manual and know that the reset pin needs to be low for more than 20us to complete the reset
insert image description here

So how to design the reset circuit specifically, there are several types? We are generally divided into:

  • high reset
  • low level reset
  • key reset circuit
  • power-on reset circuit

A circuit device that restores a circuit to its starting state

High level power-on reset

insert image description here
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 abruptly, the capacitor is equivalent to a short circuit at the moment of power-on. The capacitor C11 is charged, and the charging current The voltage formed on the resistor is a high level; after the microcontroller resets, after a few milliseconds, the capacitor is charged, the circuit is open, the current is 0, the voltage across the resistor is approximately 0V, and RST is at a low level at this time. The microcontroller will enter the normal working state.

Capacitor charging time T/Reset duration:

T=1/9*R*C

Low level power-on reset

insert image description here

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

Capacitor charging time T/Reset duration:

T= 9*R*C

High level key reset

insert image description here

The high-level key is reset. When VCC is powered on, the capacitor C is charged. At this time, the circuit is turned on, a voltage appears on the 10K resistor, and the RST pin is at a high level, which resets the microcontroller; after a few milliseconds, C is fully charged. The circuit is open circuit, the current on the 10K resistor drops to 0, the voltage is also 0, and the RST pin is low, which makes the microcontroller enter the working state. During operation, press the button Key, the two ends of the capacitor are equivalent to a short circuit, the capacitor C is discharged, and the RST pin is at a high level, which resets the microcontroller. Release the button Key, and the capacitor C is charged again. After a few milliseconds, the charging is completed, the circuit is disconnected, and the single-chip microcomputer enters the working state.

Low level key reset

insert image description here
When the low-level button is reset, when VCC is powered on, the capacitor C is charged. At this time, the circuit is turned on, and the RST pin is low, which resets the microcontroller; after a few milliseconds, the capacitor C is fully charged, and the circuit is disconnected, and the current is The 10K resistor flows into the RST reset pin, and the RST pin is high, which makes the microcontroller enter the working state. During operation, press the key key, the RST reset pin is directly connected to GND, which is a low level, and the capacitor C discharges, which resets the microcontroller. Release the button Key, and the capacitor C is charged again. After a few milliseconds, the charging is completed, the circuit is disconnected, and the single-chip microcomputer enters the working state.

Please add image description

Please add image description

Guess you like

Origin blog.csdn.net/as480133937/article/details/123530049