I need a non-retriggerable one shot circuit (monostable) that will turn off during the timing cycle if a second input/trigger pulse is received. I.e. I wish to have a single momentary switch to start the timer, but if I press it again during the timing period, the thing cuts short (output goes low again) and the circuit resets. I don't mind whether this is done with a 555, flip-flops or a dedicated one shot IC, but can't for the life of me work out how to do it. Any pointers appreciated.
added: Get the datasheet for the 74HC/HCT221 dual Non-retiggerable One shot
- HC is std CMOS
- while HCT is TTL input thresholds of 1.3V for 3V logic as well as 5V logic
Non retriggerable one shots just loopback to disable the input while the output is active.
In the old days we used LS123's to do this, or counters or uC firmware. I guess now you could use a retriggerable 74HC123 to do the same.
But you must decide if you want state enabled (1 or 0) or edge triggered and if edge, then add a FF with edge sensitive clock which is reset by active out while disabling input to 1shot while out is active at same time.
But in this case, you want to cut short the non-retriggerable one shot if a 2nd edge is detected during the active cycle which is presumably longer than a person's reaction time and the input is already "deglitched" or filtered longer than the switch's bounce time.
- to do this a FF captures the 1st edge and triggers the retriggerable one shot which looped back to disable further triggers, then a 2nd FF clocks the output stage of the 1st FF to see if a trigger has already started and then forces a RESET on the one shot with the active level of the switch. The 1shot output only RESETs the 2nd FF while a 2nd short one shot resets the 1st FF making unable to be retriggered for a few microseconds and thus back to the idle state. Thus one dual D FF and one dual HC123 will work.
There may be simpler methods, but you have 4 states which requires 2 bits of memory (FF's). ... and that's my 2 bits worth of advice.