Professional Documents
Culture Documents
EE222 Project
EE222 Project
EE222 Project
This project is intended to design a sequential ring counter for the given number
sequence. The project has been split into two closely linked parts.
Firstly, for the given sequence and flip flop, a counter was designed by making
the state table and state diagram. Using the skill of k map the minimized sum of
product expression was developed and used to make circuit with AND OR logic
gates.
Moreover, the same was repeated but for the different flip flop and without the
need for sum of product expression. Thus, instead of AND OR gates, multiplexers
was used. Also a prime number detector was used to indicate if the number was
a prime number.
Lastly, in addition to this a seven segment display chip was made and used in both
parts. The project was implemented using logisim software.
i
Table of content
Section Title Page no#
1.0 INTRODUCTION 1
1.1 Ring Counter 1
1.2 State diagram 1
1.3 State table 2
1.4 Flip Flop 2
1.5 Multiplexers 4
2.0 CONTENT 5
2.1 DESIGN PROBLEM 1 5
2.1.1 Identify Design problem 5
2.1.2 State Diagram for Design Problem 1 5
2.1.3 State table for Design Problem 1 6
2.1.4 Karnaugh maps and equations for Design Problem 1 7
2.1.5 Circuit for Design Problem 2 9
2.2 DESIGN PROBLEM 2 10
2.2.1 Identify Design problem 10
2.2.2 State Diagram for Design Problem 2 10
2.2.3 State table for Design Problem 2 11
2.2.4 Multiplexer Input Table 12
2.2.5 Circuit for Design Problem 2 13
2.3 ADDITIONAL : SEVEN SEGMENT DISPLAY 14
2.3.1 Truth Table for Seven segment 14
2.3.2 Karnaugh maps and Equations 14
2.3.3 Circuit Diagram and Chip Layout 15
3.0 CONCLUSION 16
4.0 BIBLIOGRAPHY 17
ii
List of figures
iii
List of tables
Table
title Page no#
no#
iv
List of acronyms
Acronyms Meaning
mux Multiplexer
OR Logic gate
v
1.0 INTRODUCTION
For the purpose of this project, it is vital to first of all understand what a ring counter is.
Moreover it is also vital to understand the workings and functions of a state table and
state diagram. In addition the main components of this project, the flip flops and the
multiplexer and how it helps the circuit remember the sequence of the circuit.
1.1 Ring counter
A ring counter is a sequential logic circuit made using a shift register in which same data
is recirculated using clock pulse. The counter is connected using flip flops where the
output of the previous flip flop is the input in the next.
1
1.3 State table
Another way of representing a sequence is by using the help of state tables. The state
table is just the representation of state diagram in three main stages.
2
Figure 8: SR, JK, T flip-flop internal circuitry
A JK flip-flop is a better version of SR flip flop as it is able to give an output for S=R=1
without any problem. A T flip flop is basically a JK flip-flop with both J and K input as the
same.
In order to use a flip flop we have to insert the excitation table of the respective flip flop
in the state table in order to get the input for each flip flop [4].
3
1.5 Multiplexers
A multiplexer (mux) is a 2^n input and a single output combinational circuit.
4
2.0 Content
2.1 DESIGN PROBLEM 1
2.1.1 Identify Design problem
Inputs
One input => X
Flip flops
2 flip flop: T flip flop, SR flip flop
Table 1: T flip flop Table 2: SR flip flop
Q Q* J Q Q* S R
0 0 0 0 0 0 x
0 1 1 0 1 1 0
1 0 1 1 0 0 1
1 1 0 1 1 x 0
5
2.1.3 State table for Design Problem 1
6
2.1.4 Karnaugh maps and equations for Design Problem 1
7
Figure 14: k-map and sop equations for SR0 flip-flop
8
2.1.5 Circuit for Design Problem 2
9
2.2 DESIGN PROBLEM 2
2.2.1 Identify Design problem
Inputs
One input => X
Flip flops
1 flip flop: JK flip Flop
Table 4: JK flip flop excitation table
Q Q* J K
0 0 0 x
0 1 1 X
1 0 x 1
1 1 x 0
Number of flip flop = largest number of bits in the largest number
Since the largest number is 15 which is 1111 in binary, 4 JK flip flop will be used
2.2.2 State Diagram for Design Problem 2
Same as design problem 1
10
2.2.3 State table for Design Problem 2
Table 5: State Table => Design problem 2
Current state in Next state Flip flop out
q3 q2 q1 q0 x q3 q2 q1 q0 J3 K3 J2 K2 J1 K1 J0 K0 Y
0 0 0 0 0 0 0 0 0 1 0 X 0 X 0 X 1 X 0
1 0 0 0 0 0 0 0 0 1 0 X 0 X 0 X 1 X 0
2 0 0 0 1 0 1 1 1 1 1 X 1 X 1 X X 0 0
3 0 0 0 1 0 0 1 1 1 0 X 1 X 1 X X 0 0
4 0 0 1 0 0 1 1 0 1 1 X 1 X X 1 1 X 1
5 0 0 1 0 0 1 0 0 1 1 X 0 X X 1 1 X 1
6 0 0 1 1 0 0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
X’ 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
x 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31
Input 0 X’ 1 0 0 1 0 x 0 0 0 0 0 0 0 0
k3 In0 In1 In2 In3 In4 In5 In6 In7 In8 In9 In10 In11 In12 In13 In14 In15
X’ 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
x 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31
Input 0 0 0 0 0 0 0 0 0 1 1 X’ 1 x X’ x
J2 In0 In1 In2 In3 In4 In5 In6 In7 In8 In9 In10 In11 In12 In13 In14 In15
X’ 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
x 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31
Input 0 1 X’ 0 0 0 0 x x 0 X’ 0 0 0 0
K2 In0 In1 In2 In3 In4 In5 In6 In7 In8 In9 In10 In11 In12 In13 In14 In15
X’ 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
x 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31
Input 0 0 0 0 1 1 1 X’ 0 0 0 0 1 x 0 1
J1 In0 In1 In2 In3 In4 In5 In6 In7 In8 In9 In10 In11 In12 In13 In14 In15
X’ 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
x 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31
Input 0 1 0 0 0 x 0 0 1 X’ 0 0 0 1 0 0
K1 In0 In1 In2 In3 In4 In5 In6 In7 In8 In9 In10 In11 In12 In13 In14 In15
X’ 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
x 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31
Input 0 0 1 1 0 0 1 X’ 0 0 1 1 0 0 x 1
J0 In0 In1 In2 In3 In4 In5 In6 In7 In8 In9 In10 In11 In12 In13 In14 In15
X’ 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
x 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31
Input 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
K0 In0 In1 In2 In3 In4 In5 In6 In7 In8 In9 In10 In11 In12 In13 In14 In15
X’ 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
x 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31
Input 0 0 0 0 0 0 0 x 0 X’ 0 0 0 1 0 X’
Y In0 In1 In2 In3 In4 In5 In6 In7 In8 In9 In10 In11 In12 In13 In14 In15
X’ 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
x 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31
Input 0 0 1 1 0 1 0 1 0 0 0 1 0 1 0 0
12
2.2.5 Circuit for Design Problem 2
13
2.3 ADDITIONAL: SEVEN SEGMENT DISPLAY
D1 E1 F1 d2 e2 f2
G1 g2
14
2.3.3 Circuit Diagram and Chip Layout
A1
B1
C1
D1
Q3 E1
F1
Q2 G1
a2
Q1 b2
c2
Q0 d2
e2
f2
g2
Figure 19: seven segment display circuit and chip pinout diagram
15
3.0 Conclusion
In conclusion, in main purpose of the project was achieved as the synchronous counter
had successfully displayed the unique ring sequence. Despite facing a bit of a challenge
understanding how the logisim software works the project was successfully
implemented. While conducting this project, it has shown numerous problems and
ways in which mistake were made. For instance when drawing the k-map some of the
values was incorrectly inserted in the k-map and even while connecting wires in logisim.
Hence it is seen that for a successful logic design it is necessary to be focused and ensure
no mistake or error is made while conducting any step in designing.
Despite that, it is notable that to implement a function, there are more than one way.
For instance in this project the implementation of the counter was done using
combinational (and or) analysis or by using multiplexer. Never the less any method used
has its own advantages and disadvantages respectively.
Summing up, it is a vital importance to understand concept and how to use components
in conjunction with practice using various software in order to be able to master the
skill of designing sequential problems.
16
4.0 Bibliography
[3] "All About Circuits," EETech Media, LLC., 2019. [Online]. Available:
https://www.allaboutcircuits.com/textbook/digital/chpt-11/finite-state-
machines/. [Accessed 16 June 2021].
17
18