11.1 Resetting the AVRDuring reset, all I/O Registers are set to their initial values, and the program starts executionfrom the Reset Vector. For the ATmega168P, the instruction placed at the Reset Vector must bea JMP - Absolute Jump - instruction to the reset handling routine. For the ATmega48P andATmega88P, the instruction placed at the Reset Vector must be an RJMP - Relative Jump -instruction to the reset handling routine. If the program never enables an interrupt source, theInterrupt Vectors are not used, and regular program code can be placed at these locations. Thisis also the case if the Reset Vector is in the Application section while the Interrupt Vectors are inthe Boot section or vice versa (ATmega88P/168P only). The circuit diagram in Figure 11-1 onpage 48 shows the reset logic. Table 29-3 on page 322 defines the electrical parameters of thereset circuitry.The I/O ports of the AVR are immediately reset to their initial state when a reset source goesactive. This does not require any clock source to be running.After all reset sources have gone inactive, a delay counter is invoked, stretching the internalreset. This allows the power to reach a stable level before normal operation starts. The time-outperiod of the delay counter is defined by the user through the SUT and CKSEL Fuses. Thedifferent selections for the delay period are presented in "Clock Sources" on page 28.
Hello,When we use reset pin of a microcontroller?What does this pin do?
In a more practical sense... you use the reset pin to reset the board - either because you want the sketch to restart, or to make the bootloader run so you can upload a new sketch.You may notice that arduino boards reset when you open the serial monitor - this is done by using the DTR pin on the serial adapter to pulse reset low (there's a clever trick they use to pulse reset low from that - search forums for "dtr reset trick" if interested in the details). This is how the IDE resets your board to upload a sketch to it - the earliest Arduino boards didn't do this, and required you to press the reset button at just the right moment in the upload process to reset the board.At a hardware level, reset is typically connected to an external pullup (10k to Vcc), a button that connects it to ground when pressed (ie, a reset button), and the 0.1uf cap for the DTR reset trick. All of those are optional - though you should have the pullup - and you need it if doing the trick. Since reset tri-states the pins, if you're really desperate for a USB-serial adapter and can't wait for a $1 adapter from ebay, you can use the serial adapter on an Uno/Mega/Nano board by holding reset low so the microcontroller doesn't interfere. You should *not* reset the board from software by connecting an output to reset and driving it low. The datasheet specifically cautions against this.
I have found how to use an Arduino pin to reset itself. Simply put a 0.1 uF cap between any pin and reset.