Why is it necessary to add a certain delay time when the MCU is powered on?

In the process of each power-up of the microcontroller and its application circuit, because there are usually some filter capacitors with different capacities in the same power supply circuit, the power supply voltage value VDD felt by the microcontroller chip between its power pins VCC and VSS , Is gradually rising from low to high. The duration of this process is generally 1-100ms (denoted as tsddrise). The definition of power-on delay taddrise is the time required for the power supply voltage to rise from 10% VDD to 90% VDD, as shown in Figure 1.

The power-on reset POR (Pmver On Reset) of the 80C51 single-chip microcomputer is essentially a power-on delay reset, that is, the single-chip microcomputer is locked in the reset state during the power-on delay. Why is it necessary to add a certain delay time every time the MCU is powered on? analyse as below.

1 Power-on reset sequence

In the process of each power-up of the microcontroller and its application circuit, because there are usually some filter capacitors with different capacities in the same power supply circuit, the power supply voltage value VDD felt by the microcontroller chip between its power pins VCC and VSS , Is gradually rising from low to high. The duration of this process is generally 1-100ms (denoted as tsddrise). The definition of power-on delay taddrise is the time required for the power supply voltage to rise from 10% VDD to 90% VDD, as shown in Figure 1.

Why is it necessary to add a certain delay time when the MCU is powered on?

After the single-chip power supply voltage rises to a range suitable for the operation of the internal oscillator circuit and stabilizes, the clock oscillator starts the startup process (specifically including bias, start-up, lock, and stabilization processes). The duration of this process is generally 1-50 ms (denoted as tOSC). The start-up delay tOSC is defined as the time required for the high level of the output signal of the clock oscillator to reach Vih1. It can also be seen clearly from the actual measurement graph shown in Figure 1. Vih1 here is a common parameter in the electrical characteristics of the single-chip microcomputer, which represents the high level of the input logic on the XTALl and RST pins. For example, for the common microcontroller models AT89C5l and AT89S5l, the Vih1 value given by the manufacturer is 0.7VDD~VDD 0.5V.

In theory, the short delay required for each power-on reset of the microcontroller should not be less than treset. Here, treset is equal to the sum of power-on delay taddrise and start-up delay tOSC, as shown in Figure 1. In fact, delaying a treset is often not enough, and it cannot guarantee that the microcontroller has a good start to work.

Each time the microcontroller is initially powered on, the first functional component to be put into work is the reset circuit. The reset circuit locks the microcontroller in the reset state and maintains a delay (denoted as TRST) in order to give the power supply voltage a waiting time from rising to stability; after the power supply voltage is stable, a delay is inserted to give the clock oscillator from It is a waiting time for starting to stabilize; before the one-chip computer starts to enter the running state, the delay of at least 2 machine cycles should be postponed, as shown in Figure 2.

Why is it necessary to add a certain delay time when the MCU is powered on?

2 3 types of power-on reset circuits

The above-mentioned series of delays are formed by the charging time of an external RC branch on the RST pin of the single-chip microcomputer. A typical reset circuit is shown in Figure 3 (a), where the resistance and capacitance values ​​are provided in the original manual. After a series of delays, the one-chip computer starts to enter the normal program operation state according to the working frequency of the clock source. From the measured curve shown in Figure 2, 4 curves can be seen at the same time: VDD, Vrst, XTAL2 and ALE. After the power supply voltage and the oscillator output signal are stable, it waits for a longer delay before releasing the RST signal, so that the CPU is out of the reset lock state; and once the RST signal is released, the continuation can be detected on the ALE pin immediately Pulse signal.

Why is it necessary to add a certain delay time when the MCU is powered on?

Since the reset logic of the standard 80C51 is relatively simple, the reset source is only RST (compared to the new microcontroller, the reset source is relatively single), so the reset activity and the entry of the reset state caused by various reasons must rely on the external pin RST A high-level signal with a certain time width is applied to achieve this.

