I have done this by calling a table, containing the correct sequence of 1's / 0's
the table is then transfered to the output port of the pic.
for direction change, add or subtract from the table pointer
I also used one of the ports to drop the holding current after a short time, to stop over shoot but keep the average current level low... and the motor cool.
I use another port to spike the motor, to increase the speed & torque.
for testing the code, I used LEDs on a bread board.
I hope this helps you out.