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

📄 tlc5510.vhd

📁 CPLD下的A/D转换器TCL5510驱动源码
💻 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 + -