ECET230_ilab procedure
OBJECTIVES
1. To learn about the operation of a BCD-to-seven-segment decoder.
2. To learn about the operation of a seven-segment display.
3. To learn about the operation of multiplexers.
4. To build and test a circuit using a multiplexed display and eSOC III board.
5. To use advanced VHDL design techniques.
PARTS LIST
Equipment:
IBM PC or Compatible with Windows 2000 or Higher
DC Power Supply
Oscilloscope
Parts:
1 – 74LS47 BCD-to-Seven-Segment Decoder Integrated Circuit
1 – 74LS157 Quad 2-to-1 Multiplexer Integrated Circuit
3 – Sets of Four SPDT Switch, DIP Configuration
1 – KB 72 Seven Segment Display (Common Anode)
7 – 330Ω Resistors, 5%
1 – Breadboard and hookup wire 1 – eSOC III Board
Software:
Multisim Version 11 or higher
Quartus II Design Software – Version 9.1
INTRODUCTION
The purpose of this lab is to give practical experience in using decoders and multiplexers. The discrete components circuit in this lab utilize three primary components, the 74LS47 BCD-to-seven-segment decoder, the 74LS157 2-to-1 multiplexer, and a seven segment display. The VHDL version utilizes the eSOC III board.
( 74LS1 57 )The 74LS47 is designed to produce an active-LOW output. This allows the device to provide more output current than a similar active-HIGH device.
Table 2.1 is the truth table for the 74LS157.
|
Inputs |
Outputs |
||
|
Chip Select, G |
Data Select, A/B |
A B |
|
|
H |
X |
X X |
L |
|
L |
L |
L X |
L |
|
L |
L |
H X |
H |
|
L |
H |
X L |
L |
|
L |
H |
X H |
H |
Table 2.1 – 74LS157 Truth Table (from focus.ti.com)
The chip select can be thought of as an on-off switch for the circuit. When this signal is HIGH, the chip ignores all other inputs and outputs logic LOW signals. Chip selects are useful in combining several chips, cascading, to perform various logic functions. multiplexer as shown in your textbook.
A seven-segment display is an array of seven bar-LEDs arranged to represent the decimal digits 0 to 9. To represent a digit, various segments (LEDs) are turned ON and OFF. The layout of the seven-segment display used in this lab is shown in Figure 2.1. Note that on some chip, the pins with No Connect do not exist.
Any of the digits 0 => 9 can be displayed using the seven segments (actually a small eighth segment is there for a decimal point). To display a “0”, we would turn OFF segment g and turn ON all the others. To display a “1”, b and c = ON and the rest OFF and so on.
Figure 2.1 – Common Anode Seven-Segment Display
This display is called a common anode type since the anodes (the positive sides, as opposed to the negative sides, which are call the cathodes) of the LEDs are connected together (pins 3, 9, 14) and tied to +5 volts. This means that a segment is turned on with a Logic 0 and turned off with a Logic 1. The common anode display is used more often than the common cathode because most logic devices can sink more current (Logic 0 output) than they can source (Logic 1 output). Note that the part in your kit will not have 14 pins since those connection marked “No Connect (NC)” have no physical pins.
PROCEDURE
A. Discrete Circuit Design
1. Using Multisim, create the schematic for the circuit shown in Figure 2.2. The schematic must be drawn before building the circuit.
Figure 2.2 – Multiplexer/Decoder Circuit (for Simulation)
2. Run various simulations to verify that the multiplexer is properly selecting the correct data inputs.
3. Build the circuit shown in Figure 2.3. The difference from the circuit in Figure 2.2 is that 330Ω resistors have been added between the decoder and the 7-segment display. Remember to wire the power and ground pins on the ICs.
Figure 2.3 – Multiplexer Circuit (for Discrete Hardware)
4. Set the upper set of switches (4A – 1A) to a value of 0101 and the lower set (4B – 1B) to 1001. Set the Data Select switch to a logic LOW. What number does the display show? Display = _________
5. Change the Data Select switch to a logic HIGH. Record the output. Display = __________
6. Photograph your final circuit for submission (online) or demonstrate your circuit to your professor (onsite or blended).
Instructor Sign-off ____________________
B. Design Project
1. Develop the VHDL code to create the multiplexer-decoder circuit shown in Figures 2.2 and 2.3 for the eSOC III board, download the code and submit the code and simulation to your instructor. Note that for the eSOC III board the resistors are not required and the seven-segment display must be driven by active-HIGH signals as shown in Figure 2.4.
( Binary-to- 7-Segment Decoder ) ( Q uad 2-to-1 Mux )
Figure 2.4 – Multiplexer Circuit (eSOC Version)
To simplify the design, treat the circuit as a system rather than individual components
As a system, the characteristics are:
If A is LOW, then the output depends on the state of switches 0 to 3
If 3,2,1,0 = “0000” then the output display = 0 = “1111110”
If 3,2,1,0 = “0001” then the output display = 1 = “0110000”
And so on
If A is HIGH, then the output depends on the state of switches 4 to 7
2. Photograph your final circuit for submission (online) or demonstrate your circuit to your professor (onsite or blended).
Instructor Sign-off ____________________
Course Number: ECET-230 Laboratory Number: 2 Page 7 of 7
/B
A
G
1
2
3
4
5
6
7
14
13
8
9
11
12
10
a
g
d
b
c
e
f
Seven
-
Segment
Display
Pin 1 = Segment a
Pin 2 = Segment f
Pin 3 = Common Anode = +5V
Pin 9 = Common Anode = +5V
Pin 14= Comm
on Anode = +5V
Pin 4 = No Connect (NC)
Pin 5 = No Connect (NC)
Pin 12= No Connect (NC)
Pin 6 = Segment DP
Pin 7 = Segment e
Pin 8 = Segment d
Pin 10 = Segment c
Pin 11 = Segment g
Pin 13 = Segment b
1
2
3
4
5
6
7
14
13
8
9
11
12
10
a
g
d
b
c
e
f
Seven-Segment Display
Pin 1 = Segment a
Pin 2 = Segment f
Pin 3 = Common Anode = +5V
Pin 9 = Common Anode = +5V
Pin 14= Common Anode = +5V
Pin 4 = No Connect (NC)
Pin 5 = No Connect (NC)
Pin 12= No Connect (NC)
Pin 6 = Segment DP
Pin 7 = Segment e
Pin 8 = Segment d
Pin 10 = Segment c
Pin 11 = Segment g
Pin 13 = Segment b
ABCDEFG
CA
VCC
5V
Key = 0
Key = 1
Key = 2
Key = 3
VCC
5V
GND
74LS47N
A
7
B
1
C
2
D
6
OA
13
OD
10
OE
9
OF
15
OC
11
OB
12
OG
14
~LT
3
~RBI
5
~BI/RBO
4
VCC
5V
Key = 4
Key = 5
Key = 6
Key = 7
GND
U2
74LS157N
1Y
4
2Y
7
3Y
9
4Y
12
1A
2
1B
3
2A
5
2B
6
3A
11
3B
10
4A
14
4B
13
~A/B
1
~G
15
Key = S
ABCDEFG
CA
VCC
5V
Key = 0
Key = 1
Key = 2
Key = 3
VCC
5V
GND
74LS47N
A
7
B
1
C
2
D
6
OA
13
OD
10
OE
9
OF
15
OC
11
OB
12
OG
14
~LT
3
~RBI
5
~BI/RBO
4
VCC
5V
Key = 4
Key = 5
Key = 6
Key = 7
GND
330
U2
74LS157N
1Y
4
2Y
7
3Y
9
4Y
12
1A
2
1B
3
2A
5
2B
6
3A
11
3B
10
4A
14
4B
13
~A/B
1
~G
15
Key = S
RBI
and
,
RBO
/
BI
,
LT