Driving two stepper motors at the same time
I have a flatbed scanner/plotter with a stepper motor on each axis.
The motors drivers take care of high power and phase switching so that I only have to provide:
1. Direction CW or CCW.
2. Step pulse - and after all the electrical and mechanical factors, the maximum frequency I will ever need is about 1000 Hz.
I'm using a PIC18F8722 running at 40MHz and It's working OK - but only moving one motor at a time.
How do I write the code to move both motors at the same time? I need to do this to make diagonal moves.
I presume you work out the ratio of pulses - for example to move X100 and Y300 - you issue one X_Pulse followed by three Y_Pulses?
Has anyone done this or got some better ideas?
Regards Bill Legge