Stepper driver with buildt-in clock?

Hi,

I am controlling two stepper motors with two pieces of the pololu high current stepper motor drivers.
Now i am getting into some troubles, because i also need to paint some graphics during the steppers are running. I use microstepping and there occur some time-critical effects. So my question is:

Do you kno a driver wirh built-in clock, so that my arduino mega2560 just has to give the start-, direction and end-signal? The speed should be either set directly on the driver (with a potentiometer?) or via an input signal from the Mega.

any ideas? Thanks a lot!

AccelStepper library?

My problem is that the small time (70 MICROseconds) between the steps interfere with the loop time of my sketch. I tried to stable the frequency with decreasing the step time with the measured microseconds of the loop duration. But i think I came to a hardware limit of the avr core. That's why I am looking for an external solution...

MarkT:
AccelStepper library?

If producing steps for the motor uses up too much CPU time so that other program activities can't work then a simple solution would be to use another Arduino to generate the steps under control of your Mega. As the Mega has 4 hardware serial ports it can easily send instructions to another Arduino.

Another thought is that you may be able to generate the pulses in the background using one or more of the Arduino hardware timers. The output of the timer could produce the steps and also trigger a short ISR to count the steps.

And of course it may well be possible to reorganize the rest of your code to fit in better with the requirement to produce steps. As you haven't posted your code it is impossible to know what scope there is for this.

...R