Forum Discussion
Altera_Forum
Honored Contributor
7 years ago --- Quote Start --- If you are only supposed to generate a pwm signal for open loop drive control, it's an easy task with fpga. You basically need a counter+comparator and possibly some extra logic for setting the pwm level. Whiile if you want a complete closed loop controller, your system must provide some sort of feedback signals in order to adjust the pwm level in real-time. --- Quote End --- I have some different opinion about this. If the stepper motor controler is supposed with PWM,the stepper motor's speed is relation with the pwm's frequency.That is to say,if I want to get the variable stepper motor speed,I should get variable frequency of pwm. If the input frequency of FPGA is 50MHz,using the counter++,may get those frequency,like 25MHz,12.5MHz,6.25Mhz,....and so on. But,there is some frequency can no be reached,like 20MHz,or 999999Hz. I do not kown how to deel with this. Do you have any opinion about those?