I think two level detectors may solve your problem. One for the high level threshold which gives an output when the signal is above that level and one for the lower threshold which gives an output when signal is below that threshold. One of these latch outputs would set a latch and the other one would clear the latch.
Les.
Les.





