You’re on the right track, if you really want to spin a motor with a micro.
The Step and Dir signals usually come from a PC parallel port, so a duration of say 2 to 5 micro seconds should work on most controllers (for a minimum). To make it more universal, I would recommend that you send out Dir first (as you mentioned), followed by Step. Think of Dir as a control signal and Step as a pulse. You only need to output Dir when you want to change directions.