Transcript Document

Lab 03 :Vending Machine System :
Slide #2
Logic Gate Equations:
Slide #3
Vending Machine System:
Slide #4
Older Generation IC Technology:
Lab 03 : Logic Gate Equations :
Each logic gate has a Boolean equation to represent its operation.
Input A
NOT
Output X
Boolean Equation:
XA
Boolean Equation:
Input A
AND
Output X
Input B
Input A
Input B
Slide #2
OR
X  AB
Boolean Equation:
Output X
X AB
Lab 03 : Vending Machine System:
Design a logic system for a vending machine that will dispense a 75 cent surprise gift
package if any of the following conditions occur… Three quarters are inserted. A dollar is
inserted. The machine can only accept quarters and a dollar coin / note.
Step 1: Declare Inputs and Outputs:
Inputs : Quarters (Q1, Q2, Q3). Dollar (L). Logic 1 = currency present.
Outputs : Package (P). Quarter Change (C). Logic 1 = dispense item.
1
Q3 0
1
Q2 0
0
Q1 1
0
1
L
1 Q1 • Q2• Q3
0
1
0
L
0
1
0
1
P =•+ L
0
1
C
1
Step 2: Generate Equation for the system:
1
1
Dispense Package if Quarter1 and Quarter2 and Quarter3 OR Dollar is inserted.
Dispense change if dollar is inserted.
C2
Once the system diagramP is=complete
it can
Q1 • Q2•
Q3be+used
L to test the operationCof=the
L system.
Here is what happens when someone inserts 3 quarters.
Here is what happens when someone inserts
P-Term
a dollar.
: thus : P = • + L
Here is what happens when someone searches their pocket finds a quarter and inserts it into the machine.
Then they realize that they do not have 2 more quarters! If they insert a dollar what would be the result?
Step
Draw
thepackage
Digital and
System
Diagram
: be dispensed. The un-happy user of the machine would have paid
The 3:
result
: The
the change
would
$1 ($1.25
- $0.25
To resolve
this
problem
extra This
change
output
could
be added.
Group
variables
thatchange).
are ANDed
together
into
a singleanblock.
block
is called
product
term (P-Term).
Work from output towards input. P must be connected to an OR gate.
Slide #3
Re-insert the P-Term (Q1 • Q2• Q3). A 3 input AND gate is required.
Connect L to OR gate and connect C to L (C=L).
Lab 03 : Older Generation IC Technology :
Older generation IC technology such as TTL IC’s (transistor, transistor, logic) could
often require students to interconnect 5 to 15 IC’s. The wiring would often be very
complex and messy.
Complex designs looked so messy that the term spaghetti factory
was used to describe the appearance of the wiring.
Slide #4