A reset circuit is a device used to restore a circuit to its initial state. Its operating principle is similar to that of a calculator, only the activation principle and method differ. A reset circuit restores the circuit to its initial state, much like the zero button on a calculator, allowing it to return to its original state and perform calculations again.
Unlike the reset button on a calculator, the reset circuit is activated in different ways. First, it resets immediately upon powering on the circuit; second, it can be manually activated when necessary; and third, it can be activated automatically as needed by the program or circuit operation. Reset circuits are generally simple, often consisting only of a combination of resistors and capacitors. More complex circuits may use transistors in conjunction with the program.
The role of the capacitor in the reset circuit:
The resistor's function is not to limit the current magnitude, but to control the reset time. The capacitor's charging time is proportional to the RC value. The capacitor in the reset circuit only functions briefly during power-on; current flows through the capacitor during charging, so the RST pin receives a high level. After charging, no current flows, and the RST pin goes low. The crystal oscillator circuit is internal to the microcontroller, and this circuit always has a power supply. By making the reset pin level and the power supply level change asynchronously, causing the reset pin level to rise later than the power supply level, this situation is created for a short period of time.
1. The power supply has reached normal operating power.
2. The reset level is lower than the low-level threshold (and is treated as logic 0).
This state is the reset state. It's impossible to achieve both of these simultaneously using only one resistor. Reset provides the chip with the required reset condition, typically a fixed voltage level for N machine cycles. A low-level reset means the chip remains low for at least N cycles after it's functioning normally, then goes high. A high-level reset means the chip remains high for at least N cycles after it's functioning normally, then goes low.
Another explanation:
At power-on, because the voltage across the capacitor cannot change abruptly, the voltage at the RST pin is VR = VCC. As the capacitor charges, the voltage at the RST pin decreases exponentially. By time t1, VR has dropped to 3.6V, and as the capacitor continues charging, VR will eventually approach 0V. To ensure the microcontroller resets, t1 must be longer than two machine cycles. The machine cycle depends on the crystal oscillator frequency used by the microcontroller system. R cannot be too small, typically 8.2kΩ. t1 is related to the time constant of the RC circuit; the value of C can be calculated from the crystal oscillator frequency and R.
Assuming a high-level reset is effective, the charge-discharge cycle is 1.386 * RC. Discarding the lower levels during the charge-discharge process, the typical reset pulse width for a microcontroller is (0.7~1)RC. These are approximate values; a longer voltage level hold time is better, and a larger capacitor is preferable. The unit is: (R) * (C) = (ohms) * (farads) = seconds.
For example: R = 470K, C = 0.15UF, then the delay time is (470 * 1000) * (0.15 / 1000000) = 0.0705 seconds.