Programming for Bipolar Stepper Motor
►C Programming
►Assembly Programming
Now you're ready to use stepper motors.
►C Programming
CODE:
void main(){
while(1){
stepper = 0x08;
delay();
stepper = 0x02;
delay();
stepper = 0x04;
delay();
stepper = 0x01;
delay();
}
}
while(1){
stepper = 0x08;
delay();
stepper = 0x02;
delay();
stepper = 0x04;
delay();
stepper = 0x01;
delay();
}
}
►Assembly Programming
CODE:
main:
mov stepper, #08H
acall delay
mov stepper, #02H
acall delay
mov stepper, #04H
acall delay
mov stepper, #01H
acall delay
sjmp main
mov stepper, #08H
acall delay
mov stepper, #02H
acall delay
mov stepper, #04H
acall delay
mov stepper, #01H
acall delay
sjmp main
Now you're ready to use stepper motors.
No comments:
Post a Comment