# Servo Control Using 16F628A Pic

Status
Not open for further replies.

#### Sceadwian

##### Banned
What is the limit of the degree of servo movement you need from center then? The limits of the servo won't help you much if they're not within the movement range you need.

Last edited:

#### sparky72

##### Member
What is the limit of the degree of servo movement you need from center then? The limits of the servo won't help you much if they're not within the movement range you need.

The servo movement from stop to stop is a little better than 180 degrees

#### Sceadwian

##### Banned
I think we're having a little trouble with discussing the metrics involved... Hobby servo travel is measured from it's center position, not from end to end. Center is 1.5ms 1.0 and 2.0ms are the far ends of the signal reach in either direction and generally don't hit physical stops, I have a couple older servos for RC cars that were tweaked for old school electrical brakes that are asymmetrical. Your original post of 180 degrees clockwise and counter clockwise is 360 degrees total... What you're actually talking about is the stock hobby servo travel of 90 degrees from center each way.

That CAN be fixed by adjusting your code.

Last edited:

#### Jon Wilder

##### Active Member
OK...I'm having a hard time understanding what you're trying to do. I'm assuming that the starting point is "center" -

When you press and release the button once, the servo should rotate in one direction fully, then back to center.

When you press and release the button again, the servo should then rotate fully in the opposite direction, then back to center.

Am I correct?

Last edited:

#### sparky72

##### Member
pic to servo

Good morning guys back at it again. OK this is what I am trying to do. When power is first applied to the system I want the servo to travel to the 1.0ms position and wait for the momentary switch to be activated. When the momentary reset button is pushed I want the servo to travel to the 2.0ms position then return to the 1.0ms position and then go to sleep waiting til the momentary button is pushed again. Forget about the 1.5ms position. Can this be done with the coding.

#### Jon Wilder

##### Active Member
Good morning guys back at it again. OK this is what I am trying to do. When power is first applied to the system I want the servo to travel to the 1.0ms position and wait for the momentary switch to be activated. When the momentary reset button is pushed I want the servo to travel to the 2.0ms position then return to the 1.0ms position and then go to sleep waiting til the momentary button is pushed again. Forget about the 1.5ms position. Can this be done with the coding.

Yes it can. I just needed to know exactly what you needed the servo to do prior to me rewriting the code. Now that we have the PIC doing something, give me a couple of hours and I'll have the new code posted up.

Status
Not open for further replies.

Replies
52
Views
8K
Replies
2
Views
2K
Replies
0
Views
2K
Replies
3
Views
987
Replies
11
Views
12K