16-03-07

VHDL code for 7segment display

For some of your FPGA projects it can be usefull to get an 7-segment display driver circuit. There is no 7-segment LCD on my ACTEL fpga boards but I am sure you guys know how to work around this topic with your hands ;-)

 

 

VHDL code listing:

 

LIBRARY ieee;USE ieee.std_logic_1164.all;
ENTITY seg7 ISPORT (
D       : IN  STD_LOGIC_VECTOR (3 DOWNTO 0);  -- BCD input      
S       : OUT STD_LOGIC_VECTOR (6 DOWNTO 0)); -- 7 segment outputsEND seg7;
ARCHITECTURE display OF SEG7 ISBEGINs <=  	"1000000" WHEN d = "0000" ELSE       
      	"1111001" WHEN d = "0001" ELSE       
	"0100100" WHEN d = "0010" ELSE       
	"0110000" WHEN d = "0011" ELSE       
	"0011001" WHEN d = "0100" ELSE       
	"0010010" WHEN d = "0101" ELSE       
	"0000010" WHEN d = "0110" ELSE       
	"1111000" WHEN d = "0111" ELSE       
	"0000000" WHEN d = "1000" ELSE       
	"0010000" WHEN d = "1001" ELSE       
	"0001000" WHEN d = "1010" ELSE       
	"0000011" WHEN d = "1011" ELSE       
	"1000110" WHEN d = "1100" ELSE       
	"0100001" WHEN d = "1101" ELSE       	
	"0000110" WHEN d = "1110" ELSE       
	"0001110";                     
END display;

13:05 Gepost door Mobile blogger in Algemeen | Permalink | Commentaren (2) | Tags: fpga, vhdl, actel, 7-segment |  Facebook |

Commentaren

hello all

Gepost door: haliun | 27-04-09

seven segment display send me code and waveform

Gepost door: balaji | 14-04-10

De commentaren zijn gesloten.