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

📄 count60.vhd

📁 自动售货机 带选择商品,找零,退币,无货提示,单价显示,选择数量等空能
💻 VHD
字号:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_arith.all;
entity count60 is
  port(  cp:in std_logic;
        en3:in std_logic;
       times:out integer range 0 to 59;
       full:out std_logic
       );
end count60;
 architecture c60 of count60 is
  signal time:integer range 0 to 59;
   begin 
    process(cp,en3)
     begin
      if(en3='0')then time<=0;full<='0'; 
       elsif rising_edge(cp) then 
        if 
           time=59 then time<=0;
           full<='1';
        else 
           time<=time+1;
           full<='0';
       end if;
      end if;
     end process;
     times<=time;
end;

⌨️ 快捷键说明

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