Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

code of stepper motor for rotation

Status
Not open for further replies.

pratti

Member level 3
Joined
Jun 15, 2013
Messages
56
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
471
does the following code for stepper motor makes only single step clockwise rotation or 180 rotation and stop?i want to rotate at 1 degree in 1min.does the following code useful?



clock() //function for clockwise rotation

{
P2=0X11;
T0delay(56);
P2=0X22;
T0delay(56);
P2=0X44;
T0delay(56);
P2=0X88;
T0delay(56);
}
}
 

Correct wiring of phases to the driver assumed, repeating the shown cycle of four full steps will make the motor rotate at low speed (at least limited to start/stop frequency).

Advanced step motor control involves a bit more, e.g. accelerating and decelerating ramps. There's a huge amount of literature on the internet, you won't really expect us to retell it.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top