CAMOSUN COLLEGE E161:E.10
Department of Electronics 2020/10 Rev 4
ECET 161 Lab Exercise
Exercise 10
Decoder design in VHDL
Reference: Digital Design Chapter 5 and 6
Lab preparation required: Design a HEX to 7 segment decoder.
Fill in the table on page 2 of this lab.
Create a graphic symbol for this decoder for use in later labs.
Reference: Digital Design Chapter 5 and 6
Lab preparation required: Design a HEX to 7 segment decoder.
Fill in the table on page 2 of this lab.
Create a graphic symbol for this decoder for use in later labs.
REQUIRED:
• VHDL Design screen shot for a HEX to 7 segment decoder.
• Construct the circuit and test using the 4 wired dip switches.
•
• PROCEDURE:
•
Construct a HEX to 7 segment decoder. Verify the operation using the 4 wired dip switches. Build the circuit using the cyc1000 dev board and your proto board. Connect to digit 1 of the 4 digit display. Calculate the current that drives each of the segments using a 470-ohm resistor. Connect the common cathode to ground. Follow the pin plan in this lab. If you are consistent in your selection of the input and output pins you will reduce your rewiring. The data sheet for the LTC-4727 4 Digit 7-Segment Display is attached.
Use the above number representations. Note the change in how ‘6’ and ‘9’ are represented and the use of lower case letters for ‘b’ and ‘d’.
Use the above number representations. Note the change in how ‘6’ and ‘9’ are represented and the use of lower case letters for ‘b’ and ‘d’.
Design Steps
• Use the character representation on the previous page.
• The 7-segment display in your kit is common cathode. This pin should be connected to ground while all other segments require a separate series current limiting resistor. Use 10 mA as a forward current for each segment to calculate an appropriate resistor value.
• Use the first digit (LSD) of your display and the 4 on board switches.
• In your VHDL file you will define the 4 inputs as B0, B1, B2, B3 and the 7 outputs as a, b, c, d, e, f, g for each segment.
• Use the BIT_VECTOR definition for the array of inputs and outputs.
• Use the concatenate operator ‘&’ to link the input variables together. This creates a 4 bit input variable from the separate inputs.
• Create a graphic symbol for your circuit for use in later labs.
• Fill in the following table to help you define the correct output combinations:
Digit
B3
B2
B1
B0
a
b
c
d
e
f
g
0
0
0
0
0
1
0
0
0
1
2
0
0
1
0
3
0
0
1
1
4
0
1
0
0
5
0
1
0
1
6
0
1
1
0
7
0
1
1
1
8
1
0
0
0
9
1
0
0
1
A
1
0
1
0
b
1
0
1
1
C
1
1
0
0
d
1
1
0
1
E
1
1
1
0
F
1
1
1
1
Pin Plan for this Lab:
VHDL Design screen shot for a HEX to 7 segment decoder: