Here's a simple algorithm that uses conventional microcontroller blocks to control commercially available H-bridges to properly commutate a bipolar stepper motor through a microstepping profile.
Bipolar stepper motors are used in many applications, from driving paper through a printer to moving an XY stage in industrial equipment. Typically, the motors are driven and controlled by inexpensive ...