Bringing Reset Pin Low to Upload Code Wirelessly

Automatic (Software) Reset

Rather then requiring a physical press of the reset button before an upload, the Arduino Pro Mini is designed in a way that allows it to be reset by software running on a connected computer. One of the pins on the six-pin header is connected to the reset line of the ATmega168 via a 100 nanofarad capacitor. This pin connects to one of the hardware flow control lines of the USB-to-serial convertor connected to the header: RTS when using an FTDI cable, DTR when using the Sparkfun breakout board. When this line is asserted (taken low), the reset line drops long enough to reset the chip. The Arduino software uses this capability to allow you to upload code by simply pressing the upload button in the Arduino environment. This means that the bootloader can have a shorter timeout, as the lowering of the reset line can be well-coordinated with the start of the upload.

How to you set the pin definition for the reset pin? How do you bring the reset pin LOW in the code? :open_mouth:

How to you set the pin definition for the reset pin?

Connect the reset pin to another digital pin.

How do you bring the reset pin LOW in the code?

digitalWrite() the pin LOW.

Of course, this won't really work, since the pin being used to reset the Arduino will be turned off before the reset is complete, so, then you'll be screwed.

How can I use the RST pin to upload new code wirelessly? How do you bring reset low for 3 seconds from a digital pin before the digital pin is turned off? Does this require a second Arduino Uno? :relaxed:

I'd really like to know how to use the RST line for uploading new code. please help!

Why not just learn how to use the watch dog timer hardware on the chip to generate a true hardware reset at the time of your choice.

How do you bring the reset pin LOW in the code?

You don't, not without external hardware.

How do you bring reset low for 3 seconds from a digital pin before the digital pin is turned off?

See above.

Does this require a second Arduino Uno?

That is one way to do it, but there are probably much simpler ways.

Your original quote told you how it's done, DTR is connected to RST through a 100nF capacitor, the PC drops DTR just before starting the download, this causes a pulse on the RST pin.

What exactly are you trying to achieve?


Rob