Download LABORATORY 9 Digital Logic Circuits

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
LABORATORY11:
Digital Logic Circuits
General Engineering
Polytechnic University
Overview








Objectives
Logic Functions
Sample Problem
Truth Table
Boolean Equation
Karnaugh Maps
(K-maps)
Simplified Boolean
Equation
Combinational Logic
Circuit










Integrated Circuits (ICs)
IC Identification
Digital Logic Trainer
Materials for Lab
Problem Statement
Procedure
Written Assignment
Written Topics
Recitation Topics
Closing
Objectives
 Understand
the functions of logic
gates
 Become familiar with digital circuits
Use you new knowledge to design
& implement a combinational logic
circuit using the digital trainer
Logic Functions
 AND
- “The all or nothing operator”
• Output is high (1) only when ALL inputs are
high (1)
 OR
gate - “The any or all operator”
• Output is high (1) when at least ONE input
is high (1)
 NOT
(INVERTER) operator
• Output is opposite of input
• Only one input and one output
Logic Functions
Logic
Function
Logic
Symbol
Boolean
Expression
AND
A
B
Y
A•B=Y
OR
A
B
Y
A+B=Y
NOT
A
Ā
Truth Table
Inputs
A
0
0
1
1
0
0
1
1
Outputs
B
0
1
0
1
0
1
0
1
Y
0
0
0
1
0
1
1
1
0
1
1
0
A=Ā
Sample Problem
 An ATM
machine has three options,
Print statement, Withdraw money,
or Deposit Money
 The ATM machine will charge you
$1.00 if you:
• Want to withdraw
• Only want to print out your statement
(no transactions at all)
Truth Table
INPUTS
P W D
0
0
0
0
0
1
0
1
0
1
0
1
1
0
0
1
0
1
1
1
0
1
1
1
A truth table is a table
OUTPUT
that displays all possible
C
input combinations and
0
the resulting outputs.
0
1
1
1
0
1
1
INPUT
OUTPUT
P = print
C = charge
W = withdraw
D = deposit
0 = “do not”
1 = “do”
0 = $0.00
1 = $1.00
Boolean Equation
INPUTS
OUTPUT
C
P W D
0
0
0
0
0
0
1
0
0
1
0
1
1
0
1
1
1
1
0
0
1
0
1
0
1
1
0
1
1
1
1
1
Outputs with a value
of “ONE” are kept
C = PWD
+ PWD
+ PWD
+ PWD
+ PWD
Karnaugh Maps (K-maps)
C = PWD+ PWD+ PWD + PWD + PWD
0 0 PWD
0 1 1 1 1 0
PW PW P W PW
0D
1D
1
1
1
1
1
_
Why can’t you loop the three
Why can’t you switch PW and PW?
adjacent 1s in the top row together?
Simplified Boolean Equation
D D
_ _ _
PWD PWD
1 1
1 1
1
1 1_
1 1PWD
_1_
_
1 PWD
PW
PW
PW
PW
C = W_
PWD PWD
+ PD
Combinational Logic Circuit
W
P
D
_
D
_
PD
C =W
D
+P
PD
Integrated Circuits (ICs)
 Used
to implement combinational
logic circuits
• We use the TTL family (transistor
transistor logic)
IC Identification
A1
Y1
A2
Y2
A3
Y3
GND
1
2
3
4
5
6
7
14
13
12
11
10
9
8
V cc
A6
Y6
A5
Y5
A4
Y4
A1
B1
Y1
A2
B2
Y2
GND
7404
Inverter Chip
7408
AND Chip
A1
B1
Y1
A2
B2
Y2
GND
1
2
3
4
5
6
7
14
13
12
11
10
9
8
7432
OR Chip
1
2
3
4
5
14
13
12
11
10
6
9
7
8
V cc
B4
A4
Y4
B3
A3
Y3
V cc
B4
A4
Y4
B3
A3
Y3
Digital Logic Trainer
 Complete
diagram on page 98
 Breadboard
• Points with a line through them
represent the same connection line

IC Chip
IC Chip
Materials for Lab
 Digital/Analog
Trainer
 7432 2-Input OR gate IC
 7408 2-Input AND gate IC
 7404 Hex Inverter (NOT gate) IC
 Hook-up Wire
 Computer equipped with LabVIEW
