I am trying to make a button control on/off and reset all in one, but I can't quite get my head around how to design it.
It should basically function like a PC power button. If short press it's either on or off, depending on state, and a long press is the reset that works when something completely locks up the computer. The on/off is easy as that's software controlled, but the reset has to be in hardware somehow as it has to ALWAYS work, no matter the state of the software or MCU.
The reset functionality should kick in after a long press of about 5~10 s. Once the reset signal goes low it should stay low for >10ms. How to do this?
I can find dedicated IC's that can set a signal low for x ms, which would work, but how do I trigger them in a good way? RC and then a comperator to trigger at a set voltage or...? And how do I avoid triggering the reset when starting up if using the RC approach?
Any help would be appriciated.