I need some help with debugging a unipolar stepper motor I am using a PIC24 and a ULN2003A chip to drive the motor. It seems to have no problem moving forward, but only twitches when I attempt to go backward.
This is the half-step sequence I am using:
uint8 coil1Seq[8] = {1,1,1,0,0,0,0,0};
uint8 coil2Seq[8] = {0,0,0,0,1,1,1,0};
uint8 coil3Seq[8] = {1,0,0,0,0,0,1,1};
uint8 coil4Seq[8] = {0,0,1,1,1,0,0,0};
The logic I am using is to move a certain number of steps, a for loop increments through this array and assigns these values to the pins. To go backwards, it decrements from the last position it was in the array. Is this correct?
This is the half-step sequence I am using:
uint8 coil1Seq[8] = {1,1,1,0,0,0,0,0};
uint8 coil2Seq[8] = {0,0,0,0,1,1,1,0};
uint8 coil3Seq[8] = {1,0,0,0,0,0,1,1};
uint8 coil4Seq[8] = {0,0,1,1,1,0,0,0};
The logic I am using is to move a certain number of steps, a for loop increments through this array and assigns these values to the pins. To go backwards, it decrements from the last position it was in the array. Is this correct?