Labs Experiments: E1 & M1

advertisement
Principles of Computer Engineering:
Lecture 8: Basic TTL Logic Circuits
Introduction




Digital Electronics
Logic Gates
Summary
Lab Experiment
Analogue vs. Digital
Analogue signal- one whose output varies continuously in
step with the input.
Example:
Analog
Digital signal- one whose output varies at discrete voltage levels
commonly called HIGH or LOW (1 or 0).
Example:
HIGH or 1
Digital
LOW or 0
Time
Why Digital?

Data can be stored (memory characteristic of digital).

Data can be processed for error control and encryption.

Compatible with display technologies.

Compatible with computer technologies.

Systems can be programmed.

Digital IC families make design easier.
Why Analogue?

Most “real-world” events are analog in nature.

Analogue processing is usually simpler.

Analogue processing is usually faster.

Traditional electronic systems were mostly analogue in
nature.
Digital Logic Circuits

Digital logic circuits are very useful for decision processes of many
everyday electronic devices





Calculators, Telephone Exchanges, Lifts, Domestic Appliances etc.
The simplest form of digital logic gates have two inputs and one
output (though other types do exist)
They can be based on so-called Transistor-Transistor Logic (TTL) or
Complimentary Metal Oxide Semiconductor (CMOS) technology
We will be using TTL types – one must not mix TTL & CMOS
TTL defines logic 0 to be equal to 0V (<0.8V) and logic 1 to be
equal to 5V (>2.0V) and uses a 5V supply voltage
Defining Logic Levels
• Logic devices interpret input voltages as either HIGH or LOW.
• TTL or CMOS IC families have their unique voltage profiles.
• TTL: +5V, CMOS: +12V, +9V or +5V.
TTL
Family of ICs
CMOS
Family of ICs
100%
Input voltages in the
UNDEFINED region may
yield unpredictable results.
HIGH
HIGH
80%
70%
60%
50%
Undefined
40%
Undefined
30%
20%
LOW
10%
0%
LOW
Voltage
CAUTION:
90%
Different Logic Operators

There are only a few types of basic logic operators







AND, OR, NAND, NOR, NOT, XOR and XNOR
Each type has a specific circuit symbol (we shall see these later)
The operation of each device is described by its “truth-table”
Many devices can have more than two inputs but we will only
consider two input devices in this module
The operations of the logic devices can be expressed
mathematically using “Boolean Algebra”
Sometimes logic circuits are referred to as “gates”
We will see each gate in turn…
AND Gate


An “AND” gate has the following symbol and truth-table
A
B
Q
0
0
0
0
1
0
1
0
0
1
1
1
It can be expressed using the following Boolean algebra
Q  AB

Sometimes you might see Q = A & B or the gate symbol may
contain an “&” (ampersand)
NAND Gate


A “NAND” gate has the following symbol and truth-table
B
Q
0
0
1
0
1
1
1
0
1
1
1
0
It can be expressed using the following Boolean algebra
Q  AB

A
NOTE: Q  A  B  A  B
OR Gate


An “OR” gate has the following symbol and truth-table
A
B
Q
0
0
0
0
1
1
1
0
1
1
1
1
It can be expressed using the following Boolean algebra
QAB
NOR Gate


A “NOR” gate has the following symbol and truth-table
B
Q
0
0
1
0
1
0
1
0
0
1
1
0
It can be expressed using the following Boolean algebra
QAB

A
NOTE: Q  A  B  A  B
NOT Gate


A “NOT” gate has the following symbol and truth-table
A
Q
0
1
1
0
It can be expressed using the following Boolean algebra
QA


A NOT gate is sometimes referred to as an “inverter”
“Schmitt Triggers” are specialised inverters with hysteresis
XOR Gate


An “XOR” gate has the following symbol and truth-table
B
Q
0
0
0
0
1
1
1
0
1
1
1
0
It can be expressed using the following Boolean algebra
QAB

A
NOTE: Q  A  B  A  B
De Morgan’s Theorem

De Morgan’s Theorem (or Law) states that a special
relationship exists between NOR and NAND operations such
that
A  B  A  B and A  B  A  B
A.B A.B A  B A  B
A
B
A+B
A
B
0
0
0
1
1
1
1
1
1
0
1
1
1
0
0
1
0
1
1
0
1
0
1
0
1
0
1
1
1
1
0
0
0
0
0
0
NAND and NOR Gates



It is a useful fact that all other types of logic functions can be
created from combinations of NAND gates (74LS00) or NOR
gates (74LS04)
Hence the NAND gate is the most commonly used gate
In today’s experiment, you will be making other gate functions
using only NAND gates
74LS04 (Hex NOT gate)
A
Q
LED
0
1
Off
1
0
On
74LS00 (Hex NAND gate)
Experiment: Part 2


There are four circuits to build and test
Note down results in your logbooks
+
A
B
0
0
0
1
1
0
1
1
Q
Summary
Basic Logic Gates
 TTL vs. CMOS
 Typical Gate Functions
 Boolean Algebra
 De Morgan’s Theorem
 Questions?

Principles of Computer Engineering:
Lab Experiment 9: Basic TTL Logic
Introduction






Introduction to TTL logic gates
Use LEDs to indicate logic level
Need to drive LEDs with inverters (NOT gates)
Test four different combinations of NAND gates
Extra “mystery” circuit to build and test
Summary
TTL Logic Inputs





The figure opposite shows how to
use resistors to apply logic 1 or logic
0 to standard TTL gate inputs
The 10kW resistor is acting as a pull+
up resistor – when the switch closes
the input voltage = 0V
The 470W resistor as a pull-down
resistor – when the switch closes the
input voltage = 5V
Logic 0 is defined as < 0.8V and Logic
1 as > 2.0 V
Important to be aware of losses
1KΩ
Experiment Part 1: LED Indicators






Most TTL logic gates are “open
collector” devices
This means that they cannot provide
any source current
+
They can only sink current
Therefore to drive an LED we must
use inverse logic
This means that logic 0 will activate
the LED and logic 1 will deactivate it
Hence, we use inverters to drive the
LEDs to give true logic (make 3-off)
74LS04 (Hex NOT gate)
A
Q
LED
0
1
Off
1
0
On
Experiment: Part 2


Each circuit has two inputs and one output
Use LED indicator circuits to show logic levels
+
74LS00 (Hex NAND gate)
Experiment: Part 2


There are four circuits to build and test
Note down results in your logbooks
+
A
B
0
0
0
1
1
0
1
1
Q
Summary




Build and test three LED indicator circuits using 74LS04
inverters
Build and test the four circuits based on NAND gates
Build and test the third “mystery” circuit based on NAND gates
Any questions?
Download