I need to generate PWM signals with adjustable number and frequency to drive a step motor. I expect the frequency ranges from 50Hz to 200KHz and the pulses count ranges from 1 to 2k. I have tried 3 different ways including: using timer interrupt to c...