⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cnt6.vhd

📁 数码管扫描显示控制器,同时显示0、1、2、3、4、5这6个不同的数字图形到6个数码管上。复位时所有数码管全灭。
💻 VHD
字号:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_arith.all;

entity cnt6 is
 port(
 clk0,btn20:in std_logic;
 cnt0:out std_logic_vector(3 downto 0));
 end cnt6;

 architecture cnt6_arch of cnt6 is
 signal count:integer range 0 to 6;
 begin

  process (clk0,btn20)
   begin 
   if(btn20='1')then count<=6;
     else if(clk0'event and clk0='1')then
        if(count=5) then count<=0;
           else count<=count+1;
           end if;
       end if;
    end if;
cnt0<=conv_std_logic_vector(count,4);
end process;
end cnt6_arch;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -