7段数码管显示驱动vhdl程序
时间:11-30
来源:互联网
点击:
再编辑一个7段数码管(共阴极)显示驱动程序:
Library ieee;
Use ieee.std_logic_1164.all;
Entity QDLED7 is
PORT(DATA:IN STD_LOGIC_VECTOR(3 DOWNTO 0);
a,b,c,d,e,f,g:out std_logic);
end QDLED7;
Architecture LED of QDLED7 is
signal y: STD_LOGIC_VECTOR(6 DOWNTO 0);
begin
process(DATA)
begin
case DATA is
when "0000"=>y<="1111110" ;
when "0001"=>y<="0110000" ;
when "0010"=>y<="1101101" ;
when "0011"=>y<="1111001" ;
when "0100"=>y<="0110011" ;
when "0101"=>y<="1011011" ;
when "0110"=>y<="1011111" ;
when "0111"=>y<="1110000" ;
when "1000"=>y<="1111111" ;
when "1001"=>y<="1111011" ;
when others=>null;
end case;
a<=y(6);b<=y(5);c<=y(4);
d<=y(3);e<=y(2);f<=y(1);g<=y(0);
end process;
end;
Library ieee;
Use ieee.std_logic_1164.all;
Entity QDLED7 is
PORT(DATA:IN STD_LOGIC_VECTOR(3 DOWNTO 0);
a,b,c,d,e,f,g:out std_logic);
end QDLED7;
Architecture LED of QDLED7 is
signal y: STD_LOGIC_VECTOR(6 DOWNTO 0);
begin
process(DATA)
begin
case DATA is
when "0000"=>y<="1111110" ;
when "0001"=>y<="0110000" ;
when "0010"=>y<="1101101" ;
when "0011"=>y<="1111001" ;
when "0100"=>y<="0110011" ;
when "0101"=>y<="1011011" ;
when "0110"=>y<="1011111" ;
when "0111"=>y<="1110000" ;
when "1000"=>y<="1111111" ;
when "1001"=>y<="1111011" ;
when others=>null;
end case;
a<=y(6);b<=y(5);c<=y(4);
d<=y(3);e<=y(2);f<=y(1);g<=y(0);
end process;
end;
7段数码管显示驱动vhdl程 相关文章:
- Windows CE 进程、线程和内存管理(11-09)
- RedHatLinux新手入门教程(5)(11-12)
- uClinux介绍(11-09)
- openwebmailV1.60安装教学(11-12)
- Linux嵌入式系统开发平台选型探讨(11-09)
- Windows CE 进程、线程和内存管理(二)(11-09)