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:

enter image description here

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.

  • 2
    \$\begingroup\$ 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. \$\endgroup\$ – Andy aka May 1 '13 at 7:18
  • 1
    \$\begingroup\$ What about the ESD protection diodes that are almost surely already in the package? \$\endgroup\$ – Phil Frost May 1 '13 at 11:00
  • \$\begingroup\$ 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? \$\endgroup\$ – abhisekp May 3 '13 at 15:17
  • \$\begingroup\$ Why the caps are used? And why the pull up & pull down? \$\endgroup\$ – abhisekp May 3 '13 at 15:19
  • \$\begingroup\$ @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. \$\endgroup\$ – user17592 May 3 '13 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.

  • \$\begingroup\$ 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. \$\endgroup\$ – Ricardo Oct 23 '15 at 12:35
  • \$\begingroup\$ MFD = micro farads. Please also add 1Machine Cycle = 4 clock cycles, and Vf = 0.9Vi (not 90 of Vi) \$\endgroup\$ – Hoven Mohali Hoven Trainings Oct 23 '15 at 17:49
  • \$\begingroup\$ The formatting language had eliminated the % sign. I added it back. Sorry about that. What about the other changes? Is it all ok now? \$\endgroup\$ – Ricardo Oct 23 '15 at 17:57
  • \$\begingroup\$ Yes. I have already checked it. \$\endgroup\$ – Hoven Mohali Hoven Trainings Oct 24 '15 at 6:00

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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.