Sunteți pe pagina 1din 11

Extracts from:

http://www.elec.uq.edu.au/~3e211/pracs/prac2/prac2.htm
Dept. of Computer Science and Electrical Engineering
he !ni"ersit# of $ueensland
St. %ucia $ld &'(2 )ustralia
The memory elements in a sequential circuit are called flip-flops. A flip-flop circuit has
two outputs, one for the normal value and one for the complement value of the stored bit.
Binary information can enter a flip-flop in a variety of ways and ives rise to different
types of flip-flops.
Introduction - Basic Flip-Flop Circuit
A flip-flop circuit can be constructed from two !A!" ates or two !#$ ates. These
flip-flops are shown in %iure & and %iure '. Each flip-flop has two outputs, Q and Q',
and two inputs, set and reset. This type of flip-flop is referred to as an SR flip-flop or SR
latch. The flip-flop in %iure & has two useful states. (hen )*+ and ),*-, it is in the set
state .or +-state/. (hen )*- and ),*+, it is in the clear state .or --state/. The outputs )
and ), are complements of each other and are referred to as the normal and complement
outputs, respectively. The binary state of the flip-flop is ta0en to be the value of the
normal output.
(hen a + is applied to both the set and reset inputs of the flip-flop in %iure &, both )
and ), outputs o to -. This condition violates the fact that both outputs are complements
of each other. 1n normal operation this condition must be avoided by ma0in sure that +,s
are not applied to both inputs simultaneously.
(a) 2oic diaram
(b) Truth table
Figure 2. Basic flip-flop circuit with !#$ ates
(a) 2oic diaram
(b) Truth table
Figure 3. Basic flip-flop circuit with !A!" ates
The !A!" basic flip-flop circuit in %iure '.a/ operates with inputs normally at + unless
the state of the flip-flop has to be chaned. A - applied momentarily to the set input
causes ) to o to + and ), to o to -, puttin the flip-flop in the set state. (hen both
inputs o to -, both outputs o to +. This condition should be avoided in normal
operation.
Bac0 to 3ontents
Introduction - Clocked SR Flip-Flop
The cloc0ed 4$ flip-flop shown in %iure 5 consists of a basic !#$ flip-flop and two
A!" ates. The outputs of the two A!" ates remain at - as lon as the cloc0 pulse .or
36/ is -, reardless of the 4 and $ input values. (hen the cloc0 pulse oes to +,
information from the 4 and $ inputs passes throuh to the basic flip-flop. (ith both 4*+
and $*+, the occurrence of a cloc0 pulse causes both outputs to momentarily o to -.
(hen the pulse is removed, the state of the flip-flop is indeterminate, ie., either state may
result, dependin on whether the set or reset input of the flip-flop remains a + loner than
the transition to - at the end of the pulse.
(a) 2oic diaram
(b) Truth table
Figure 4. 3loc0ed 4$ flip-flop
Bac0 to 3ontents
Introduction - D Flip-Flop
The " flip-flop shown in %iure 7 is a modification of the cloc0ed 4$ flip-flop. The "
input oes directly into the 4 input and the complement of the " input oes to the $
input. The " input is sampled durin the occurrence of a cloc0 pulse. 1f it is +, the flip-
flop is switched to the set state .unless it was already set/. 1f it is -, the flip-flop switches
to the clear state.
(a) 2oic diaram with !A!" ates
(b) 8raphical symbol
(c) Transition table
Figure . 3loc0ed " flip-flop
Bac0 to 3ontents
Introduction - !" Flip-Flop
A 9: flip-flop is a refinement of the 4$ flip-flop in that the indeterminate state of the 4$
type is defined in the 9: type. 1nputs 9 and : behave li0e inputs 4 and $ to set and clear
the flip-flop .note that in a 9: flip-flop, the letter 9 is for set and the letter : is for clear/.
(hen loic + inputs are applied to both 9 and : simultaneously, the flip-flop switches to
its complement state, ie., if )*+, it switches to )*- and vice versa.
A cloc0ed 9: flip-flop is shown in %iure ;. #utput ) is A!"ed with : and 36 inputs so
that the flip-flop is cleared durin a cloc0 pulse only if ) was previously +. 4imilarly,
ouput ), is A!"ed with 9 and 36 inputs so that the flip-flop is set with a cloc0 pulse only
if ), was previously +.
!ote that because of the feedbac0 connection in the 9: flip-flop, a 36 sinal which
remains a + .while 9*:*+/ after the outputs have been complemented once will cause
repeated and continuous transitions of the outputs. To avoid this, the cloc0 pulses must
have a time duration less than the propaation delay throuh the flip-flop. The restriction
on the pulse width can be eliminated with a master-slave or ede-triered construction.
The same reasonin also applies to the T flip-flop presented next.
(a) 2oic diaram
(b) 8raphical symbol
(c) Transition table
Figure #. 3loc0ed 9: flip-flop
Bac0 to 3ontents
Introduction - $ Flip-Flop
The T flip-flop is a sinle input version of the 9: flip-flop. As shown in %iure <, the T
flip-flop is obtained from the 9: type if both inputs are tied toether. The output of the T
flip-flop =toles= with each cloc0 pulse.
(a) 2oic diaram
(b) 8raphical symbol
(c) Transition table
Figure %. 3loc0ed T flip-flop
Bac0 to 3ontents
Introduction - $riggering o& Flip-&lops
The state of a flip-flop is chaned by a momentary chane in the input sinal. This
chane is called a trier and the transition it causes is said to trier the flip-flop. The
basic circuits of %iure & and %iure ' require an input trier defined by a chane in
sinal level. This level must be returned to its initial level before a second trier is
applied. 3loc0ed flip-flops are triered by pulses.
The feedbac0 path between the combinational circuit and memory elements in %iure +
can produce instability if the outputs of the memory elements .flip-flops/ are chanin
while the outputs of the combinational circuit that o to the flip-flop inputs are bein
sampled by the cloc0 pulse. A way to solve the feedbac0 timin problem is to ma0e the
flip-flop sensitive to the pulse transition rather than the pulse duration.
The cloc0 pulse oes throuh two sinal transitions: from - to + and the return from + to
-. As shown in %iure > the positive transition is defined as the positive ede and the
neative transition as the neative ede.
Figure '. "efinition of cloc0 pulse transition
The cloc0ed flip-flops already introduced are triered durin the positive ede of the
pulse, and the state transition starts as soon as the pulse reaches the loic-+ level. 1f the
other inputs chane while the cloc0 is still +, a new output state may occur. 1f the flip-flop
is made to respond to the positive .or neative/ ede transition only, instead of the entire
pulse duration, then the multiple-transition problem can be eliminated.
Bac0 to 3ontents
Introduction - (aster-Sla)e Flip-Flop
A master-slave flip-flop is constructed from two seperate flip-flops. #ne circuit serves as
a master and the other as a slave. The loic diaram of an 4$ flip-flop is shown in %iure
?. The master flip-flop is enabled on the positive ede of the cloc0 pulse 36 and the slave
flip-flop is disabled by the inverter. The information at the external $ and 4 inputs is
transmitted to the master flip-flop. (hen the pulse returns to -, the master flip-flop is
disabled and the slave flip-flop is enabled. The slave flip-flop then oes to the same state
as the master flip-flop.
Figure *. 2oic diaram of a master-slave flip-flop
The timin relationship is shown in %iure +- and is assumed that the flip-flop is in the
clear state prior to the occurrence of the cloc0 pulse. The output state of the master-slave
flip-flop occurs on the neative transition of the cloc0 pulse. 4ome master-slave flip-flops
chane output state on the positive transition of the cloc0 pulse by havin an additional
inverter between the 36 terminal and the input of the master.
Figure +,. Timin relationship in a master slave flip-flop
Bac0 to 3ontents
Introduction - -dge $riggered Flip-Flop
Another type of flip-flop that synchroni@es the state chanes durin a cloc0 pulse
transition is the ede-triered flip-flop. (hen the cloc0 pulse input exceeds a specific
threshold level, the inputs are loc0ed out and the flip-flop is not affected by further
chanes in the inputs until the cloc0 pulse returns to - and another pulse occurs. 4ome
ede-triered flip-flops cause a transition on the positive ede of the cloc0 pulse
.positive-ede-triered/, and others on the neative ede of the pulse .neative-ede-
triered/. The loic diaram of a "-type positive-ede-triered flip-flop is shown in
%iure ++.
Figure ++. "-type positive-ede triered flip-flop
(hen usin different types of flip-flops in the same circuit, one must ensure that all flip-
flop outputs ma0e their transitions at the same time, ie., durin either the neative ede or
the positive ede of the cloc0 pulse.
Bac0 to 3ontents
Introduction - Direct Inputs
%lip-flops in 13 pac0aes sometimes provide special inputs for settin or clearin the
flip-flop asynchronously. They are usually called preset and clear. They affect the flip-
flop without the need for a cloc0 pulse. These inputs are useful for brinin flip-flops to
an intial state before their cloc0ed operation. %or example, after power is turned on in a
diital system, the states of the flip-flops are indeterminate. Activatin the clear input
clears all the flip-flops to an initial state of -. The raphic symbol of a 9: flip-flop with
an active-low clear is shown in %iure +&.
(a) 8raphic 4ymbol
(b) Transition table
Figure +2. 9: flip-flop with direct clear
Bac0 to 3ontents
.reparation
6repare the followin in your prac boo0:
Basic Flip-Flop
i. "raw the loic circuit for an uncloc0ed !#$ ate flip-flop.
ii. Enter the expected timin diaram for sinals ) and ), in %iure +'.
Figure +3. !#$ ate flip-flop timin diaram
iii. "raw the loic circuit for an uncloc0ed !A!" ate flip-flop.
iv. Enter the expected timin diaram for sinals ) and ), in %iure +5.
Figure +4. !A!" ate flip-flop timin diaram
(aster-Sla)e Flip-Flop
i. "raw the loic circuit implemented with ates for the 4$ master-slave flip-flop in
%iure ?. Ase !#$ ate flip-flops.
ii. Enter the expected timin diaram for the sinals B, B,, ), and ), in %iure +7.
Figure +. 4$ master-slave flip-flop timin diaram
-dge $riggered Flip-Flop
i. "raw the loic circuit for the "-type positive-ede triered flip-flop in %iure
++.
ii. Enter the expected timin diaram for the sinals 4, $, ), and ), in %iure +;.
Figure +#. "-type ede triered flip-flop timin diaram

S-ar putea să vă placă și