pin.vhd
来自「大屏幕led点阵显示的驱动时序。 使用vhdl语言描述。其中rom文件可以使用l」· VHDL 代码 · 共 25 行
VHD
25 行
--分频程序
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity pin is
port(f1m:in std_logic;
f800:out std_logic);
end pin;
architecture behave of pin is
signal Count : integer range 0 to 999;
begin
DivideCLK :
process(f1m)--对1M的信号1000分频 1KHz
begin
if (f1m'event and f1m = '1')then
if Count<499 then f800<='0';Count<=Count+1;
elsif Count<999 then f800<= '1';Count <= Count+1;
elsif Count>=999 then f800<='0';Count<=0;
end if;
end if;
end process;
end behave;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?