As of May 31, 2023, we have updated our Code of Conduct.

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.

Filter by
Sorted by
Tagged with
64 votes
9 answers
274k 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 ...
ATR's user avatar
  • 1,173
30 votes
5 answers
55k 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....
Randomblue's user avatar
  • 10.9k
28 votes
6 answers
9k 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 ...
Drummy's user avatar
  • 531
20 votes
5 answers
43k 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 '...
avi's user avatar
  • 605
13 votes
6 answers
5k 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 ...
Robin Andrews's user avatar
10 votes
2 answers
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 ...
user avatar
10 votes
1 answer
1k 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 ...
Paa's user avatar
  • 125
10 votes
5 answers
52k 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.
SIK's user avatar
  • 165
9 votes
3 answers
13k 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 ...
64bit_twitchyliquid's user avatar
8 votes
6 answers
3k 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 ...
Bob John's user avatar
  • 237
8 votes
3 answers
10k 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 ...
norman's user avatar
  • 307
6 votes
2 answers
4k 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 ...
skyler's user avatar
  • 10.1k
6 votes
2 answers
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 ...
Chris's user avatar
  • 554
6 votes
1 answer
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 ...
danpat's user avatar
  • 61
6 votes
3 answers
389 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 ...
Georgy Farniev's user avatar
6 votes
1 answer
853 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 ...
Revanth Kamaraj's user avatar
6 votes
1 answer
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 ...
Severo Raz's user avatar
5 votes
3 answers
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 ...
Omar Shehata's user avatar
5 votes
2 answers
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 ...
Wind's user avatar
  • 55
5 votes
6 answers
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 ...
green_blue's user avatar
5 votes
4 answers
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?
Niklas Rosencrantz's user avatar
5 votes
2 answers
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 ...
ryantuck's user avatar
  • 814
5 votes
2 answers
472 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 ...
Ken Shirriff's user avatar
  • 2,635
5 votes
2 answers
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 ...
user avatar
5 votes
3 answers
11k 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 ...
user avatar
5 votes
2 answers
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: ...
Richard Hansen's user avatar
5 votes
1 answer
186 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. ...
Miles's user avatar
  • 165
5 votes
2 answers
272 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,...
Jonas Mechtheim's user avatar
4 votes
4 answers
7k 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 ...
jules0075's user avatar
4 votes
2 answers
374 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 ...
71GA's user avatar
  • 613
4 votes
3 answers
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 ...
Buzai Andras's user avatar
4 votes
2 answers
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 ...
sirajalam049's user avatar
4 votes
1 answer
198 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 ...
Stefan Stojkovski's user avatar
4 votes
1 answer
127 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 ...
Jack Moore's user avatar
4 votes
2 answers
983 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 ...
Erdem's user avatar
  • 309
4 votes
2 answers
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 ...
Alex Eftimiades's user avatar
4 votes
2 answers
1k 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 ...
Tim Sloane's user avatar
4 votes
1 answer
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 ...
Craver2000's user avatar
4 votes
1 answer
539 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 ...
Ppup's user avatar
  • 41
4 votes
1 answer
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 ...
Prabhpreet's user avatar
3 votes
5 answers
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?
muyustan's user avatar
  • 2,046
3 votes
1 answer
281 views

Identification of a circuit element

Here is the image: What does the triangle with a bubble on one of its sides represent?
Tony Mogoa's user avatar
3 votes
2 answers
3k 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 &...
isma's user avatar
  • 113
3 votes
3 answers
485 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 ...
Butzke's user avatar
  • 1,012
3 votes
4 answers
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 ...
Calin's user avatar
  • 647
3 votes
1 answer
329 views

A simple clarification on latches and flip-flops

Here are two representations of a gated SR latch (first one from my book and the second one from Wikipedia): The part I don't understand are the S and R inputs, why are they reversed in these two ...
A6SE's user avatar
  • 379
3 votes
3 answers
1k views

How does an SR-latch actually work?

In case of a NOR SR-latch, if we make S = 0 and R = 0, then output Q = 1 and nQ = 0. I also know one important rule which is if we put high input in the set line (S = 1) then output Q goes high. If S =...
F.C. Akhi's user avatar
  • 139
3 votes
2 answers
141 views

First time designing an SR latch; I'm using it to control the enable pin on my eFuse IC. Just want to know if I'm overlooking anything

I just finished designing my rectifier module that has a built-in voltage monitor IC and an eFuse IC. Its purpose is to convert the 3-phase AC output from my wind turbine and use it to power my USB ...
soconnoriv's user avatar
3 votes
2 answers
716 views

How to turn a Latch circuit from Press-ON/Press-OFF to Press-ON/Hold-OFF circuit and how to make it auto-off when power is first connected?

I'm building a Latching circuit using 555 IC. The schematic is as follows: The Input voltage is 12V and is used to operate the 555 IC that switches a relay coil through a transistor. When the circuit ...
ElectroMechanical's user avatar
3 votes
2 answers
2k views

How to drive 315 coills in flip-disc display

Recently I've bought 9 surplus electromagnetic flip-disc displays on Ebay. Each display has 5x7 dot matrix. Every dot is controlled by separate pin. See below: As far as I understand to flip one ...
Vladislav Ross's user avatar

1
2 3 4 5
9