PWM Control (For Stepper)

I presume you're using a PWM output as the step-input to an offboard stepper controller? In that case, you can use tone() instead of analogWrite(), because it will set the frequency instead of the duty cycle. It's only good for one stepper though because you can't produce different tones on different outputs with the arduino base library, and it's difficult/impossible to keep track of the exact number of steps produced using this means.

If you want careful control of step speed, you probably want to use Timer1 and its attachInterrupt()/setPeriod() functions, and do your stepping events in the interrupt handler. That will give you microsecond-accurate arbitrary stepping. If it doesn't support calls to setPeriod inside the interrupt, you will need to write your own timer1 handling code but that's not particularly difficult if you read the mega328 datasheet.