# Connecting the RESET pin of AT8051

How should I connect the RESET pin in a microcontroller (AT8051), and why in that particular way?

A fast search on Google gave me this:

The first circuit pulls the RESET pin low to enable the chip. The second circuit is the same, but with a reset button. If you press that, the chip will get reset.

• Maybe add a normally reverse biased diode across the resistor; when power is shut-off the 5V collapses to 0V and there is a possibility the reset pin will see negative voltages due to charge on capacitor. Commented May 1, 2013 at 7:18
• What about the ESD protection diodes that are almost surely already in the package? Commented May 1, 2013 at 11:00
• How does the RESET work? Why to give a RESET pin & how does it auto RESET in fig.(1) ? What's the concept? RESET pin is reset just by giving a +5V. Then why that kind of circuit? Simple connect +5V to push btn switch & then to RESET pin. That's it. Isn't it? Commented May 3, 2013 at 15:17
• Why the caps are used? And why the pull up & pull down? Commented May 3, 2013 at 15:19
• @abhisekp when RESET is high, the device goes into "RESET mode", it doesn't do a thing until it gets out of this mode. So you'll have to get the device out of RESET, so you need to pull the pin down (with the resistor). Otherwise, the pin floats and you can't rely on the device getting out of RESET. The cap is added to make sure the device isn't reset due to EMI.
– user17592
Commented May 3, 2013 at 15:20

When the 5V power is switched on, the capacitor shorts to 5V, and then gradually the RC circuit discharges to bring the reset pin to 0.

Calculate like this -

According to the 8051 documentation, the voltage across the reset pin should be at logic high for more than 2 machine cycles (where 1 machine cycle = 4 clock cycles). So $V_i = 5.0V$, $V_f = 90\%$ of $V_i$ (very safe). This means $V_i \cdot e^{-t/RC} > V_f (= 0.9 V_i)$.

So $e^{-t/RC} > 0.9$

so $t/RC < -1 \cdot ln 0.9$

now $t = \dfrac{10}{f_{xtal}}$ (safe, much higher than 2 machine cycles)

so $\dfrac{\frac{10}{f_{xtal}}}{RC} < 0.105$

so $RC > \dfrac{10}{0.105 \cdot f_{xtal}}$

so $RC > \dfrac{100}{f_{xtal}}$

if $R = 10k$,

$C > \dfrac{100}{f_{xtal} \cdot 10k}$

so $C > \dfrac{0.01}{f_{xtal}}$, units of $C$ will be $\mu F$ if $f_{xtal}$ is in $MHz$.

Typically, if $f_{xtal} = 11.0592MHz$ so $C > \dfrac{0.01}{11.0592} = 1nF$. So any value of $C > 1nF$ and $R = 10K\Omega$ would do our job.

• What does MFD (units of C) mean in your answer? Micro faradays? I've also formatted your equations using the site standard. Would you please make sure I didn't add any errors in it, please? Thanks. Commented Oct 23, 2015 at 12:35
• MFD = micro farads. Please also add 1Machine Cycle = 4 clock cycles, and Vf = 0.9Vi (not 90 of Vi) Commented Oct 23, 2015 at 17:49
• The formatting language had eliminated the % sign. I added it back. Sorry about that. What about the other changes? Is it all ok now? Commented Oct 23, 2015 at 17:57
• Yes. I have already checked it. Commented Oct 24, 2015 at 6:00
• Which documentation that you cite? Also, there's a lot of chip that its 1 machine cycle isn't equal to 4. For example, in the Intel MCS-51 family user manual, it is in 12 clocks. Commented Apr 20 at 6:23

All this works if the reset pin has a hysteresis protection. If not we will need a supervisory chip. Also, most reset pins are active low, so with the circuits shown above they will be in perennial reset mode. The resistor should be a pull up and not pull down. But my last point is not for the chip you mentioned in your doubt. Its more of a general comment.