Hi, I wrote an assembly code for servo motor.
I found that the delay will set the maximum angle of the motor.
I'm trying to make it rotate 90 degree clockwise, hold it there for a few seconds and then rotate 90 degree anti-clockwise back to its original spot.
In the assembly code, I managed to write two delay loops which can make it rotate 90 degree clockwise and anticlockwise but it only runs the first loop (as in the one on top) and ignore the bottom one. Is there any way for it to run the whole thing? If it isn't troublesome can someone pinpoint the mistake I made? Thank you.
I found that the delay will set the maximum angle of the motor.
I'm trying to make it rotate 90 degree clockwise, hold it there for a few seconds and then rotate 90 degree anti-clockwise back to its original spot.
In the assembly code, I managed to write two delay loops which can make it rotate 90 degree clockwise and anticlockwise but it only runs the first loop (as in the one on top) and ignore the bottom one. Is there any way for it to run the whole thing? If it isn't troublesome can someone pinpoint the mistake I made? Thank you.
Attachments
-
404 bytes Views: 244