Sie sind auf Seite 1von 7

MAK 439E COMPUTER CONTROLLED SYSTEM DESIGN

Experiment 1. Digital Electronic Circuits and Logic Design

1. OBJECTIVES

To be familiar with using a protoboard (also called breadboard) and building simple circuits.
To be familiar with operations of several basic TTL (Transistor-Transistor Logic) gates.
To be familiar with the basic principles of flip-flops.

2. EQUIPMENT

; TTL gates-two 7400s, one 7402, one 7404


; Cables
; A digital designer/trainer that has logic sources, logic monitors, power supply and
breadboard. If such a trainer is not available, the following parts are required.
ƒ Four LEDs,
ƒ Four resistors (150 Ω)
ƒ One logic switch and two push-buttons
ƒ Breadboard
ƒ Power Supply

3. INTRODUCTION

Digital circuits are hardware components that manipulate binary information. The circuits are
constructed with electronics parts such as transistors, diodes, and resistors. Each circuit is called
a gate. You do not have to be concerned with the internal construction of the individual gates
but only with their external logical properties. Each gate performs a specific logical operation,
and the output from one gate is applied to the inputs of other gates, in sequence, to form the
required digital circuit.
There is a mathematical system known as Boolean Algebra that describes the operational
properties of digital circuits. There are three basic operations in Boolean algebra; AND, OR, and
NOT. They are defined as follows:

1. AND (·)
0·0 = 0 0·1 = 0 1·0 = 0 1·1 = 1

2. OR (+)
0+0 = 0 0+1 = 1 1+0 = 1 1+1 = 1

3. NOT (~)
~0 = 1 ~1 = 0
These definitions may be listed in a compact form in a truth table. A truth table is a table of
combinations of the binary variables showing the relationship between the values that the
variables take and the result of the operation. The truth tables for the operations AND, OR and
NOT are shown in Table 1. The tables list all possible values for the variables and the results of

1
the operation. These tables clearly explain the definition of the three operations. Figure 1 shows
graphics symbols for these three gates in a logical circuit.

Table 1. Truth Tables for the Three Logical Operations

AND OR NOT
X Y X.Y X Y X+Y X ~X
0 0 0 0 0 0 0 1
0 1 0 0 1 1 1 0
1 0 0 1 0 1
1 1 1 1 1 1

Figure 1. Graphics symbols for AND, OR and NOT Gates

Flip-Flop (FF) is one of the most basic components used in sequential circuits. An FF is a
component that can hold one bit state even in the absence of inputs. Its state change depends not
only on the current inputs but may also depend on its current state. With the FF components,
many types of sequential circuits can be created. One of the most commonly used sequential
circuits is the counter, which counts its input pulses.
It is very important for you to understand the principles of digital circuits and logic even if you
just want to use handy hardware products. Otherwise, you may have difficulties in designing
your computer control applications.
3.1 How to build a circuit on a breadboard?

A breadboard is a useful device to build simple circuits rapidly and easily. Figure 2 shows how
the holes on a breadboard are connected to each other. The long connections that are placed
horizontally on the figure are generally intended to be used as power supply or ground
connections. For example if a +5 V voltage is connected to the first hole, then all the holes in the
same row will have the +5 V connection and can further be used to supply +5 V to any point on
the circuit when needed.
Vertical connections are shorter and connect only 5 holes in a column as shown in the Figure 2.
There is no connection through the space between the two 5-hole groups. This space is for
placing all kinds of ICs (integrated chips) such as the 74xx that you will use for this lab
assignment. You can see a chip (NE555) placed correctly on the breadboard in the figure above.
If you place an IC on the 5-hole group instead of this space, you will short-circuit some legs that
will cause a serious problem (probably you will damage the chip), so be careful on this rule
when you place an IC on the breadboard.
In the same figure, there are a resistor and a LED (light emitting diode). The simplest circuit that
can be built on a breadboard is set up with these components as an example. The current should
pass first through the resistor and then the LED causing it to be on.

2
Figure 2. A breadboard and the connections on it

A “1” in digital logic is called “high” in digital circuits which corresponds to +5 V DC.
Similarly a “0” is called “low” and corresponds to 0 V (ground). In Figure 3, there is a NAND
gate having two inputs; A and B. If switch A is open (as shown in the figure) then it means +5 V
is connected to the first input of the gate through a resistor, which means input A is high. When
it is closed the input will be connected to the ground (can also be called as “grounded”), then the
input A will be low.
The output of the gate is connected to ground through a resistor and a LED in order to monitor
the output state. The LED will be on when the output is high.

