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

📄 setp_motor.vhd

📁 VHDL源代码下载
💻 VHD
字号:
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
use IEEE.std_logic_unsigned.all;

entity step_motor is
port (reset:in STD_LOGIC; --system reset signal
      dir: in STD_LOGIC; --direction
      clk: in STD_LOGIC; --system clock signal
      ini: in STD_LOGIC; --enable switch of loading initial 
      manner: in STD_LOGIC_VECTOR (1 downto 0); --phase excite manner
      angle: in INTEGER range 255 downto 0; --phase define
      baBA: out STD_LOGIC_VECTOR (3 downto 0)); --state output of setp motor
end step_motor;

--define the signal_structure and flow of the device
architecture stepmotor_arch of step_motor is
signal count: INTEGER range 0 to 7; --counter 
signal cntInc: INTEGER range -2 to 2; --count increment
signal cntIni: INTEGER range -1 to 0; --count increment initial
signal angleDnCount: INTEGER range 255 downto 0;  --count how many step-angles processed
signal angleDnCntDec: INTEGER range 2 downto 1;  --angleCount decrement
begin
  -- <<enter your statements here>>

  process(dir, manner, angle)--, ini)
  begin
      --if ini='1' then
      if dir='0' then	
          case manner is
              when "01" => -- 1-

⌨️ 快捷键说明

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