Problem Statement

A farmer has two barns
• A hen is free to move about.
• A supply of corn is moved periodically from one barn to the
other.
• He wants to protect the hen from a predator fox, and also
prevent the hen from eating the supply of corn.

An engineering student is hired to design an alarm
system, using digital electronics. It will activate under
the following conditions:
• The fox and the hen are in the same barn.
• The hen and the corn supply are in the same barn.
Problem Statement

Design a combination logic circuit that will accomplish
this task.
• The design should be cost effective, using the least amount
of gates and input variables.

The logical output of the circuit should be connected
to a lamp.
• The lamp being “on” indicates alarm activation
• The lamp being “off” indicates alarm deactivation.

The fox and hen and corn must be present in either
barn 1 or barn 2
• Presence in barn 1=“1”
• Presence in barn 2=“0”
Procedure
•Truth Table
•Boolean Expression
•K-Map
•Simplified Boolean
Expression
•Logic Circuit
•Digital Trainer
•LabVIEW Simulation

Truth Table
• Determine what are the
input variables and the
output variable
• Decide how many
combinations there should
be
• Create and complete the
truth table on a sheet of
paper
Procedure
•Truth Table
•Boolean Expression
•K-Map
•Simplified Boolean
Expression
•Logic Circuit
•Digital Trainer
•LabVIEW Simulation

Boolean Expression
• Gather all the combinations
that produced a “1” for the
output
• Create a Boolean
expression from these
smaller expressions
Procedure
•Truth Table
•Boolean Expression
•K-Map
•Simplified Boolean
Expression
•Logic Circuit
•Digital Trainer
•LabVIEW Simulation

K-Map
• Create a K-Map table
• Be sure to only have one
variable change states at a
time from one box to
another
• Use the Boolean expression
to fill in the “1’s”
Procedure
•Truth Table
•Boolean Expression
•K-Map
•Simplified Boolean
Expression
•Logic Circuit
•Digital Trainer
•LabVIEW Simulation

Simplified Boolean Expression
• Use the K-Map to circle the
pairs of 1’s
• The 1’s may only be circled
in multiples of 2, starting
from the largest possible
combination and working its
way down
• Write down the new
simplified expression
Procedure
•Truth Table
•Boolean Expression
•K-Map
•Simplified Boolean
Expression
•Logic Circuit
•Digital Trainer
•LabVIEW Simulation

Logic Circuit Diagram
• Use the new simplified
expression to design a logic
circuit
• Have your instructor check
your work
Procedure
•Truth Table
•Boolean Expression
•K-Map
•Simplified Boolean
Expression
•Logic Circuit
•Digital Trainer
•LabVIEW Simulation

Digital Trainer
• Do NOT plug anything in until
your instructor has looked
over your work
• Use the logic circuit and IC
chip diagram to create the
actual circuit on the
breadboard
• Be sure to connect each of
the ICs to Ground and VCC 5V
Procedure
•Truth Table
•Boolean Expression
•K-Map
•Simplified Boolean
Expression
•Logic Circuit
•Digital Trainer
•LabVIEW Simulation

LabVIEW Simulation
• With the use of your logic circuit
diagram - recreate the circuit in
LabVIEW
• The front panel should have three
control switches representing the
variables and one Boolean indicator
to represent the output
• HINT: LabVIEW has the following
built in comparison functions:
NOT
AND
OR
Written Assignment
Full Team Report (one report per team)
 Use the guidelines on page 5 for help
 Include original data with instructor’s initials
 Original tables and work should be re-written
so it is legible
 Include a printout of the LabVIEW front and
diagram panel
 Include the topics found on the next slide
 Remember to create a title page

Written Topics

Each of the following topics must be
addressed in the full report and should be
placed in the proper sections
• What are possible applications of digital
electronics?
• Account for any error made during the lab
• Compare the problem before and after it was
simplified
• What are some advantages of minimization using
digital logic?
Recitation Topics
If your design did not work the first time,
discuss why
 Discuss how the digital circuit and its design
would be affected if barn one had an alarm
bell and barn two has an alarm horn

Closing
 Return
all the equipment back to
your instructor