Figure 3. A NAND gate with connections

On the trainer board, it is easier to build digital circuits since it has the logic sources as switches
and the logic monitors as LEDs. Directly making a connection from a logic source to an input of
a gate will substitute all the +5 V and ground connections, the switch A and the resistor. Then
the input can be changed to high or low using the switch. Similarly, a connection to the logic
monitor will replace all the resistor, LED and ground connections.
There are also connections from the upper and lower sides of the gate which represents the
supply voltage of the gate which makes it work. On an IC these two connections are represented
by the legs Vcc and GND (ground) (see Figure 4). For 74xx chips supply voltage is +5 V.

3
4. EXPERIMENTS

Warning: If an external power supply is used, the amplitudes of all input signals must always
be kept at or less than five volts.
4.1 Basic TTL gates

4.1.1 Quad Two-Input NAND Gate 7400

The pin configuration of this device is shown in Figure 4. Carefully study this pin
configuration. These devices are very unforgiving to careless users. Choose one gate for this
experiment and construct the circuit of Figure 3, to generate experimentally the truth table of
this gate (similar to Table 2). Observe the output and record your observation.

Figure 4. Pin Configuration of 7400

4.1.2 Quad Two-Input NOR Gate 7402

The pin configuration of this device is shown in Figure 5. Carefully study this figure and
choose one gate for this experiment. Construct the circuit of Figure 6, and experimentally
generate its truth table. Observe the output and record your observation.

Figure 5. Pin Configuration of 7402

4
Figure 6. A NOR gate with connections

4.1.3 Hex Inventor Gate 7404

The pin configuration of this device is shown in Figure 7. Carefully study this figure and
choose one gate for this experiment. Construct the circuit of Figure 8. Observe the output and
record your observations.

Figure 7. Pin Configuration of 7404

Figure 8. A NOT gate with connections

5
4.2 Flip-Flops

4.2.1 Basic R-S Flip-Flop

Construct the circuit of Figure 9, using two NAND gates. Experimentally verify its truth table
given in Table 2. Connect Q and ~Q to the display LEDs so that you can see the result clearly.

Figure 9. Basic R-S Flip-Flop

Table 2. Truth Table For Basic R-S Flip-Flop


Inputs Output
S R Q
1 1 No Change
0 1 Q=1
1 0 Q=0
0 0 Invalid State

4.2.2 Clocked R-S Flip-Flop (Optional Assignment)

Modify the circuit in Figure 9 to form a clocked R-S FF as shown in Figure 10 (using one
NAND gate). A clock control is now available and the circuit operates under positive pulses.
Obtain the state table experimentally (S, R, C; Q, ~Q). Use logic switches for the set and clear
(reset) signals, a push-button for the clock signal.

Figure 10. A Clocked R-S Flip-Flop

Connect Q and ~Q to the display LEDs so that you can see the result clearly.

6
5. ON THE LAB REPORT

i. Include the circuit diagrams and the truth tables of the circuits you had built.

ii. Pick two rules from Identity 10-17 of Basic Identities of Boolean Algebra Table and verify
them experimentally (Table 3). Again include the circuit diagrams and truth tables.

Table 3. Basic Identities of Boolean Algebra


1. X + 0 = X 2. X · 1 = X
3. X + 1 = 1 4. X · 0 = 0
5. X + X = X 6. X · X = X
7. X + X = 1 8. X · X = 0

9. X = X 10. X + Y = Y + X
11. X · Y = Y · X Commutative 12. X + (Y + Z) = (X + Y) +Z
13. X· (Y·Z) = (X·Y) ·Z Associative 14. X· (Y+ Z) = X·Y + X·Z
15. X+(Y·Z) = (X + Y)·(X + Z) Distributive 16. X + Y = X ⋅ Y

17. X ⋅ Y = X + Y DeMorgan

iii. Draw a circuit to realize following expressions using AND, OR and NOT gates only.

¾ X = ( A + C ).( B.C ).( A + B)

¾ Y = ( A.B ) + ( A.B )

¾ Z = ( A + B + C ).( A + B ).( A + B + C )

Das könnte Ihnen auch gefallen