The easiest way is with interrupts and two timers. Set up one timer to control x, and the other for y. You calculate the timer preset values based on the delay between pulses.

With an 18F you can even do it with low and high priority interrupts... you just use the low priority on the axis that will be going the slowest. If you won't know, then pick any one for low priority, or use one high priority interrupt with a test to see which timer rolled over.