×

汉字点阵显示与数字抢答器的VHDL程序设计(源代码分享)

消耗积分:0 | 格式:rar | 大小:0.1 MB | 2017-12-02

分享资料个

  汉字点阵显示VHDL源程序

  library ieee;

  use ieee.std_logic_1164.all;

  use ieee.std_logic_unsigned.all;

  use ieee.std_logic_arith.all;

  entity hzxs is

  port(clk1,clk2:in std_logic;

  rd:out std_logic;

  we: out std_logic;

  ledw:out std_logic_vector(2 downto 0);

  d:out std_logic_vector(0 downto 7));

  end hzxs;

  architecture hav of hzxs is

  signal count:std_logic_vector(0 to 2);

  signal a: std_logic_vector(3 downto 0);

  begin

  process(clk2)

  begin

  if clk2‘event and clk2=’1‘ then

  count《=count+1;

  end if;

  ledw《=count;

  a(2 downto 0)《=count;

  end process;

  process(clk1)

  begin

  if clk1’event and clk1=‘1’ then

  a(3)《=not a(3);

  end if;

  end process;

  process(a)

  begin

  case a is

  when“0000”=》d《=“10110100”;--数

  when“0001”=》d《=“11111111”;

  when“0010”=》d《=“01001010”;

  when“0011”=》d《=“11011010”;

  when“0100”=》d《=“11110110”;

  when“0101”=》d《=“11100110”;

  when“0110”=》d《=“01110110”;

  when“0111”=》d《=“11011011”;

  when“1000”=》d《=“00010000”;--字

  when“1001”=》d《=“11111111”;

  when“1010”=》d《=“11111101”;

  when“1011”=》d《=“00001100”;

  when“1100”=》d《=“11111111”;

  when“1101”=》d《=“00010000”;

  when“1110”=》d《=“00010000”;

  when“1111”=》d《=“00001100”;

  when others=》d《=“00000000”;

  end case;

  end process;

  rd《=‘1’;

  we《=‘0’;

  end hav;

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

评论(0)
发评论

下载排行榜

全部0条评论

快来发表一下你的评论吧 !