Servo Motor Control for PIC 16F877
zecaros
Posts: 1
Hi, i'm currently making an egg packing machine for my design.
The basic system of my machine is to move the eggs from trays into specific location in cartons,
and·I am·making a mechanical arm that will move in x, y directions to pick·the·eggs and load·the eggs,
which uses servo motors for moving the arm.
I'm trying to write a PIC program with MPLAB IDE (*.asm) that will run the servo motor. The model is 'GWServo S666 N', and it has
three pins, one Vcc(12V), Vground(0V), and signal pin which will be connected to PIC (I think).
Hearing from·internet sources,·I have to send a series of pulses to the servo to run the motor, and the direction of the gear will turn accroding to the duty cycle of the pulses. I tried to make·time function, but I have no idea what to do with it, or if it even works..
I saw·several codes for running Servo in different PICs, which I do not know to modify·for my PIC.
Yes, I know.. I'm a newbie at this..yet. I need someone's help.
I am trying to not use H-Bridge.. just using PIC is preferable.
If anyone can give me how I should approach this, or simple tips will be greatful. If you send the sample code,
it will be more appreciated [noparse]:)[/noparse]
Thank you
Post Edited (zecaros) : 2/10/2006 7:54:24 PM GMT
The basic system of my machine is to move the eggs from trays into specific location in cartons,
and·I am·making a mechanical arm that will move in x, y directions to pick·the·eggs and load·the eggs,
which uses servo motors for moving the arm.
I'm trying to write a PIC program with MPLAB IDE (*.asm) that will run the servo motor. The model is 'GWServo S666 N', and it has
three pins, one Vcc(12V), Vground(0V), and signal pin which will be connected to PIC (I think).
Hearing from·internet sources,·I have to send a series of pulses to the servo to run the motor, and the direction of the gear will turn accroding to the duty cycle of the pulses. I tried to make·time function, but I have no idea what to do with it, or if it even works..
I saw·several codes for running Servo in different PICs, which I do not know to modify·for my PIC.
Yes, I know.. I'm a newbie at this..yet. I need someone's help.
I am trying to not use H-Bridge.. just using PIC is preferable.
If anyone can give me how I should approach this, or simple tips will be greatful. If you send the sample code,
it will be more appreciated [noparse]:)[/noparse]
Thank you
Post Edited (zecaros) : 2/10/2006 7:54:24 PM GMT
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax