Driver for stepper motors with acceleration and position control