Professional Documents
Culture Documents
DS2022 Lab5
DS2022 Lab5
Laboratory Manual
Digital Systems
Experiment 5
1. INTRODUCTION
1.1 Goals:
Understand the design procedure of Synchronous Counter.
Understand how MSI circuits works
Design and implement basic Synchronous Counters and MSI circuits.
1.3 References:
Digital Systems: Principles and Applications (11th Edition) – Ronald J. Tocci, Neal S.
Widmer, Gregory L. Moss, 2010.
Lecture Slides/Videos – Assoc. Prof. Dr. Tran Ngoc Thinh.
1.4 Pre-laboratory:
Read this experiment carefully to become familiar with the procedural steps in this
experiment.
2
Digital Systems – Lab 6
2. EXPERIMENTAL PROCEDURE:
With a MOD-4 counter, we have four states. Therefore, we need at least two FFs to build it.
The following figure depicts the State Transition Diagram of CLK CLK
10
a MOD-4 Synchronous Counter.
3
Digital Systems – Lab 6
An excitation table shows the minimum inputs that are necessary to generate a particular next state
(in other words, to "excite" it to the next state) when the current state is known. They are similar to
truth tables and state tables, but rearrange the data so that the current state and next state are next
to each other on the left-hand side of the table, and the inputs needed to make that state change
happen are shown on the right side of the table.
In order to obtain the excitation table of a flip-flop, one needs to draw the Q(t) and Q(t + 1) for all
possible cases (e.g., 00, 01, 10, and 11), and then make the value of flip-flop such that on giving
this value, one shall receive the input as Q(t + 1) as desired.
By referencing the FF’s excitation tables, we design an excitation table to summarize the state
machine. The following excitation table is used for MOD-4 Synchronous counter using D Flip-
flops.
4
Digital Systems – Lab 6
Warm-up: Let try using Logisim to design and implement a MOD-4 Synchronous
Counter
The Multiplexer (MUX), also called Data Selector, is a device that acts as a multi-position
switch. See Figure 1. A number of DATA inputs are applied to this device (I0-I3) and one of
the inputs is switched to the output (Y) of the device. A binary number applied to the SELECT
(S1 & S0) lines controls which input is passed to the output.
5
Digital Systems – Lab 6
S1 S0 Y
0 0 I0 I0
0 1 I1
I1
1 0 I2
Y
1 1 I3 I2
S0 I3
0 1
S1 S0
I0 I1
S1
0
1 I2 I3
Figure 5: Truth table, logic graph, and block diagram of a 4-to-1 multiplexer.
For example, when S1=S0=0, I0 is “logically” connected to the output Y. When S1=0 & S0=1,
I1 “logically” connected to Y and so forth for I2 & I3 to connect to Y.
IC 74151
74151 is an 8-to-1 Multiplexer with 16 Pin IC. Data Selector/Multiplexer contains full on-chip
decoding to select one-of-eight data sources as a result of a unique three binary code at select
inputs.
2.2.2 Decoder
Decoder circuits receive inputs in the form of an N-bit binary number and generate one or more
outputs according to some requirement. A binary decoder has N inputs and 2N outputs. If the
N inputs are taken as an N-bit binary number, then only the output that corresponds to the input
binary number is asserted.
6
Digital Systems – Lab 6
For example, in the 3:8 binary decoder shown in the figure below, if a binary 5 (or “101”) is
presented on the input of the decoder, then only the 5th output of the decoder (Y5) will be
asserted and all of the other outputs will be de-asserted.
I2 I1 I0 Y[7:0]
Y0
0 0 0 00000001 Y1
0 0 1 00000010 Y2
0 1 0 00000100 I0
I1 Y3
0 1 1 00001000 Y4
1 0 0 00010000 I2
Y5
1 0 1 00100000 Y6
1 1 0 01000000 Y7
1 1 1 10000000
IC 74138
74LS138 is designed for decoding or de-multiplexing applications and comes with 3 inputs to
8 output setup.. The three enable pins of chip (in which TWO active-low and ONE active-high)
reduce the need for external gates or inverters when expanding.
Figure 8: Pin Diagram and Truth table of IC 74138 . Note: G2 = G2A + G2B
7
Digital Systems – Lab 6
2.2.3 Comparator
Comparator is a combination circuit that compares two digital or binary numbers in order to
find out whether one binary number is equal, less than or greater than the other binary number.
The following figure describes 1-bit Digital Comparator Circuit.
IC 7485
74LS138 is a 4-bit magnitude comparator have additional input terminals that allow more
individual comparators to be “cascaded” together to compare words larger than 4-bits with
magnitude comparators of “n”-bits being produced.
2.3 Exercise
2.3.1 Design, simulate, and implement a MOD-4 Synchronous Down Counter using D Flip-
flops
2.3.2 Design, simulate and implement an 8-to-1 Multiplexer using IC 74151
2.3.3 Design and simulate a 3-to-8 Decoder using IC 74138 in Logisim.
2.3.4 Design and simulate an 8-bit magnitude comparator using IC 7485 in Logisim.