Seven Segment Decoder VHDL code

How to write VHDL code for Seven Segment Decoder

Here we show how to write VHDL code for Seven Segment Decoder with VHDL language. We have shown how to write a decoder in VHDL in two different ways in the tutorials 2 to 4 Decoder VHDL code and VHDL code for 2 to 4 decoder. Now we show here an example application of decoder- Seven Segment decoder. A seven segment decoder is the hardware behind a seven segment display. A seven segment display looks like the following.

The decoder input is 12 different signals which are made up of 4 bits. They are decoded to 12 different output signals. With 24 we can actually have 16 different outputs but we will only use 12 of them.

The following VHDL code implements seven segment decoder for displaying digits from 0 to 9.


In the above code, the entity part has the input a and output z which is implemented using std_logic_vector signals. The architecture contains the actual logic of the decoder. It is implemented using with .. select statements. See What is Entity and Architecture in VHDL.

What do you think?

0 points
Upvote Downvote

Total votes: 0

Upvotes: 0

Upvotes percentage: 0.000000%

Downvotes: 0

Downvotes percentage: 0.000000%

Leave a Reply

Your email address will not be published. Required fields are marked *

IEEE 4 to 1 multiplexer symbol

4 to 1 Multiplexer VHDL code