# Questions tagged [latch]

A latch or flip-flop is a circuit that has two stable states and can be used to store state information. However latch is normally used to describe a simple storage device while flip-flop is normally reserved for clocked devices.

441 questions
Filter by
Sorted by
Tagged with
282k views

### Difference between latch and flip-flop?

What is the difference between a latch and a flip-flop? What I am thinking is that a latch is equivalent to a flip-flop since it is used to store bits and is also equivalent to a register which is ...
• 1,283
58k views

### Why are inferred latches bad?

My compiler complains about inferred latches in my combinatorial loops (always @(*), in Verilog). I was also told that inferred latches should preferably be avoided....
• 11.1k
10k views

### What is a flip flop?

There seem to be a number of different definitions of flip-flops and latches out there, some of which are contradictory. The Computer Science text book for the course I teach is probably the most ...
• 559
45k views

### Why do we clock Flip Flops?

I am trying to understand Flip Flops & Latches. I am reading from Digital Logic book by Morris Mano. One thing I am not able to understand is why we clock flip-flops? I understand why we need '...
• 625
6k views

### How does an SR Latch get started [duplicate]

Noob question, but I'm not seeing how an SR latch such as the one in the image can "get started". If each input depends on the output from the other, how can there be two inputs to each gate to set ...
2k views

### SR Latch (Flip Flop) beginning Inputs?

Ok this is probably a basic question, but I understand how SR latches work except one thing. In the R input and S input you can make them 0 or 1.....but what about the input lines next to them (That ...
56k views

### What is the difference between registers, flip flops and latches?

I want the answer to the very basic level. I know what they mean individually, but what I am looking for is connection between them.
• 165
2k views

### JK latch, possible Ben Eater error?

Is it possible that the schematic shown here is wrong? I would expect something more like that... It seems like that he inverted the feedback wires, but I'm quite suspicious because he made the ...
• 135
14k views

### Why do all transistor latch circuits (that ive seen) use two transistors?

I am looking at building a transistor latch to control a relay. I don't like soldering, so a few components as possible, especially those pesky transistors. I am looking around at various transistor ...
4k views

### Can someone explain the following flip-flop circuit?

I'm having trouble understand what's going on in this circuit. The question asks "what is the value of Q if $\bar{R} = 1$ and $\bar{S} = 0$" (as shown). In this case, how can I determine what Q ...
• 237
11k views

### What is wrong with my D flip-flop toggle switch?

Until a few weeks ago, I had never drawn a circuit diagram in my life, so bear with me. I am currently trying to design (in Logisim) a circuit that acts like a toggle switch, using only basic logic ...
• 307
5k views

### Turn an LED off and on with the same push button

How can I have an LED turn on when a push button is pressed, turn off when the button is pressed again, and keep its state unchanged when the button is not pressed? I don't want the LED to oscillate ...
• 10.3k
1k views

### Do the logic gate inputs of 74HCXX integrated circuits exhibit a high impedance?

Do the inputs of the 74HC374-SMD D-type flip flop have high impedance inputs? In datasheet is stated that it has buffered inputs, I assume that means high impedance, right? In other words, do I have ...
• 554
5k views

### Resettable mechanical switch?

I'm looking for a mechanical on/off rocker or toggle switch that can be reset to a default state and position upon the removal of power. The application is in a vehicle where I want the switch to ...
• 61
830 views

### Put SR latch to determined state during power on

I'm trying to build a circuit that will stay turned on once triggered, and ordinary SR latch seems like a perfect solution. However, I cannot find an efficient way to turn SR Latch to deterministic ...
4k views

### Model a set-reset relay in SPICE

I am designing a circuit with a magnetic latching set-reset relay, and I would like to test the design in ngspice (open-source spice). I have downloaded the documentation but I see nothing about ...
• 444
952 views

### Latches and Two Phase Clocking in modern ASICs

Why are latches and 2 phase clocking schemes frowned upon in modern high speed ASIC design? I understand that single edge flip-flop based designs are easier on STA tools but are there any other good ...
2k views

### Where does the power supply go in an SR Latch?

I understand how an SR Latch works: is S is 1, it will set Q to 1. If R is 1 it will set Q to 0. If both S and R are 0, the value of Q should remain unchanged (right?). So the circuit has these ...
• 153
1k views

### What is the difference between the circuits?

I found the trigger (latch) circuit: When no button is pressed, the LED does not light, if you press SW1, the LED will light up, and will light until you press SW2. This can work for different values ...
• 55
1k views

### Doubt regarding SR latch

I am having trouble visualizing an SR latch intuitively. Here the two outputs $Q, Q'$ both are dependent on each other,so how will the two function at the same time? Let me break it down. Suppose I ...
3k views

### Are D-latches and D-type flipflops volatile?

If there is a power cut to the CPU, will be registers clear or keep their memory?
• 1,724
4k views

### Why won't my 2 x NPN circuit latch?

I'm working on building a soft-latch power switch. Before I build the entire thing, I'd like to ensure that I can simply latch power on, without adding off functionality. I am wondering why the ...
• 814
587 views

### How to analyze S-R latch circuits?

I'm trying to understand the circuit below (from the Apollo Guidance Computer), which is two S-R latches connected together. The top input resets the output and the bottom input sets the output. But ...
• 2,904
3k views

### Why are two transmission used gates to make a D Latch?

In the circuit given below I can't understand what the second transmission gate TG2 is used for. It is connected both to the exit of a Transmission gate and an inverter... so what is the actual input ...
12k views

### Need a soft latching power on/off that starts OFF

I have spent a few days looking for a soft latching power on/off switch. I have breadboard-tested several designs, including at least these three: Design #1 Design #2 Design #3 Testing: I tested ...
3k views

### How to eliminate the forbidden state in an SR latch?

I'd like a latch where the output only changes when both inputs have changed. If only one input has changed, the latch output should stay constant. Here's the state table I want: ...
296 views

### Is there a simpler way to latch a supervisor?

I’m currently designing a Li-Ion powered ESP32 circuit. The ESP32 has a minimum operating voltage of 3 V. So, my instinct is to use a 3.1 V supervisor to keep the ESP32 within an acceptable range. ...
• 165
357 views

### Low-power "killswitch" until power reset

I have a specific design issue and do not know how to start. We have a supply of about 9-13 VDC, battery-powered. The circuit I'm looking for acts as a power switch for this supply voltage. By default,...
4k views

### Flip-flop vs latch: Do flip-flops have an edge detector integrated?

As far as I know, a latch and a flip-flop are the same excepting that flip-flop only "works" with an edge of the clock (let's supose rising edge for the question.) To make the flip-flop &...
• 123
8k views

### Electrical switch/relay that will stay on once triggered (regardless of future inputs)

I am looking for an electrical device that will allow for me to take an input (that will change from high to low to high again) and have it trigger an output (turn high when my input is low) but stay ...
621 views

### VHDL -- K-map reduced characteristic equation fails

I have this circuit (D-latch): and I can directly write the logical equation by only watching the gates: $$Q = \overline{(\overline{(D \cdot C) + Q}) + (C \cdot \overline{D})}$$ If I want to ...
• 623
4k views

### Latching power switch question

I have the following circuit (source: EDN): I understand the basic working principle of the circuit and it works fine when it is powered from a 1.5V source. But when I power the circuit from a 9V ...
• 767
7k views

### What exactly is latch?

I've very less knowledge in electronics, I've read that a latch is a simple circuit that stores 1 bit of data (or state). A Latch is a circuit that has two stable states and can be used to store ...
• 143
261 views

### A question about how RS latches work and the time an input needs to stay high after it has been supplied!

I have a RS latch constructed of 2 NOR gates, without enable input. Lets say that the in the beginning the output is set to Q=1, Q'=0. (pic1) In a given moment R is pulsed high, and Q is calculated ...
272 views

### Unclocked NOR gate SR latch not latching [closed]

I am starting to learn computer architecture and decided to try building an SR latch using NOR gates and without a clock (basically copying this video) on a breadboard. My circuit is pictured, it is ...
1k views

### Flip flop/latch with isolated differential input and differential output

I am looking to make something that takes a pulse of floating voltage (say from a feedback coil of on a transformer), and maintain a differential output voltage depending on the sign of the amplitude ...
2k views

### LM339 comparator trigger SR latch

In this circuit we have a LM339 comparator which compares input signal with respect to the threshold value which is 4 volts. This is the output of the transient analysis. If the input signal is ...
2k views

### Shift Registers Controlling Seven-Segment Display without a Latch?

I'm restoring a Model H Skee-Ball machine, and these old models have a bunch of hardcoded settings and unreliable switch detection, so I want to replace the main control circuitry with something ...
• 143
485 views

### Capacitor function in a flip flop circuit

I'm new to electronics and I'm trying to figure out the following circuit. The circuit turns on one of the leds when one button is clicked, if the other is clicked then the current light is turned off ...
• 141
1k views

### Latching relay not working

I'm pretty new to electronics. I've however recently used mechanical and solid state relays successfully. Now, I am just started trying to use latching relays. I am currently trying to create a set up ...
• 163
618 views

### Circuit for childrens "electric" toy/game

Some might remember a childrens game where you have a sheet of symbols, holes in it that lead to contacts, and then you have two wires and whenever you have two symbols that match you put some cables ...
• 41
9k views

### Solenoid for opening door latch

I would like to open a door latch with solenoid using a IR reciever (basically remote control). My questions are as follows: What kind of signal (AC/DC) will I require through the solenoid? Is it ...
• 553
5k views

### Any IC similar to ULN2003A with latch or enable/disable?

I'm working on a project that uses a ULN2003A (darlington transistor array) and I need to enable/disable it. The point is that ULN2003A does not have enable/disable pin. I think that a IC with latch ...
3k views

### The difference between these two D latch circuits

I simulated both ones and could not see any difference in functionality. So, what is the need for that extra NOT gate? When it is preferred?
• 2,106
283 views

### Identification of a circuit element

Here is the image: What does the triangle with a bubble on one of its sides represent?
506 views

### Increase GPIO outputs

I'm working on a project in which I need 32 outputs from an MCU that only has 8 free outputs. To accomplish my goal I have the following requirements: I must be able to toggle more than one output ...
• 1,012
3k views

### How can I implement a simple, Q only, D-latch using VHDL?

I just started VHDL today and I'm the type of person that can only learn by doing stuff, so after I made some basic gates in VHDL, I tried making a simple D-latch(so no clock signal), however without ...
• 647
235 views

### Is there any such thing as a tristable, quadristable, etc. multivibrator?

The title says it all. Is there a discrete circuit that can produce 4 different outputs based on a single tactile switch click? I'd like to do this with either a discrete design or a 74373 since ...
946 views

### Is the invalid state of an SR latch also undefined?

I understand that if both the Set and Reset inputs of an SR latch are high, the output of both Q and Not-Q is low and this is considered an invalid state. But in this situation is the output also ...
• 1,179