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

📄 clock.vhd

📁 FPGA对TLC0831的控制程序
💻 VHD
字号:
-- 名称:TLC0831时钟信号 v1.0
-- 功能:由系统时钟经分频得到TLC的时钟频率,下降沿输出数据
--       系统时钟为50MHz,经200分频得到250kHz的时钟信号
-- 日期:2008.12.4
-- 修改笔记:

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;

entity div is 
port (clk:in std_logic;							--clock of the systerm
	  divout:out std_logic);					--clock of the ADC7676
end;
architecture one of div is 
signal cnt:std_logic_vector(7 downto 0);		--counter
signal clk_temp:std_logic;					--temp of the clkout
constant m:integer:=100;						--fenpin xishu
begin 
process (clk)
begin 
if clk'event and clk='0' then 					--check trailing edge
	if cnt=m then 
		clk_temp<=not clk_temp;
		cnt<="00000000";
	else 
		cnt<=cnt+1;
	end if;
end if;
end process;
divout<=clk_temp;
end;

⌨️ 快捷键说明

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