THE C CODE VALUES
Discussion in "Project Help" started by Narayani Feb 21, 2018.
Wed Feb 21 2018, 09:47 am
Hello,
Your tutorial really helped me understand stepper motor better. But I'm confused as to how you took the values 0x0c etc for stepper variable in the C code. how to derive these values?
Since I'm trying to use another microcontroller understanding and making a c code would help me a long way.
Please let me know.
Thanks!
Your tutorial really helped me understand stepper motor better. But I'm confused as to how you took the values 0x0c etc for stepper variable in the C code. how to derive these values?
Since I'm trying to use another microcontroller understanding and making a c code would help me a long way.
Please let me know.
Thanks!
Thu Feb 22 2018, 02:37 am
The code you refer to is to drive the circuit
shown in the accompanying diagram.
http://www.8051projects.net/wiki/Stepper_Motor_Tutorial
"Bipolar Stepper Motor connection"
Applying this bit pattern,to the L293D will turn the motor.
c 1100 ;shifting pattern
6 0110
3 0011
9 1001
The code will work on any micro,
just change it to drive 4 pins in the same order.
shown in the accompanying diagram.
http://www.8051projects.net/wiki/Stepper_Motor_Tutorial
"Bipolar Stepper Motor connection"
Applying this bit pattern,to the L293D will turn the motor.
c 1100 ;shifting pattern
6 0110
3 0011
9 1001
The code will work on any micro,
just change it to drive 4 pins in the same order.
Powered by e107 Forum System