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

📄 changgel11.tdf

📁 步进电机8细分CPLD相序及外部DA输出 实际细分数可达64细分 使用Atmel maxplus2 V10.1软件
💻 TDF
字号:
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
use IEEE.std_logic_unsigned.all;

entity changedl is
    port (
          ADDR: in STD_LOGIC_VECTOR (5 downto 0);
          EN  : in std_logic;
          CLK  : in std_logic;
          DAT:  out STD_LOGIC_VECTOR (11 downto 0)
    );
end changedl;

architecture behave of changedl is
begin
  -- <<enter your statements here>>
  process(CLK)
  begin 
  -- if ( CLK'EVENT and CLK='1') then
    --   if EN='0' then   DAT<="000000000000";      
       if (ADDR="000000") then DAT<="000000111111";                  --1     
       elsif (ADDR="000001") then DAT<="000011111111";
       elsif (ADDR="000010") then DAT<="000110111111";
       elsif (ADDR="000011") then DAT<="001001111110";
       elsif (ADDR="000100") then DAT<="001100111110";
       elsif (ADDR="000101") then DAT<="001111111101";
       elsif (ADDR="000110") then DAT<="010010111100";
       elsif (ADDR="000111") then DAT<="010101111011";
       elsif (ADDR="001000") then DAT<="011000111010";
       elsif (ADDR="001001") then DAT<="011011111001";--10       
       
       elsif (ADDR="001010") then DAT<="011110111000";
       elsif (ADDR="001011") then DAT<="100000110110";
       elsif (ADDR="001100") then DAT<="100011110100";
       elsif (ADDR="001101") then DAT<="100110110011";
       elsif (ADDR="001110") then DAT<="101000110001";
       elsif (ADDR="001111") then DAT<="101010101111";
       elsif (ADDR="010000") then DAT<="101101101101";
       elsif (ADDR="010001") then DAT<="101111101010";
       elsif (ADDR="010010") then DAT<="110001101000"; 
       elsif (ADDR="010011") then DAT<="110011100110";--20       
       
       elsif (ADDR="010100") then DAT<="110100100011";
       elsif (ADDR="010101") then DAT<="110110100000";
       elsif (ADDR="010110") then DAT<="111000011110";
       elsif (ADDR="010111") then DAT<="111001011011";
       elsif (ADDR="011000") then DAT<="111010011000";
       elsif (ADDR="011001") then DAT<="111011010101";
       elsif (ADDR="011010") then DAT<="111100010010";
       elsif (ADDR="011011") then DAT<="111101001111";
       elsif (ADDR="011100") then DAT<="111110001100";
       elsif (ADDR="011101") then DAT<="111110001001";--30       
       
       elsif (ADDR="011110") then DAT<="111111000110";
       elsif (ADDR="011111") then DAT<="111111000011";
       elsif (ADDR="111111") then DAT<="111111000000"; 
       else       DAT<="000000111111";      
       end if;
     --END IF;
    end process; 
 end behave;

⌨️ 快捷键说明

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