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.

Help me control 4 servo motors with one PIC16F877

Status
Not open for further replies.

saeed_pk

Full Member level 4
Joined
May 20, 2006
Messages
237
Helped
35
Reputation
68
Reaction score
28
Trophy points
1,308
Location
Islamabad, Pakistan
Activity points
2,655
Hi all
I have to control 4 servo motors with single PIC16F877 but i found only one hardware pin RC2 for PWM Module i m using Hi-tech PICC compiler please advise what i have to do. i need four different PWM pins for four motors remeber I cannot multiplex because i might need two or more motors at same time
 

pic16f877 servo

As I remember, there are 2 hardware PWM outputs on 16F877 (same freq, but different duty cycles).

I have used Cygnal's C8051 microcontroller to control several servo motors (PPM) without glitches. They incorporate a digital Crossbar which is usefull when multiplexing. So the capture/PWM modules (4 items) where used in the same time, for both generating PPM and also to acquire incoming PPM signal.
 

pic16f877 pwm

I have to control 4 servo motors with single PIC16F877 i dont know 8051 so please help me about this
is there 4 harware pins are available for that on any port plz tell
 

pwm pic16f8

There are no 4 pin PWM output for 877, look at the datasheet.
In this case you must generate the remaining PWMs manually (software)
 

16f877 servo

it is posible to control servo (up to eight) using 16f877. I'm using picbasic so i am not familiar with hitech. picbasic offers instruction for servo control. Pwm signal is generated by generating pulse on the pin, 1.5ms for neutral 1ms for minimum and 2ms for maximum and the signal is updated every 20ms.

try to look for web site offering information on servo signal.

Try this one **broken link removed**
 

pic16f877 control servo

Man u controlled 8 servos but what i want to know is how many pins u used for PWM outputs because there are two pins so how u managed to control 8 servos with 16f877
plz tell where from u get 8 PWM signals in PIC16F877( Remember i can't multiplex)

Added after 14 minutes:


As u said ok i generate it in software but on which pin i can collect it PORT A, PORT B, PORT C which one. what ever i generate in software must have a hardware pin where i can exit that modulated wave and direct it to motor.

please advise
 

pic16f877 servo pwm

Choose any pin on a port that can be an output (for ex. PORTC6), then in the init:

TRISCbits.TRISC6=0; // makes C6 an output.

later in the soft:

LATCbits.LATC6 = servo2_ouput; // Updates the command output.

These codes are for C18 compiler, you shoud look at the manual if Hi-tech
 

servo pic16f877

hi,

Before you get into sofware generated PWM maybe you have a choice.


saeed_pk said:
remeber I cannot multiplex because i might need two or more motors at same time

What if you do not multiplex the PWM itself but instead use sample & hold circuits. So you keep the DC after the filter for each motor. Then you will need only one PWM output and four other pins to control the sample input for each S&H.

Perhaps it is not optimum but it is just an idea
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top