I connected a tactile switch to the AVR reset button according to the circuit below. every time I press the button the AVR resets itself but my question is: Is there a way to make this button acts after let's say 3 seconds? I mean press the button and hold it for 3 seconds and then the AVR resets itself. (some kind of resistor-capacitor circuitry)
Electronic – Press and hold the reset button to reset AVR!
avrreset
Related Topic
- Electronic – Pulse reset line with long press of a button
- Electronic – Understanding interrupts and software button debounce
- Electronic – STM32F4 doesn’t boot after reset and enables read out protection
- Electrical – Manual reset problem: CD4060 timer circuit
- Electrical – AVR Program doesn’t start running sometimes
- Electronic – When power is lost on an AVR chip (4313 and 8535) why does the mcu run slower
- Electronic – Firmware only runs when I press the reset button
Best Answer
The circuit here will activate the AVR reset about 3 seconds after the switch is pressed. The AVR will stay in reset as long as the held pressed over the 3 seconds and will then come out of reset about 0.75 seconds after the switch is released.
(Edit: Replaced schematic with one showing LM393 comparator).
In this schematic the V1 voltage source is there to provide a voltage controlled action of the S1 switch. Obviously in your case the S1 is simply a switch that you press with your finger.
The 3 second delay can be tweaked to get it as close to 3 seconds as you want by adjusting the R4 value.
The comparator shown for U1 is a device with a push-pull output so it would not need the R2 pullup resistor. If you choose some other 5V compatible comparator it may have an open drain output so would require the R2 resistor.