The standard 80C5l not only has a single reset source, but also has not designed a delay function for internal power-on reset. Therefore, an external resistor-capacitor branch must be used to increase the delay link, as shown in Figure 3(a). In fact, the external resistor R can still be omitted because there is a ready-made pull-down resistor Rrst inside some CMOS microcontroller chips. For example, the Rrst resistance of the AT89 series is about 50-200 kΩ; the Rrst resistance of the P89V51Rx2 series is about 40-225 kΩ, as shown in Figure 4. Therefore, on the basis of Figure 3 (a), the power-on reset delay circuit can also be reduced to the simplified circuit shown in Figure 3 (b) (the capacity of the capacitor C is also reduced accordingly).

After each single-chip power-off, the charge on the delay capacitor C must be discharged immediately in order to prepare for the subsequent power-up again in a short period of time. Otherwise, if C is not fully discharged after the power is off, if the power is turned on again soon, the RC branch will lose its due delay function. Therefore, by adding a discharge diode D on the basis of Figure 3(a), the power-on reset delay circuit becomes an improved circuit as shown in Figure 3(c). In other words, only the charging process of the RC branch is useful to the circuit, and the discharging process is not only useless, but also brings potential harm. Therefore, a discharge diode D is added to greatly shorten the discharge duration in order to eliminate hidden dangers. The diode D is only in forward conduction at the moment when the microcontroller is powered off (that is, VCC approaches 0V, which can be regarded as a short circuit of VCC to ground), and is always in the reverse bias cut-off state.

Why is it necessary to add a certain delay time when the MCU is powered on?

3 Analysis of two cases of power-on reset failure

If the power-on reset delay time is not enough or there is no delay process at all, the single-chip microcomputer may face the following two dangers, which will cause the CPU to start executing the program without a good initialization, or even fall into a disordered state.

①Before the clock pulse output by the clock oscillator is stable, or even before it starts to oscillate, the CPU is indulged to start executing the program by releasing the locked state of the RST signal. This will cause the address code fetched for the first time in the program counter PC to be a random value other than 0000H, which will lead the CPU to a chaotic state. Refer to the measured signal curve shown in Figure 5.

Why is it necessary to add a certain delay time when the MCU is powered on?

② Release the locked state of the RST signal before the power supply voltage has risen to the proper range (naturally before the clock has stabilized), which will make the microcontroller never feel the reset signal, experience the reset process, and include PC The content of each SFR is not initialized but retains a random value, which causes the CPU to execute the program from a random address, and thus also falls into a state of confusion. Refer to the measured signal curve shown in Figure 6.

Why is it necessary to add a certain delay time when the MCU is powered on?

4 External monitor MAX810x

In order to improve the stability of the single-chip application system and ensure the reliable reset of the single-chip application system, many world-renowned semiconductor companies have successively introduced a wide range of special applications with different functions and small packages. This text only takes the 3-pin chip MAX810x with power supply voltage drop reset and power-on delay reset function as an example, and a brief description.

MAX810x (x=L, M, J, T, S, or R) is a set of CMOS power monitoring circuits developed by Maxim in the United States, which can monitor 3~ Power supply voltage of 5V. A reset pulse with a pulse width of not less than 140ms is generated during power-on, power-off and drop of the power supply. Compared with the undervoltage detection circuit composed of discrete components or general-purpose chips, the functions of voltage detection and reset delay are integrated into a small chip in a 3-pin package, which greatly reduces the complexity of the system circuit and reduces the components. The quantity of the system significantly improves the reliability and accuracy of the system. The application circuit is shown in Figure 7.

Why is it necessary to add a certain delay time when the MCU is powered on?

The MAX810x series products provide a high-level reset signal, and can also provide 6 fixed detection thresholds (4.63V, 4.38V, 4.OOV, 3.08V, 2.93V and 2.63V). For example, the detection threshold voltage of MAX810M is 4.38V, and the hysteresis voltage is about 0. 16V.

For MAX810, during power-up, power-off or drop, as long as VCC is still higher than 1.1V, the RESET pin can be guaranteed to output a high voltage. During the rising period of VCC, RESET maintains a high level until the power supply voltage rises above the reset threshold. After exceeding this threshold, the internal timer maintains approximately 240 ms and then releases RESET to return it to low level. Whenever the power supply voltage drops below the reset threshold (that is, the power drops), the RESET pin will immediately go high.

The Links:   LQ104S1DG31 BSM300GA120DN2S

Related Posts