Lec04 DS 2019new Print Tuan
Lec04 DS 2019new Print Tuan
2019
Digital Systems
FLIP-FLOPs
BK
TP.HCM
dce
2019
Introduction
• So far we have seen Combinational Logic
– The output(s) depends only on the current values of the input
variables
• Here we will look at Sequential Logic circuits
– The output(s) can depend on present and also past values of
the input and the output variables
• Sequential circuits exist in one of a defined number of
states at any one time
– They move "sequentially" through a defined sequence of
transitions from one state to the next
– The output variables are used to describe the state of a
sequential circuit either directly or by deriving state variables
from them
2
dce
2019
General Digital System
3
dce
2019
Synchronous and Asynchronous
Sequential Logic
• Synchronous
– The timing of all state transitions is controlled by a common
clock
– Changes in all variables occur simultaneously
• Asynchronous
– State transitions occur independently of any clock and normally
dependent on the timing of transitions in the input variables
– Changes in more than one output do not necessarily occur
simultaneously
• Clock
– A clock signal is a square wave of fixed frequency
– Often, transitions will occur on one of the edges of clock pulses
• i.e. the rising edge or the falling edge
4
dce General flip-flop symbol and definition of its two
2019
5
dce
2019
Q 0 and Q 1
6
dce
2019
A NAND latch is an example of a bistable device
NAND
001
011
101
110
7
dce
2019
Setting the NAND Flip-Flop
NAND
001
011
101
110
8
dce
2019
Resetting the NAND Flip-Flop
NAND
001
011
101
110
9
dce
2019
Function table of a NAND latch
10
dce
2019
11
dce
2019
Other Representations of a NAND latch
12
dce
2019
Determine Q
13
dce
2019 A example of NAND latch Application
14
dce
2019
15
dce
2019
NOR gate latch
• (a) NOR gate latch; (b) function table; (c) simplified block
symbol.
16
dce SR latch useful when temporary setting is used to
2019
activate switch
The NAND FF is used to
provide a bounce free switch
so that the 1 KHz pulse can
propagate to the output
without distortion.
17
dce
2019
Digital Pulses
• The transition from low to high on a positive
pulse is called rise time (tr).
– Rise time is measured between the 10% and 90%
points on the leading edge of the voltage waveform.
• The transition from high to low on a positive
pulse is called fall time (tf).
– Fall time is measured between the 90% and 10%
points on the trailing edge of the voltage waveform.
18
dce
2019
Rise and Fall times
19
dce
2019
Rise and Fall times
20
dce
2019
22
dce
2019
23
dce
2019
Clocked Flip-Flops
24
dce
2019
25
dce
2019
26
dce
2019
Clocked SR Flip-Flop
• Clocked S-R flip-flop that triggers only on negative-going
transitions.
• Simplified version of
the internal circuitry
for an edge-
triggered S-R flip-
flop.
27
dce
2019 Clocked SR Flip-Flop
• Implementation of edge-detector circuits used in edge-
triggered flip-flops: (a) PGT; (b) NGT. The duration of the
CLK* pulses is typically 2–5 ns.
28
dce
2019
29
dce
2019
Clocked JK Flip-Flop
30
dce
2019
Edge-triggered J-K flip-flop
32
dce
2019
Problem 5-13 The waveforms below are to be applied to two different FF’s.
Draw Q for (a) positive edge-triggered (b) negative edge-triggered.
33
dce
2019
Clocked D Flip-Flop
• One data input.
• The output changes to the value of the input at
either the positive going or negative going clock
trigger.
34
dce
2019 Edge-triggered D flip-flop
implementation from a J-K flip-flop
35
dce
2019
Parallel transfer of binary data using D flip-flops
36
dce
2019
37
dce
2019
D Latch
• D latch: (a) structure; (b) function table; (c) logic symbol.
38
dce
2019
D Latch
• Waveforms showing the two modes of operation of the
transparent D latch.
39
dce
2019
Asynchronous Inputs
• Inputs that depend on the clock are synchronous.
• Most clocked FFs have asynchronous inputs that
do not depend on the clock.
• The labels PRE and CLR are used for
asynchronous inputs.
• Active low asynchronous inputs will have a bar
over the labels and inversion bubbles.
• If the asynchronous inputs are not used they will
be tied to their inactive state.
42
dce
2019 Clocked J-K flip-flop with asynchronous inputs
43
dce
2019 Clocked J-K flip-flop with asynchronous inputs
44
dce
2019
48
dce
2019 Clock LOW and HIGH time
synchronous asynchronous
tw(L) is the minimum time that the CLK must remain low before it
goes high.
tw(H) is the minimum time that the CLK must remain high before it
goes low.
50
dce
2019
Propagation Delay in Synchronous Circuits
51
dce
2019
Flip-Flop Synchronization
• Most systems are primarily synchronous
in operation, in that changes depend on
the clock.
• Asynchronous and synchronous
operations are often combined.
• The random nature of asynchronous
inputs can result in unpredictable results.
52
dce Asynchronous Signals may have Undesirable Side
2019
Effects
53
dce
2019
Edge-triggered flip-flop can Synchronize
Circuit
• The signal A has
no effect until
negative edge of
clock.
54
dce
2019
55
dce
2019
Asynchronous Data Transfer Operation
57
dce
2019
58
dce
2019
Serial Data Transfer: Shift Registers
• Parallel transfers – register contents are
transferred simultaneously with a single clock
cycle.
• Serial transfers – register contents are
transferred one bit at a time, with a clock pulse
for each bit.
• Serial transfers are slower, but the circuitry is
simpler. Parallel transfers are faster, but
circuitry is more complex.
• Serial and parallel are often combined to exploit
the benefits of each.
59
dce
2019
Four-bit Shift Register
60
dce
2019 Serial transfer from X register into Y register
61
dce
2019
62
dce
2019
MOD-8 Asynchronous Counter
63
dce
2019
State Table & Diagram of MOD-8 Asynchronous Counter
64
dce
2019
Microcomputer Application
• Microprocessor units (MPUs) which will be
studied later, perform many functions that
involve the use of registers for data transfer and
storage.
• MPUs may send data to external registers for
many purposes, including:
– Solenoid or relay control
– Motor starting
– Device positioning
– Motor speed controls
65
dce
2019
Example of Microprocessor Interfacing
66
dce
2019
Schmitt-Trigger Devices
• Not a FF but shows a memory characteristic
• Accepts slow changing signals and produces a
signal that transitions quickly.
• A Schmitt trigger device will not respond to an
input until it exceeds the positive or negative
going threshold.
• There is a separation between the two
threshold levels. This means that the device
will “remember” the last threshold exceeded
until the input goes to the opposite threshold.
67
dce
2019
Schmitt-Trigger Response (two thresholds)
(b) Schmitt-trigger response to slow noisy input. Often used with noisy signals
68
dce
2019
Schmitt-Trigger Response (two thresholds)
70
dce
2019
One-shot
71
dce
2019
Retriggerable and Nonretriggerable Operation
72
dce
2019 Logic symbols for the 74121 nonretriggerable
one-shot
73
dce
2019
74
dce
2019
Clock Generator Circuit: Schmitt-trigger Oscillator
75
dce
2019 Clock Generator Circuit: 555 Timer
555 timer IC used astable multivibrator.
76
dce
2019
Problem:Determine the Q output
78
dce
2019
79
dce
2019
80
dce
2019 For the following circuit, complete the timing diagram below
(for A, B, and z).
PRE'
z
x D A J B
A' K B'
CLOCK
CLR'
81