I have a protection circuit that will send a logic high to an output if things go "out of spec". The details aren't really important -- suffice it to say the detector works OK, but I'm trying to set up a latch (?) so that if/when things return to normal, the protection remains tripped until it is manually reset. In logic terms, if the input to the system is low, the output is low. If the input goes high, the output goes high. If the input returns to low, the output will remain high indefinitely. Only way out is a power cycle.
Because this is a protection circuit, I don't want to depend on software to handle this. I have two designs ("A" and "B" in the attached diagram) that simulate OK, but I have concerns...
Design "B" is simple -- there's an N-channel FET with 5V on the drain. The source is grounded through a 10K resistor, but between the source and resistor, there's a trace to the gate. The idea is that, once the transistor is turned on by the external input, it will keep itself turned on by its own output. I suspect that since the input and source pin are connected via diodes, it "floats" when there's no input (usually there would be a pull-down to ground.) I don't know if that's OK. Is it? Ideal FETs have infinite input impedance, so in theory they should be more or less immune to spurious noise. Can I count on that? If I ground it through a resistor, the output collapses and it turns off.
Design "A" is a fix to this, by isolating the feedback through a P-channel FET. AFAICT, this works nicely -- I can properly apply pull-ups and pull-downs, but the parts count goes up quite a bit, and I don't know if it's warranted. Maybe there's a better way...
Am I going about this all wrong? Is "latch" even the right term? The Wikipedia article had lots of extra stuff that doesn't apply to me: set/reset inputs, inverted outputs... Not sure if it can be scaled down, or if it then becomes something else entirely.