0
\$\begingroup\$

I have a comparator output who is normally high and goes low from time to time.

I need a latch which will change its output from high to low when the comparator's output change to low (and keep it low even if the comparator's output goes back to high).

I also need to have an second input to the latch to reset its output to high.

If the first input (the one connected to the comparator's output) is still low when I want to reset the latch I need its output to stay low.

+------+-------+-------+--------+
| Step | Input | Reset | Output |
+------+-------+-------+--------+
|    1 |     1 |     0 |      1 |
|    2 |     0 |     0 |      0 |
|    3 |     0 |     1 |      0 |
|    4 |     0 |     0 |      0 |
|    5 |     1 |     0 |      0 |
|    6 |     1 |     1 |      1 |
|    7 |     1 |     0 |      1 |
+------+-------+-------+--------+

The main constraints are:

  • low PCB real estate
  • low parts count (I'll need a dozen of those latches)
  • low power consumption
  • 5V logic

NB: the reset input can be the opposite way, it would not be a problem as it is from a simple debounced switch.

NB²: the reset is common to all the latches (giving this info in case it can reduce the part count)

\$\endgroup\$
1
\$\begingroup\$

Try this:

enter image description here

R1 depends on the used logic family. In a noisy environment Schmit-trigger input and a capacitor can be useful.

It could be even simpler if you integrated the latching operation to the comparator (=a breakable feedback which forces the comparison result to LOW when it drops to LOW)

\$\endgroup\$
1
  • \$\begingroup\$ I can't believe I tried this exact topology with an OR, NOR, XOR and XNOR gate but not with an AND gate... thanks a lot, it's perfect ;) NB: I can't force comparators inputs without disturbing sensitive signals. \$\endgroup\$
    – Biduleohm
    Feb 17 '20 at 1:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.