Maker Pro
Maker Pro

[Need help] Stepper motor control

Hi all, i am learning to control stepper motor by using ULN2003a chip together with PIC 16f628a with a stepper motor.
But unfortunately it is not working. I am able to feel the motor is vibrating but the shaft is not rotating.

My code is as below:

void main()
{
CMCON = 0x07; // To turn off comparators
TRISB = 0; // PORT B as output port
PORTB = 0x0F;
do
{
PORTB = 0b00000011;
Delay_ms(500);
PORTB = 0b00000110;
Delay_ms(500);
PORTB = 0b00001100;
Delay_ms(500);
PORTB = 0b00001001;
Delay_ms(500);
}while(1);
}


The motor i that i am using
Mini-Stepper-Motor-5v-4-phase-5-wire-stepper-motor-gear-motor.jpg


The ULN2003a module
2720_p_1320673805227.jpg


Does anyone here can let me know what is wrong? Thanks
 
Top