用VHDL语言设计一个共阴极七段数码管的译码电路,急求大神解答,高分求助!!!不要粘贴复制的

 我来答
nereus78e904
推荐于2017-09-24 · TA获得超过1.5万个赞
知道大有可为答主
回答量:5463
采纳率:90%
帮助的人:1932万
展开全部
74LS49是一个7段译码器,其VHDL描述如下:
LIBRARYIEEE;
USE IEEE.Std_logic_1164.ALL;
ENTITYls49 IS
PORT(bl: IN Std_logic;
bi: IN Std_logic_vector(3 DOWNTO 0);
a,b,c,d,e,f,g: OUT Std_logic);
ENDls49;
ARCHITECTURE behavl_49 OF ls49 IS
SIGNAL s: Std_logic_vector(6 DOWNTO 0);
BEGIN
PROCESS (bi,bl)
BEGIN
IF (bl/='1') AND (bl/='H') THEN
s<=(OTHERS => '0');
ELSE
CASE bi IS
WHEN "0000"=>s<="0111111";
WHEN "0001"=>s<="0000110";
WHEN "0010"=>s<="1011011";
WHEN "0011"=>s<="1001111";
WHEN "0100"=>s<="1100110";
WHEN "0101"=>s<="1101101";
WHEN "0110"=>s<="1111101";
WHEN "0111"=>s<="0100111";
WHEN "1000"=>s<="1111111";
WHEN "1001"=>s<="1101111";
WHEN "1010"=>s<="1110111";
WHEN "1011"=>s<="1111100";
WHEN "1100"=>s<="0111001";
WHEN "1101"=>s<="1011110";
WHEN "1110"=>s<="1111001";
WHEN "1111"=>s<="1110001";
WHEN OTHERS=>s<="0000000";
END CASE;
END IF;
END PROCESS;
a <= s(0);
b <= s(1);
c <= s(2);
d <= s(3);
e <= s(4);
f <= s(5);
g <= s(6);
END behavl49;
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式