- 7
- 0
- 约3.95千字
- 约 3页
- 2019-07-03 发布于广东
- 举报
步进电机控制系统VHDL语言程序-----仿真
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; --系统复位信号
dir: in STD_LOGIC; --方向控制信号
clk: in STD_LOGIC; --系统时钟信号
ini: in STD_LOGIC; --初始化使能信号
manner: in STD_LOGIC_VECTOR (1 downto 0); --激磁方式的选择开关
angle: in INTEGER range 255 downto 0; --步进角的倍数设定输入
baBA: out STD_LOGIC_VECTOR (3 downto 0)); --步进电机状态输出
end step_motor;
architecture stepmotor_arch of step_motor is
signal count: INTEGER range 0 to 7; --计数器
signal cntInc: INTEGER range -
原创力文档

文档评论(0)