4
\$\begingroup\$

I need to make sure that my ATtiny does not reset unexpectedly. To do that, I am planning on connecting the RESET pin directly to VCC.

However, I have heard some places that you need a 10k resistor between VCC and the RESET pin, to prevent too much current from flowing into the RESET pin and burning the IC. I have also seen some places that you do not need a resistor between VCC and RESET, and I have also read a few places that you do not even need to connect RESET to anything, because it is pulled high internally.

I could not find any definitive answer on this, and I would like to know what the case would be for each of these condidions (directly to VCC, VCC through resistor, don't connect RESET pin at all) is.

\$\endgroup\$
  • 1
    \$\begingroup\$ How will you program your attiny if the reset is always high? \$\endgroup\$ – BeB00 Feb 18 at 4:22
  • \$\begingroup\$ when in doubt, use a 10kΩ resistor ..... that way you have a known state at the reset pin and you can pull it low if you have to for programming ..... direct connection to Vcc would prevent programming \$\endgroup\$ – jsotola Feb 18 at 4:22
  • 1
    \$\begingroup\$ The definite answer is the manual. It will tell you if there is an internal pull-up or not. Decent manuals also suggest what decoupling caps to use. \$\endgroup\$ – Lundin Feb 18 at 8:48
  • 2
    \$\begingroup\$ "to prevent too much current from flowing into the RESET pin and burning the IC" This however, is nonsense. \$\endgroup\$ – Lundin Feb 18 at 8:54
  • \$\begingroup\$ Which ATTINY? There are several! \$\endgroup\$ – bigjosh Feb 18 at 21:07
5
\$\begingroup\$

I don't think theres a technical reason why you couldn't connect your reset pin directly to +V, as long as it was already programmed and you never wanted to modify that program. As far as I'm aware, there is no function of the attiny that requires the reset pin to be pulled low (for example, the watchdog timer doesn't try to pull the reset line low).

Having said that, there isn't really a good reason why you would want to have the line directly connected, and there are quite a few where you wouldn't want it to be directly connected (like programming, and manual reset etc).

The attiny does have an internal pull-up to VCC, but its quite weak (~100k iirc), so environmental conditions could cause a spontaneous reset. If you're worried about this, you should use an external pull-up resistor. It means using an extra component, but it's safer, especially if your reset pin is routed to a programming connector.

\$\endgroup\$
  • 1
    \$\begingroup\$ Programming and debug interfaces often like to pull the reset pin low. \$\endgroup\$ – Lundin Feb 18 at 8:50
  • \$\begingroup\$ As I said, you could only connect reset to VCC if you had already programmed the chip, and never wanted to change the program \$\endgroup\$ – BeB00 Feb 18 at 18:02
10
\$\begingroup\$

datasheet shows a internal pull-up resistor

First, in the ATtiny25/45/85 datasheet, page 161, it suggested that there's a internal pull-up resistor between 30 kΩ - 60 kΩ on the RESET pin. It means the MCU will almost always work for a hobby project. However, if the requirement is high reliability,

I need to make sure that my ATtiny does not reset unexpectedly.

Then you have to put external EMI/RFI and ESD into your consideration. I strongly suggest reading AVR040: EMC Design Considerations.

datasheet

Finally, it should be noted, that unexpected reset is inevitable for any MCU facing hostile environment in the long run, sometimes you even have to trigger it deliberately (e.g. through a watchdog timer) to prevent damage from a runaway program. On one hand, you should take precautionary measures in your circuity to defend yourself from spurious reset and ESD, on the other hand, you still need to make your program to be robust enough to handle unexpected reset.

\$\endgroup\$
4
\$\begingroup\$

The reset pin is internally pulled-up and glitch filtered so you do not need a resistor.

enter image description here

You can leave the pin unconnected (no trace since a trace can pick up noise) and it would take some pretty strong noise to make the chip reset unexpectedly - probably enough that other bad things would happen first.

If you really never want the chip to get reset then you can set the RSTDISBL (reset disable) fuse after programming your firmware. Once this fuse is set, the reset pin becomes an IO pin and will not reset the chip even if tied to ground. enter image description here

Note that after disabling the reset pin with RSRDISBL it is harder to reprogram the chip since you might need to use High Voltage Programming (depending on which ATTINY you are using).

\$\endgroup\$
  • \$\begingroup\$ To be fair, Atmel (Microchip) does recommend an external reset pull-up in noisy environments, per AVR042, suggesting that it's not an extremely rare event \$\endgroup\$ – BeB00 Feb 18 at 4:47
  • \$\begingroup\$ @beb00 Yea, that note also sort of maybe suggests attaching a capacitor between RESET and ground which doesn't make much sense. In practice, an extra pull-up might help if there is a long trace that connected to the RESET pin, but if the pin in connected then there is really very very little length there to pick up an e field and the glitch detector should block any inductively coupled impulses. I've never seen an ATTINY spontaneously reset due to noise on an unconnected RESET. Have you? \$\endgroup\$ – bigjosh Feb 18 at 4:59
  • \$\begingroup\$ Note that I have seen ATTINYs spontaneously reset from a negative ESD strike directly to the Vcc line, but this is due to under voltage and not the reset line. \$\endgroup\$ – bigjosh Feb 18 at 5:21
  • \$\begingroup\$ Where's this picture from? Another answer quotes the manual that says there's no internal pull-up present. Then of course you must have an external pull-up. \$\endgroup\$ – Lundin Feb 18 at 8:53
  • \$\begingroup\$ @Lundin The other answer quotes from the specific datasheet but also from a more generic application note that presumably covers older microcontrollers lacking a pull-up. \$\endgroup\$ – pipe Feb 18 at 16:17

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.