Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
dc motor verilog code for pwm
#1

Description

In this example to rotate DC motor clockwise/counter clockwise continuously the motor interface card. For that in Spartan3 FPGA lines (P77, P78) are configured for (Coil-A to Coil-B). FPGA Lines (P79) to enable the dc motor. User could verify the result by Stepper/DC motor Card connected to the FPGASP3 KIT at connector J6.

library IEE;
use IEE.STD_LOGIC_1164.ALL;
use IEE.STD_LOGIC_ARITH.ALL;
use IEE.STD_LOGIC_UNSIGNED.ALL;

entity first is

port ( clk : in std_logic;

rst : in std_logic;


enable : out std_logic;

output1 : out std_logic;

output2 : out std_logic);


end first;

architecture Behavioral of first is

begin

process(rst,clk)

variable i : integer := 0;

begin

if rst = '1' then

if clk'event and clk = '1' then

enable <= '1';

if i <= 1005000 then

i := i + 1;

output1 <= '0';

output2 <= '0';

elsif i > 1005000 and i < 1550000 then

i := i + 1;

output1 <= '1';

output2 <= '0';

elsif i = 1550000 then

i := 0;

end if;


end if;

end if;

end process;

end Behavioral;
Reply

#2

Hi am vijay i would like to get details on dc motor verilog code for pwm.My friend Justin said dc motor verilog code for pwm will be available here and now i am living at hyderabad and i last studied in the college/school jntuk and now am doing project i need help on dc motor control by pwm using verolog code etc
Reply



[-]
Quick Reply

Forum Jump:


Users browsing this thread:
1 Guest(s)

Powered By MyBB, © 2002-2024 iAndrew & Melroy van den Berg.