ELEC 241 Laboratory Manual
Revised 8 September 2004
Professor Andrew H. Andersen, Jr.
Introduction
OBJECTIVE
The purpose of this manual is to provide the student with practical laboratory experience in digital electronics, and give them background and instructions on how to build, apply, and troubleshoot digital logic circuits. During the performance of these experiments, problems are bound to occur which will require the student to troubleshoot the circuit under test.
LABORATORY REQUIREMENTS
Each experiment begins with a set of stated objectives, a list of required materials and parts, and a synopsis of the theory, followed by a procedure for meeting each objective. Laboratory Experiments should be performed according to the schedule in the Learning Objectives.
Prior to coming to Lab and performing the experiment, it is expected the student will have:a) read the required material in the textbook.
b) read the laboratory experiment.
c) drawn the logic diagrams with pin numbers.
d) performed any required calculations.
e) made an outline of the expected results.
f) developed a method for recording the observations.
Laboratory experiments may be performed by the individual or a team of no more than three students. All laboratory partners should be listed on the report cover but each student must submit a separate written report. All Laboratory Reports should be typed or neatly written using the standard Short Format and submitted for grading no later than two weeks after performance to receive maximum credit.
CIRCUIT CONSTRUCTION
Circuits will be designed and constructed on a Protoboard which has a built in power supply. All IC's will be installed into the protoboard using a DIP insertion tool. The student should make sure that the pins do not bend underneath the IC during insertion.
Pin 1 of every chip should be oriented in the same direction. It is to the student’s advantage to decide on an orientation for all the IC's for the first experiment and use this as their standard. With all the chips facing in the same direction, it is easier to make connections to the power supply. When building the circuit it is advisable to wire common signal paths with the same color wire for ease of troubleshooting. In addition, make sure that the voltages applied to the IC's are proper TTL logic levels, and all power supply connections are of the correct polarity. Try to use red leads for +5V, black leads for ground, and different colors for the other signals.
The student should attempt to minimize or eliminate wires that cross from one side of a row of chips to the other. The constant crossing of wires from one side of the IC to the other makes visual inspection, troubleshooting the circuit, and replacement of IC's more difficult. If it is necessary to travel from one side of the row of IC's to the other, dress the wires so that they pass between the chips.
The wires that are used to make the connection should have 3/8" of insulation stripped from the end. If too little is removed, a poor or loose contact may be made or the wire may fall out during circuit inspection or when moving the circuit. Removing too much insulation from the lead wires may cause the circuit to malfunction since the bare wire may short to another pin or connection. When a lead wire must be bent, make a smooth bend instead of a sharp bend. A sharp bend in the wire may cause a permanent or intermittent break under the insulation where it might be difficult to find.
The final circuit should have a neat appearance and not look like a bowl of spaghetti. If the circuit is neat and it becomes necessary to troubleshoot, the extra time taken in circuit construction could mean less time to find and correct circuit faults.
CIRCUIT TROUBLESHOOTING
Circuit testing may also be known as troubleshooting. First, it must be determined that the circuit is malfunctioning and then we must isolate the malfunction to a section of the circuit. If a problem can be isolated to a small section, the fault can be quickly located.
It is usually easier to find problems in a digital circuit than in a discrete analog circuit provided the troubleshooter is familiar with the proper operation of the IC. With IC's, most of the components are not available to the user and therefore only inputs and outputs need be checked. The student should expect most circuit problems to be caused by wiring errors or broken or bent leads on the IC or connecting wires. Unless incorrect voltage polarities or levels are applied and damage the IC, it should not be the primary suspect for the fault. When an IC is faulty, it may become extremely hot while power is applied.
Some problems in digital circuits may be caused by spikes on the power supply when the IC switches states. This is a condition, which may be observed on an oscilloscope. Although this condition is not likely to occur during these experiments, it is easily corrected by installing decoupling capacitors. Power supply spikes or glitches are eliminated by connecting a .1mF decoupling capacitor from the +5V pin on the IC to ground on each row or every five IC's. This technique is widely used by industry in digital circuit construction to eliminate potential problems.
IC DATA SHEETS
The IC data sheets may be found in your TTL Data manual, and on the CR-ROM that comes with the course text. Some data sheets in pdf format may be found on the course web site.
Page i
Introduction – The 7-Segment LED Display
FIGURE 1
The seven segment LED display consists of light emitting diodes connected to what appears to be a squared 8. The display looks similar to Figure 1. Each letter denotes a segment name.
Let us assume this is a common anode display. All the anodes are connected through a current limiting resistor to logic 1 (+VCC). To turn on a segment, we apply a logic 0 (ground) to the cathode lead of the segment. To turn a segment off, we apply logic 1 to the cathode lead of the segment. Therefore, if we wish to display a 0, we must turn on segments a, b, c, d, e, and f, and turn off segment g. S we send logic 0 to the pins connected to segments a through f and a logic 1 to the pin connected to segment g.
In the table below, we have filled in the binary patterns to create the proper display and also show how we would connect the display to the data bus. In this example, D7 is not used. We would, therefore tie it to a desired logic level, in this case logic 0.
To avoid a conflict with characters in the display, the pattern for b and d is lower case. Also the display for 6 has segment a lit to avoid confusion with lower case b.
Segment / NC / g / f / e / d / c / b / aCHAR / D7 / D6 / D5 / D4 / D3 / D2 / D1 / D0 / HEX
0 / 0 / 1 / 0 / 0 / 0 / 0 / 0 / 0 / 80H
1 / 0 / 1 / 1 / 1 / 1 / 0 / 0 / 1 / 79H
2 / 0 / 0 / 1 / 0 / 0 / 1 / 0 / 0 / 24H
3 / 0 / 0 / 1 / 1 / 0 / 0 / 0 / 0 / 30H
4 / 0 / 0 / 0 / 1 / 1 / 0 / 0 / 1 / 19H
5 / 0 / 0 / 0 / 1 / 0 / 0 / 1 / 0 / 12H
6 / 0 / 0 / 0 / 0 / 0 / 0 / 1 / 0 / 02H
7 / 0 / 1 / 1 / 1 / 1 / 0 / 0 / 0 / 78H
8 / 0 / 0 / 0 / 0 / 0 / 0 / 0 / 0 / 00H
9 / 0 / 0 / 0 / 1 / 0 / 0 / 0 / 0 / 10H
A / 0 / 0 / 0 / 0 / 1 / 0 / 0 / 0 / 01H
B / 0 / 0 / 0 / 0 / 0 / 0 / 1 / 1 / 03H
C / 0 / 1 / 0 / 0 / 0 / 1 / 1 / 0 / 46H
D / 0 / 0 / 1 / 0 / 0 / 0 / 0 / 1 / 21H
E / 0 / 0 / 0 / 0 / 0 / 1 / 1 / 0 / 03H
F / 0 / 0 / 0 / 0 / 1 / 1 / 1 / 0 / 0EH
Page i
ELEC 241 LAB 1 – Binary Numbers
OBJECTIVE
The purpose of this experiment is to explore the various number systems and convert between the decimal number system and the number systems used in digital systems. The student will build a digital circuit to convert between binary, BCD, decimal, and hexadecimal number systems.
EQUIPMENT AND PARTS REQUIRED
1 CADET Protoboard
1 Oscilloscope
1 Logic Probe
1 74LS04, 74LS47A
1 Common Anode seven segment display (MAN 1)
1 each 330W resistor network or 7 each 330W
1 each 1kW resistor network or 5 each 1kW resistors
1 each 4 contact DIP switch
INTRODUCTION
The number of symbols that are used to make up a number system is called the radix or base of that system. The decimal number system is represented by ten symbols that are used for counting, the numbers 0 through 9 and thus has a radix of 10. We are not limited in our number systems to numbers of nine or less. To represent a number larger than 9, we simply add the required digits in front of our basic numbers. This increases the size of the number because the position of a digit in the number determines its weight. In the decimal number system, each digit is represented by the radix or base raised to the power that is determined by its position. To determine the power, we start counting at zero just to the left of the decimal point. We multiply the position weight by the number to determine the value of the number. The value of the number 234 in decimal may determined as follows:
234 = 2(102) + 3(101) + 4(100)
234 = 2(100) + 3(10) + 4(1)
Our number therefore has 2 hundreds units plus 3 tens units plus 4 units or a quantity of two hundred thirty-four units. This system of numbers should be familiar since it is the number system, which has been used by the student almost exclusively until now.
The binary number system is another way of counting. It is a simpler system than the decimal system since it consists of only two digits, 0 and 1. These two numbers are called BITs, which is a contraction of the words BInary digiT. As with the decimal system, the binary system is a weighted position number system with a radix of 2. The numerical value of the number depends on the BIT position. Since it is radix 2, the value of the number in decimal may be determined by summing the individual values as follows:
1011 = 1(23) + 0(22) + 1(21) + 1(20)
1011 = 1(8) + 0(4) + 1(2) + 1(1) = 11
The digit on the right of the binary number is referred to as the Least or MSB. Binary numbers usually have a B after the number to in indicate that this is a binary number while decimal numbers appear with no subscript. The number 1011 in binary will usually be written as 1011B. Digital systems use the binary system since this system is easily implemented in electronics by operating a transistor in saturation mode to represent logic 1 and cutoff to represent logic 0.
Occasionally, the complement of a binary number is required. This may easily be obtained by applying the binary input to an inverter. The inverter may be constructed as a common emitter amplifier since the common emitter amplifier provides an output, which is the 180O out of phase with the input. The complement of a binary number is obtained by taking each 1 in the number and making it a 0 and making each 0 in the number a 1. Therefore, the complement of 1011B is 0100B.
A digital system is one in which electronic information is represented by only two voltage levels or states. These logic levels are referred to as logic 0 or low and logic 1 or high. As a result, the binary system is a convenient method for representing digital logic levels.
The hexadecimal system is a weighted position number system that is radix 16. To indicate that the number is a hex number, an H usually follows the number. Each number in this system is the numerical value times 16 raised to a power based on position. The number 432H may be converted to decimal as follows:
432H = 4(162) + 3(161) + 2(160)
432H = 4(256) + 3(16) + 2(1) = 1074D
Since each position must represent decimal numbers from 0 through 15, hex numbers begin at 0 and use all the decimal numbers through 9. After 9, the letters A through F are used to denote hex numbers equivalent to the decimal values of 10 through 15.
It is very easy to convert between the binary and hexadecimal number systems. Each hexadecimal number is used to represent a group of four binary numbers. Since 1111 in binary is 15 in decimal, and 15 in decimal is F in hex, 1111 in binary is F in hexadecimal.
Computers deal with binary numbers that are 8 to 64-bits in length for integers, and 80-bits for floating point numbers. Since it is difficult for humans to deal with 64-bits of binary information, computers will accept an input in hex or decimal and will convert the number to binary or will accept numbers input in binary. As a result, the user may enter data as 2 to 8 hex digits or a decimal number, which is more convenient, or s/he may choose to enter data in the binary.
The Binary Coded Decimal or BCD is a number system that uses four binary numbers to represent decimal numbers. The conversion between BCD and decimal is the same as described above. A four-bit binary number can represent values up to 15 in decimal, but a BCD number will not represent a valid decimal number if a binary pattern greater than 1001 is present. The BCD number system is used when we wish to display digital data as a decimal number using a seven-segment display.
FIGURE 1 /
FIGURE 2
Note: Review the data sheets for the 74LS04 and 74LS47 for pinout.