Documente Academic
Documente Profesional
Documente Cultură
Flip-Flops
2/18/2012
JK Flip-flop D Flip-flop T Flip-flop JK Master-Slave Flip-flop Preset and Clear functions 7474 and 7476 devices
A.A.H Ab-Rahman, Z.Md-Yusof 1
Flip-Flop
Mostly used sequential circuit blocks for temporary storage (memory) For Flip-flops, output changes state only at a specified triggering input called clock (clk) For a latch, output changes state at a specified trigger level (high or low)
2/18/2012
Flip-Flop (cont.)
D Latch vs D Flip Flop
Positive level triggered D Latch/ Gated D Latch
D En Q Q
D En 0 1 1 1
Q 0 1
x 0
2/18/2012
x 1
Flip-Flop (cont.)
Negative level triggered D Latch
D En Q Q
D clk
0 1
Q
0 1
Q
1 0
0 0
1 0 x 1
0
1 Q
1
0 Q
x
x 0 x 1
Q
Q Q
Q
Q Q
4
2/18/2012
Flip-flop (cont.)
Draw the output waveform for the positive and negative edge triggered D flip-flops
clk
D Q (+ve Flip-flop)
Q (-ve Flip-flop)
2/18/2012
Flip-Flop (cont.)
How to design flip-flops? Recall the Gated D Latch
D Q
En Q
Flip-Flop (cont.)
Pulse transition detector
clk pulse
Circuit diagram
clk
Waveform
pulse
2/18/2012
D Flip-flop
D Q
clk
PTD Q
A positive edge of clk results in a short pulse at output of PTD, therefore, causes Q <= D only at that instant (pulse duration) Q is maintained until the next positive edge of clk
2/18/2012
SR Flip-flop
Recall the problem with SR Flip-flop
S
Sx
clk
PTD Q
Rx
When S = 1 and R = 1, the outputs are invalid (both Q and Q equal to 1) To overcome this problem, Q and Q is fed back to the Gated NANDs which now becomes the JK Flip-flop Sx and Rx can never be equal to 0 at same time
2/18/2012 A.A.H Ab-Rahman, Z.Md-Yusof 9
JK Flip-flop
J Q
J K clk 0 0
Q Q
Q Q
clk
PTD Q K
0 1
1 0 1 1 x x -
0
1 Q Q
1
0 Q Q
When J = 1 and K = 1, Q and Q toggles When J = 0 and K = 0, Q and Q maintains When J = 0 and K = 1, Q = 0 (Reset) When J = 1 and K = 0, Q = 1 (Set)
2/18/2012 A.A.H Ab-Rahman, Z.Md-Yusof 10
D Flip-flop
We can also construct a D Flip-flop from JK Flip-flop by shorting J and K with an inverter
D Q
D clk
clk PTD Q
Q 0 1 Q
Q 1 0 Q
0 1 x -
T Flip-flop
Another type of flip-flop, the T Flip-flop can be constructed from the JK flip flop by shorting J and K inputs
T Q
T clk 0 1
Q Q Q Q
Q Q Q Q
clk
PTD Q
x -
T Flip-flop (cont.)
Draw the output waveform for the positive edge triggered T Flip-flop
clk
T Q
2/18/2012
13
Qn
Q Q
Qms
Qn
Qms
K
Kms
Master
Slave
Master latches data at positive edge of clk Slave latches data at negative edge of clk Qms is therefore valid on the negative edge of clk
2/18/2012 A.A.H Ab-Rahman, Z.Md-Yusof 14
J K
2/18/2012
15
D1 F D0 S
Q Q
Q Q
En
2/18/2012
16
When 0, Q <= 1
Q
Q Q
1 0 1
F D3 D2 D1 D0 S1 S0
CLR PRE
PRE D Q Q CLR
4x1 Mux
0 1
F D3 D2 D1 D0 S1 S0
0
0 1
0
1 0
x
x x
1
0 1
1
1 0
D
17
2/18/2012
What is the input condition that Q <= D? En = 1, clk = , CLR = 1, PRE = 1 How to force Q <= 1? En = x, clk = x, CLR = 1, PRE = 0
2/18/2012
Flip-flop IC
The 7474 Dual Positive Edge Triggered D Flipflop with preset, clear, and complementary outputs The 7476 Dual Master-Slave JK Flip-flops with clear, preset and complementary outputs
2/18/2012
19