BCD to Seven-Segment Decoder

You are likely familiar - very familiar - with the idea of a seven-segment indicator for representing decimal numbers. Each segment of a seven-segment display is a small light-emitting diode (LED) or liquid-crystal display (LCD), and - as is shown below - a decimal number is indicated by lighting a particular combination of the LED's or LCD's elements:

Bindary-coded-decimal (BCD) is a common way of encoding decimal numbers with 4 binary bits as shown below:

Decimal digit
0
1
2
3
4
BCD code
0000
0001
0010
0011
0100

Decimal digit
5
6
7
8
9
BCD code
0101
0110
0111
1000
1001

Your job for this lab is to design and test a circuit to convert a 4-bit BCD signal into a 7-bit control signal according to the following figure and table:

b3 b2 b1 b0
a b c d e f g
0 0 0 0
0 0 0 0 0 0 1
0 0 0 1
1 0 0 1 1 1 1
0 0 1 0
0 0 1 0 0 1 0
0 0 1 1
0 0 0 0 1 1 0
0 1 0 0
1 0 0 1 1 0 0
0 1 0 1
0 1 0 0 1 0 0
0 1 1 0
0 1 0 0 0 0 0
0 1 1 1
0 0 0 1 1 1 1
1 0 0 0
0 0 0 0 0 0 0
1 0 0 1
0 0 0 0 1 0 0

Notice that the truth-table corresponds to a seven-segment device whose display elements are active low. That is, each element will be active when its corresponding input is '0'.

Background Reading
Before beginning this laboratory, you should read the brief overview of BCD to seven-segment convertors that is found in Section 6.4 of the text Fundamentals of Digital Logic with VHDL Design. You will also benefit greatly from reviewing the digital-circuit synthesis techniques that you have been studying in Chapter 4. In particular, review the methods for minimization of sum-of-products forms found in Section 4.2.

Laboratory Assignment
For this introductory lab assignment, you will design a BCD to seven-segment code convertor. Use the minimal sum-of-products method to derive the logic for each decoder output (a, b, c, d, e, f, g). This work should be done before coming to the lab. Use this handy-dandy template for Karnaugh maps. Before you begin entering your schematic into the MAX+plusII CAD system, your instructor should initialize your Instructor Verification Sheet. You will need to include the initialized sheet with your lab report.

Enter the schematic for your circuit into the MAX+plusII CAD system, then simulate your circuit to verify that it works. Your waveform simulation should test all 10 binary number codes.

Hint: When entering a circuit schematic in sum-of-products or product-of-sums form, you may find it convenient to form a 'bus' of all inputs and their complements. For sum-of-products you would then have a layer of and-gates followed by a layer of or-gates. Likewise, for product-of-sums, you would have a layer of or-gates followed by a layer of and-gates. As an example, consider the 3-input, 2-output circuit with the following product-of-sums description:

a = (b1 + ~b2)(~b0 + ~b1 + b2)
b=(b0 + b1)(~b1 + b2)(~b0 + ~b2)

A convenient way to enter this schematic is shown below. Keep in mind that your design will be different in that you will likely implement a circuit in sum-of-products form.

Laboratory Report
Your laboratory report should illustrate your circuit design and document the testing you performed to verify its function. Your simulation should produce a waveform file similar to the one shown below.

Your completed report, including the initialized Instructor Verification Sheet, is due at the beginning of your next lab meeting.

Remember to save all files associated with this project. You will program a device and test this circuit in two weeks.


Copyright © 2000
Department of Electrical and Computer Engineering
Michigan Technological University
Last updated 2/15/01
Timothy J. Schulz