Professional Documents
Culture Documents
Servo
Servo
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity PWM_SERVO50 is
port (
clk : in std_logic;
PWM1: out std_logic;
reset: in std_logic);
end PWM_SERVO50;
begin
BEGIN
if rising_edge(clk)then
contador <= contador + 1;
end if;
ELSE
if (contador <= pos1 )then
PWM1 <= '1';
HN<=HP;
else
PWM1 <= '0';
HN<='0';
end if;
END IF;
BEGIN
HP<=HN;
END IF;
end Behavioral;
////////////////////////////////////////////////////
# PlanAhead Generated physical constraints