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
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
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
1 vote
1 answer
2k views

Convert a toggle switch into a momentary response

I'm working on a project and I need to use a toggle switch to control a device that expects a momentary signal. What I want is send a momentary pulse when turning it on and off. Ie: swith off to on: ...
Garet's user avatar
  • 111
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
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
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
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
0 votes
4 answers
5k views

What is state in a sequential circuit?

I understand that the output of a flip flop is also called as the state and the output of the flip flop before the clock pulse is applied is called as present state and after the application of clock ...
Fawaz's user avatar
  • 354
0 votes
4 answers
3k views

Power circuit with a push button

In my current project, I try to connect a load rated at 5V/2A with a 5V power supply. To avoid plugging and unplugging the supply over and over again, I decided to add a push button. To turn the ...
Overblade's user avatar
  • 217
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
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
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
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
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
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
4 answers
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 ...
user3589630's user avatar
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
2 votes
2 answers
4k views

Metastable state when S = R = 1 in SR Latch?

According to wikibooks, under the section SR Latch, S = R = 1 is a metastable state. The following things are mentioned under the heading When both inputs are high at once, however, there is a ...
Murtaza Raja's user avatar
2 votes
2 answers
676 views

Is there any way to inhibit this latch circuit from locking up at startup?

Using an opamp (in+ is fixed 4V ref, in- is a square wave 5/1V), I have an NPN-BJT in the feedback network, and this BJT acts like a latch; once the output goes "high" the BJT pulls in- to ground, ...
bos's user avatar
  • 950
1 vote
1 answer
556 views

Starting a latch in a known state

I have a latch, and I could use some advice on starting the latch in a known state. I'm running some robotics off of an ATX power supply, controlled by an Arduino. The motors and such are weak and ...
Ed Krohne's user avatar
  • 300
1 vote
1 answer
423 views

SR FlipFlop Question

I am studying Digital Logic Circuit right now and I have question to ask. I have searched lot of places in order to find this answer, however due to my lack of searching ability I was not able to find ...
Gooday2die's user avatar
1 vote
1 answer
2k views

Issues with Latching switch using push button

I'm trying to make a latching power switch based off this schematic (source: EDN) I emulated the circuit in Falstad and everything works like it should (link to simulation). However, it doesn't ...
darudude's user avatar
  • 335
1 vote
2 answers
4k views

Momentary to Latching Circuit with Zero Off Current

I have a project with several physical constraints so that I want to use: 1. A sealed very thin momentary switch as main on/off switch 2. 2 x AAA battery supply = 3V or less 3. Load is a small DC ...
6Volts's user avatar
  • 11
1 vote
3 answers
3k views

Why is a flip-flop also known as a latch?

I am new to digital logic design and would like to know why a flip-flop is also known as a latch?
Abdus Sattar Bhuiyan's user avatar
1 vote
1 answer
2k views

How to restrain this soft latching power switch from eating too much current?

I am designing a two buttons soft latching power switch for a project involving a raspberry pi, li-ion cells I salvaged from the battery of a broken laptop, and a power booster from adafruit. I ...
Zoé Martin's user avatar
0 votes
1 answer
282 views

There is no 'latch pin' on MC74HC164A shift register

Unlike a 74HC595, this shift register (http://www.onsemi.com/pub_link/Collateral/MC74HC164A-D.PDF) doesn't have a latch pin. How then do I output the data stored in the registers (to something like an ...
Sidd's user avatar
  • 255
0 votes
1 answer
2k views

how to make a latching circuit with ground

I have a pump, represented by a lamp in my schematic, i want this pump to be running once i switch the Activate switch, and when ever an alarm(i have 2 different) is triggered (Alarms are ground) the ...
pato.llaguno's user avatar
0 votes
5 answers
176 views

How does electricity flow in this SR latch from Petzold’s Code?

I am confused as to how this circuit is complete and hence how electricity flows through it. Petzold explains earlier in the book that the V refers to a battery connected to ground the way in which I ...
MechSE's user avatar
  • 3
0 votes
2 answers
566 views

SR latch circuit with ESP8266

I want to keep some state during a deep sleep of an ESP8266. To do this I used the following SR latch circuit: It works well. The only change I made is that I used 2N2222 transistors. The only ...
JstdK's user avatar
  • 5
0 votes
1 answer
307 views

How do we decide which circuit is a latch?

Will A and B always be the complement of one another regardless of what logic gates we use in the latch-like circuit? For instance (the two circuits shown as examples): How do we decide whether A and ...
Anwesa Roy's user avatar
0 votes
2 answers
134 views

Master-slave flip flop without gate delay?

It seems like a master-slave flipflop always has around a 2-gate delay between the Master and Slave sections of the flip flop. For example: My question is what would happen if, theoretically, there ...
David542's user avatar
  • 659
0 votes
2 answers
1k views

Soft-latch auto-reset OFF (hold) / ON (press) button, is the schematic correct?

I'm looking to make a soft-latching interface with a single momentary push button. Required features for my build are (edited, sorry for bad description) : Circuit should always start in OFF ...
Vanarian's user avatar
-2 votes
2 answers
2k views

Latched Logic Circuit

I'm having trouble with part of a build I have to do. I've built this circuit: \$I = A\bullet(B + C + D + E + F)\$ The \$+\$ is OR, \$\bullet\$ is AND, and I'm using 2-input OR gates. The output ...
somers's user avatar
  • 151
-5 votes
1 answer
278 views

S-R Latch using given gates

Hi I want to know the following. An S-R latch can be implemented by means of a. AND, NOR b. NAND, NOR c. AND, XOR d. NOT, XOR
Mohsin Ali's user avatar