ECEN 1400 - Introduction to Digital and Analog Electronics

Peter Mathys, Spring 2014


Lab 7: 7-Segment Display and Decoder

Quick Links


Goals of this Lab


This lab is a group activity. The current group assignments are given here. One lab report per group needs to be turned in on D2L. The responsibilites for the successful completion of the lab consist of three parts: The prelab, the actual lab measurements, and the writing of the report. The report will be graded according to three criteria: Correctness, completion, and clarity. On the cover page you must clearly state the student ID (SID) of the group member who had the main responsibility for the prelab, the SID of the group member who had the main responsibility for the lab measurements, and the SID of the group member who had the main responsibility for the report writing. Do not put your names on the report, only the student IDs so that there is some degree of anonymity for peer grading. Note that all group members need to be knowledgeable about all three parts, but each member has a specific role in the group. The responsibilities must be rotated for different labs so that each group member experiences all three roles.

Prelab

An important component of the interface between humans and digital systems is the display of numeric (and alpha-numeric) information. A popular and relatively cheap numeric display device is the 7-segment display

Seven Segment Display

that uses three horizontal and four vertical bars to form the decimal digits from 0 to 9. Since numbers are stored in the form of strings of bits in digital systems, a decoder is needed to convert binary numbers to readable 7-segment patterns. The decoder may incorporate additional features such as blanking of leading zeros, lamp test, and a provision for brightness control.

P1. Properties of the 7-Segment Display. The 74LS47 decoder circuit that we will use is designed to drive common anode 7-segment displays. The means that all positive ends (anodes) of the LED diodes are connected together to the positive end of a power supply and the negative ends (cathodes) of the LEDs are selectively pulled down to ground (through a resistor to limit the current) to light up the corresponding segment. Check the data sheet for the LDS-A414RI to check the labeling of the segments, the pin assignment for each segment and the maximum continuous forward current per segment. Can you spot the error in the data sheet?

In Multisim we will use the following component for animated simulations (i.e., simulations where the segments actually turn on and off depending on the signals applied to the component pins).

Seven Segment Display SEVEN_SEG_DECIMAL_COM_A in Multisim

However, if you place this component on a schematic, select its "Properties", click on the "Display" tab, uncheck "Use schematic global setting" and then check "Show footprint pin names" as shown below

Display Labels Settings for Seven Segment Component in Multisim

then you will find that the pin assignments for the individual segments are not compatible with the LDS-A414RI 7-segment display component that we are using. The pin assignments for the SEVEN_SEG_DECIMAL_COM_A are shown in the schematic below.

Seven Segment Component in Multisim with footprint pin names displayed

Thus, we have to create our own 7-segment display component as explained in Create LDS-A414RI. Unfortunately, National Instruments does not allow the creation of animated custom components so the 7-segment display component that you generate will have the correct footprint and will simulate correctly, but it will not show which segments are on or off depending on the applied signals. However, if you create the custom component according to the instructions in Create LDS-A414RI then you can change between the animated version and the version with the correct footprint using the "Replace Components..." command.

Replace Components command in Multisim

Generate the LDS-A414RI 7-segment display component (Create LDS-A414RI) and start a new design in Multisim as shown next.

Replace Components command in Multisim

Determine the forward voltage across and the current through the LED for segment A for resistor (R1) values of 100, 120, 150, 180, 220, 270, and 330 ohms. For which resistor value is the current closest to 20 mA? Are all of these resistors safe to use (with a 5 V power supply) or is the current for some of these exceeding the maximum rating of the LDS-A414RI? If so, which?

P2. Characterization of the BCD to 7-Segment Decoder. Look at the 74LS47 datasheet to find out what exactly the 74LS47 BCD to 7-segment decoder is supposed to do. There is a truth table on page 3 of the datasheet that specifies the operation of the decoder. Note that there are 4 binary data inputs (A,B,C,D) and three control inputs (LT',RBI' and BI'/RBO'). To test the 74LS47, build the following schematic in Multisim. Note that this schematic uses the animated 7-segment display part.

Schematic for testing the 74LS47 component in Multisim

Start testing with leaving switches F,G, and H open initially. Check that you can obtain the numbers 0...9 by operating the A,B,C,D switches (switch E controls the decimal point of the 7-segment display directly without going through the 74LS47 decoder). Then check the function of the F,G, and H switches and compare the results to the truth table in the 74LS47 datasheet. You should find that the 74LS47 model provided in Multisim does not operate correctly. Describe which feature(s) is/are not operating correctly.

Download this Multisim schematic 74LS47_1.ms11 and open it in Multisim. Save the 74LS47_1 component, which implements the correct function of the 74LS47, to the User Database. Then replace the original 74LS47 in the schematic above by the new 74LS47_1 as shown below.

Schematic for testing the corrected 74LS47_1 component in Multisim

Now test the operation of the 74LS47 again and compare it again to the 74LS47 datasheet. In your report describe what the RBI'/RBO' signals are supposed to achieve and how this would be applicable for the design of a digital clock.

P3. Pulse Width Modulation with the 555 Timer. Look at the LM555 datasheet and implement the following circuit in Multisim.

Schematic for the 555 time pulse width control circuit

Observe and characterize the waveforms at the output (pin 3) of the 555 timer circuit and at the upper end of the capacitor (C1) as you change the potentiometer (R2) from about 5% to about 95%. Measure the frequency of the waveform and the average voltage at pin 3 of the 555 timer for several different settings of the potentiometer. If pin 3 of the 555 timer is connected to the BI' input (pin 4) of the 74LS47 in the circuit in problem P2, what do you expect to happen to the 7-segment display? Explain!


Lab Experiments

E1. Properties of the 7-Segment Display. On your breadboard, test the different segments of the LDS-A414RI 7-segment display using a 5 V power supply and a resistor to limit the current. Check how much current flows through a segment if you use 120, 150, or 180 ohm resistors and compare to the results you obtained in problem P1.

E2. Characterization of the BCD to 7-Segment Decoder. Build the circuit shown in the following schematic.

Schematic for building 7 segment display with the 74LS47 decoder

Use the breadboard for the switches, but build the rest of the circuit on a universal printed circuit board similar to the one shown below (click on the image to enlarge) so that you can use the circuit in future labs as display board.

LDS-A414RI display and 74LS47 decoder board wired

The image below (click to enlarge) shows how to place the sockets on the printed circuit prototype board.

Printed circuit prototype board populated with sockets

Note that there are two different types of sockets. The one on the left in the image below with machined pins works well for the 150 ohm series resistors and the one on the right with the dual-leaf contacts works well for 74LS47 decoder IC and the 7-segment display.

Different types of sockets

Test the correct function of your circuit using the 8-position DIP switch from your lab kit on the breadboard. Compare the operation of your circuit to the truth table in the 74LS47 datasheet.

E3. Pulse Width Modulation with the 555 Timer. Build the circuit shown below either on your breadboard or on the printed circuit board.

Schematic for the 555 time pulse width control circuit

Connect the output (pin 3) of the 555 timer to the BI' input (pin 4) of the 74LS47 decoder. Vary the potentiometer and describe the effect on the display that you see. Measure the frequency and the average voltage at pin 3 of the 555 timer and also look at the voltage across capacitor C1. Compare to the values you obtained from the simulation in problem P3.

Here is a picture of the display board with the LM555 timer added (click on image to enlarge).

LDS-A414RI display, 74LS47 decoder, and LM555 board wired