I have a motion controller system that works on sending position updates every 20ms. It work great for servos, but the issue I have with steppers is the 50Hz is not synchronous to the stepper output as it is continuously varying and I believe that simply outputting a varying speed to a stepper out eventually lose pulses and hence loses position as you could not be sure that the pulse did or did not occur due to the natural variation in frequency and delay. E.G. If I said output 3.149 KHz for 20ms would I get 62 pulses or 63 on my next interrupt response. So unless I ALSO feed the pulses back into a counter and read the counter how do I not lose position? Any thoughts. I like the fast stepper library from Luni64 but I'm not sure if that would lend itself to this application.