programming servo motor using pic16f84 - asm

Thread Starter

sharkfire

Joined Feb 13, 2008
23
I have a servo motor, rotating 360 degrees. It's function is for turning the wheels left and right. Now, what I want, if the wheels turn extreme left ( the farthest that the wheel can reach) the motor should stop rotating. Same goes with the right direction. It's like, the motor should only rotate for 180 degres. That's -90 for left and +90 for right.

To rotate the motor, I have 3 receivers: L(left), C (Center) and R(RIght).

If the C receiver is detected, the system should check which receiver will go high next. Example, the L Receiver. The motor should rotate, at least 90 degrees to the left (the wheels will also turn left). After that, the motor should stop rotating, even the L Receiver is still high. Then If the C receiver becomes active, the motor will turn right, and will go back in place (the wheels are facing the center). Same goes with the right.

What should I do with the program? I'm using PIC16f84, and Assembly language programming. I have little idea with delays and timers. Hope you can help..
 
Top