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.

how to use PIC16f877A to control servomotor

Status
Not open for further replies.

vijindran

Junior Member level 2
Junior Member level 2
Joined
Feb 13, 2007
Messages
20
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,427
mikroc servo control

hai..

i'm using PIC16f877A with 4Mhz crystal..now i'm using 5 servo motors at PortB as out put.. i dono how to control the motor using pulse..and how to calculate the pulse for the motors.... i need algorithn for the motors in asssembly language..any1 can help me? thnx in advance..
 

crystal 16f877a servo motor

as u can see on the internet most of the servo motors turn most left with 1ms pulses, most right with 2 ms pulses. u can use timer of pic16f877 to obtain the pulse durations. to turn the servo most left, u have to make pin high and wait for 1ms, then make pin low and then wait for about 20 ms. u have to give this pulse train many times ( for example 30 times)...

i have no code example in assembly language.. i am using hitech pic c.. but u can find many source codes on the internet..
 

    vijindran

    Points: 2
    Helpful Answer Positive Rating
mikroc servo

can u send me the code in c langugage ah?
 

control de un servomotor con un pic 16f877a

i used mikro c comiler for pic and just drive 1 servo with f84.
i just turn the output pin to high and low for the duration of 1ms and 2.2ms.
mikroc uses the delay_ms(1000); command for delay b/w hogh and low time.
 

pic servomotor en pic c

I have my doubt that anybody would do the entire thing for you, I guess I have put up sample codes in PIC Basic Pro in another thread.
Faraz101 has given a good hint of doing the same in MiKroC.
Why dont you give it a try yourself and post the results here, that way you will learn yourself and other will be able to help you out.
 

servo motor mikroc

Use interrupt timer to control duty cycle of pulse signal
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top