Forum Discussion
Altera_Forum
Honored Contributor
16 years agoHelp in verilog code...
I have given a task of writing a verilog code for moving the stepper motor for desired number of steps in either clock wise or CCW direction . i have written the following code but when i simulate it...
Altera_Forum
Honored Contributor
16 years agothanks alot sir ... bt what i want is to store the value of n_steps (which is the desired no of steps to be driven as user input) in a variable so that i can decrement it once the stepper motors performs a step ... so how do i store the value of input n_steps in a variable (integer) and decrement it as "i = i-4". I am not implementing it on real circuit but just simulate it and i think for simulation i can use initial block ...
waiting for your reply ...