The problem to your program is that
output_low(PIN_toMCxxCLK);
delay_ms(50);
You make your motor free running in 50ms
output_high(PIN_toMCxxCLK);
delay_ms(10);
Then you power it in 10ms
Thus, the torque of motors will be applied in just 1/6 of your period. It may cause the small torque, and if you give loop of these, the rotor may vibrate but it may not turn.
10 steps per second is enough strong, because frequently, they drive stepping motors at 100 steps per second to 400 steps per second. And it may upto 4000 steps per second as free running (no load).
R B Y W // motor wire connects to
L1, L2, L3, L4 // chip pins Lxxx.
---------------------- R B Y W
A | H L H L - - H L
B | L H H L H L - -
C | L H L H - - L H
D | H L L H L H - -
L1, L2, L3, L4
----------------------
A | H L H L
B | L H H L
C | L H L H
D | H L L H
As you get your 2 pairs of wires, the bipolar step motors need each pair be pwred.
RB is a pair (first pair)
YW is a pair (second pair) (as you tested)
at phase A, as you connect R to pin 1, B to pin 2, Y to pin 3, W to pin 4.
It's right. You did your hardware right. No problem.
Just rewrite you program as
Code:
output_low(PIN_toMCxxCLK);
delay_ms(30);
output_high(PIN_toMCxxCLK);
delay_ms(30);
Test it again.
But you didn't tell me how did you test with the steps I gave. You stopped at step 3, and measured the voltage, and it worked. So try with step 4 and 5 and 6. Then tell me again.
Step 4, keep the clk HIGH all the time, dont turn it off. Check the torque at your motor. If it's strong enough (you hard to turn it by hand), go to step 5.
Step 5, do the subroutines I rewrite above
Step 6, reduce the delaying time.[/quote]