Latches, Flip-Flops and Timer
Latches, Flip-Flops and Timer
CHAPTER 7 :
LATCHES, FLIP-FLOPS AND
TIMER
Chapter 7 :
2
FLIP-FLOPS AND RELATED DEVICE
7.1 Latches
7.2 Edge-Triggered Flip-Flops
7.3 Master-Slave Flip Flops
7.4 Flip-Flop Operating Characteristics
7.5 Flip-Flop Application
7.6 One Shot (ringkas)
7.7 The 555 Timer (ringkas)
7.1 Latches
3 A latch is a type of temporary storage device that has
two stable states (bistable) a is normally placed in a
category separate from that of flip-flops.
Latch are basically similar to flip-flop.
The difference between latch and flip-flop is in the
method used for changing their state.
S – set; R-reset
Type of Latch :
A) S-R Latch
B) Gated S-R Latch
C) Gated D Latch
A) S-R (Set-Reset) Latch
The output of each gate is connected to an input of the
opposite data.
This produces a regenerative feedback.
4
Logic Symbol : S-R and S-R
5
Latch
Truth-Tables :
For Active-HIGH and Active-LOW input SR-Latch
6
Active-HIGH Active-LOW
(a) R
(b) Q
Figure 7.1
Example : S-R Latch
8
Review : S-R Latch
9
A bistable multivibrator is one with two stable
output states.
In an S-R latch, activation of the S input sets the
circuit, while activation of the R input resets the
circuit. If both S and R inputs are activated
simultaneously, the circuit will be in an invalid
condition.
A race condition is a state in a sequential system
where two mutually-exclusive events are
simultaneously initiated by a single cause.
B) Gated S-R Latch
Is a gated latch requires an enable input (EN).
The S and R inputs control the state to which the latch will
go when a HIGH level is applied to the EN input.
The latch will not change until EN is HIGH, but as long as
it remains HIGH, the output is controlled by the state of
the S and R input.
The invalid state occurs when both S and R are
simultaneously HIGH.
10
B) Gated S-R Latch
11
B) Gated S-R Latch (Truth
Table)
EN S R Output
0 0 0 No Change
0 0 1 No Change
0 1 0 No Change
0 1 1 No Change
1 0 0 No Change
1 0 1 Q=0
1 1 0 Q=1
1 1 1 Invalid
12
Example 1 : Gated S-R Latch
13
Example 2 : Gated S-R Latch.
Find waveform for Q.
14
EN
Example 2 : Gated S-R Latch. ANSWER
S
EN
15
C) Gated D Latch
16
B) Gated D Latch (Truth Table)
EN D Output
0 0 No Change
0 1 No Change
1 0 Q=0
1 1 Q=1
17
Example : Gated D Latch
18
7.2 Edge-Triggered Flip-Flops
Reset
Latch
Set
Reset
Clock
Jam
Flip-Flop
7.2 Edge-Triggered Flip-Flops
23
i) Edge-Triggered S-R Flip-Flops
24
i) Edge-Triggered S-R Flip Flop
25
S R CLK Output Comments TRUTH TABLE
Q Q
0 0 X Q0 Q0 No Change = clock transition
LOW
0 1 0 1 RESET to HIGH
X = irrelevent
1 0 1 0 SET (don’t care)
Q0= output level prior to
1 1 ? ? Invalid
clock transition
Example
Example : Edge.. S-R Flip-Flops
26
ii) Edge-Triggered D Flip Flop
27 D FF is useful when a single data bit (1 or 0) is to be
stored.
The addition of an inverter to an S-R FF creates
basic D FF where a positive edge-triggered type is
shown.
ii) Edge-Triggered D Flip Flop
TRUTH TABLE (for positive edge-
triggered)
INPUTS OUTPUTS COMMENTS
D CLK Q Q’
1 1 0 SET (store a 1)
0 0 1 RESET (store 0)
type of FF.
The difference between J-K and S-R is a J-K
has no invalid state as SR.
Logic Symbol
iii) Edge-Triggered J-K Flip Flop
30 J K CLK Output Comments TRUTH TABLE
Q Q
0 0 Q0 Q0 No Change = clock transition
LOW
0 1 0 1 RESET
to HIGH
1 0 1 0 SET Q0= output level prior to
1 1 Q0 Q0 Toggle clock transition
Positive or
negative
triggered ?
Example : Edge.. J-K Flip-Flops
31 Top :
positive
edge-
triggered
Bottom:
negative
edge-
triggered
iii) Edge-Triggered J-K Flip Flop
32
Asynchronous :
Presets (PRE) and Clear (CLR) inputs
33
0 SET Asynchronous
0 RESET Asynchronous
1 1 JK Synchronous
Logic diagram for a basic J-K flip-flop with active-LOW preset and clear inputs.
35
Q
clk
pulse
PRE CLR J K FF Comment
4,5,6,
1 1 1 1 Toggle Synchronous mode.
7
8,9 0 1 1 RESET JK inputs - dont care
36
Example 1 : PRE and CLR
37
Example 2 : PRE and CLR
38
7.3 Master-Slave Flip Flops
39
2 sections :
42
Link
wps.prenhall.com/
chet_floyd_digfunpld_1/38/9924/2540547.cw/
index.html
www.allaboutcircuits.com/vol_4/chpt_10/5.html
43
44
END OF CHAPTER 7