📄 tlc5510.vhd
字号:
--本模块为A/D转换器驱动模块,可根据具体需要调节时钟频率
--创建者:黄生专
--完成日期:2006.12.01
library ieee;
use ieee.std_logic_1164.all;
entity tlc5510 is
port(clk:in std_logic; --系统时钟
oe:out std_logic; --TLC5510的输出使能
clk1:out std_logic; --TLC5510的转换时钟
din:in std_logic_vector(7 downto 0); --来自TLC5510的采样数据
dout:out std_logic_vector(7 downto 0)); --FPGA的输出数据
end tlc5510;
architecture behav of tlc5510 is
signal q:integer range 3 to 0;
begin
process(clk) --此进程中,把CLK进行四分频,得到TLC5510的转换时钟
begin
if clk'event and clk='1' then
if q=3 then q<=0;
else q<=q+1;
end if;
if q>=2 then clk1<='1'; --对系统进行四分频
else clk1<='0';
end if;
end if;
end process;
oe<='0'; --输出使能赋低电平
dout<=din;
end behav;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -