D flip-flop

Thread Starter

jt21

Joined Oct 10, 2009
7
Hi all,

I am currently doing a project that involves a 74ls74ap, which is a dual d type flip-flop. The set and reset of the 2 d flip-flops are at +5v. Both flip-flops have the same clock frequency.

A push button is connected to the input of D1. Output Q1 is connected to a AND gate input and input D2. Output D2bar is connected to the same AND gate and the AND gate output should output a "high" whenever the push button is pressed. So basically, this is a single pulse circuit design.

Now the problem here is, even though I didn't press the push button, Q1 is always at logic high, making the output of the AND gate always at logic low.
Is there anyway to make the output of Q1 low and go high only when I press the push button?
 

beenthere

Joined Apr 20, 2004
15,819
TTL logic should always have inputs pulled high through a resistor. 10K is a good value for 74LSxx.
What does the D input look like? Is the input normally high, and get pulled down to ground through the PB? If is is left to float, the input will oscillate rith at the logic trip point, and the gate is quite likely to fail rapidly.

Think about how a flip flop works. The Q output assumes the D input state with each valid clock (the falling edge, for a 7474).

A schematic might be useful.
 

Thread Starter

jt21

Joined Oct 10, 2009
7


This is my design of the D flip-flop. The output of Q1 should be low until the push button is pressed, then Q1 turn high.
 

SgtWookie

Joined Jul 17, 2007
22,230
OK, you have the resistor on the wrong side of the switch. When the switch is open, the input is "floating".

Try it like this:



R2 limits the maximum current into U1.
R1 provides a discharge path to ground when S1 is open.
R3 limits the current through LED D1.

Note that if you're running in digital simulation mode, you will need to place a jumper across R2 for it to work. Circuitmaker doesn't simulate resistors well in digital mode, but you can't press the pushbuttons in analog mode.
 

Attachments

Top