------------------------------------------------------------------------------ -- Title : STEPPER_H -- Project : ROBOTIC ARM CONTROLLER ------------------------------------------------------------------------------- -- File : stepper_h.vhd -- Author : R.SATHISH KUMAR - -- Created : 25-4-2001 -- Last update : ------------------------------------------------------------------------------- -- Description: -- This vhdl module gives control signal to stepper motor for half step --mode -- It is a structural module contains counter_h,half_step as components ------------------------------------------------------------------------------- -----toplevel stepper_h library IEEE; use IEEE.std_logic_1164.all; use work.std_arith.all; entity stepper_h is port(CLK : in STD_LOGIC; DIR_SEL : in STD_LOGIC; STEP_SEL:in STD_LOGIC; STOP :in STD_LOGIC; DATA_OUT_H : out std_logic_vector(3 downto 0)); end stepper_h; architecture toplevel_h of stepper_h is component counter_h port(CLK : in STD_LOGIC; STEP_SEL:in STD_LOGIC; STOP :in STD_LOGIC; DOUT_H : buffer STD_LOGIC_VECTOR(2 downto 0)); end component; component half_step port(CLK : in STD_LOGIC; DIR_SEL : in STD_LOGIC; DIN_H: in STD_LOGIC_VECTOR(2 downto 0); Y_H : out STD_LOGIC_VECTOR(3 downto 0)); end component; signal dout_h:std_logic_vector(2 downto 0); signal y_h : std_logic_vector(3 downto 0); begin u_h1 : counter_h port map (CLK,STEP_SEL,STOP,DOUT_H); u_h2 : half_step port map (CLK,DIR_SEL,DOUT_H,Y_H); DATA_OUT_H <= Y_H; end toplevel_h;