PDA

View Full Version : Which other pins to output PWM for Servopod


cmmffhc
09-21-05, 01:45 PM
Hi,

I need to control 26 RC servo motors, hence I need to make full use of the capacity of the servopod. Currently, I am using:

PWMA 0-5
PWMB 0-5
TC0
TC1
TD 0-3

This gives me only 18 pwm output pins, where are the other 6 pins which I can use?

And are all of them controlled using the same command:

n pin pwm-period
n pin pwm-out

Can anyone enlighten me on this?

Regards

nmitech
09-21-05, 02:37 PM
I need to control 26 RC servo motors, hence I need to make full use of the capacity of the servopod. Currently, I am using:

PWMA 0-5
PWMB 0-5
TC0
TC1
TD 0-3

This gives me only 18 pwm output pins, where are the other 6 pins which I can use?

TA0-3, TB0-3 on J10 can be used as PWM signals as well


And are all of them controlled using the same command:

n pin pwm-period
n pin pwm-out


On PWMAx & PWMBx you only need to initialize PWM-PERIOD once for each group A, or B. Where the Timers A,B,C,D are need to be defined individually, one for each signal TA0, TA1, TA2, etc...

RMDumse
09-21-05, 02:47 PM
Here is my initialize routine from the latest EH-3R walker. Notice it uses PWMA0-5, PWMB0-5, TA0-3, TB0-3 for the 18 servos it uses and two spares for Pan and Tilt. TC0,1 and TD0-3 can be handled the same way.

DECIMAL
32767 CONSTANT TMRCNT EEWORD ( ~13.11 mS Timebase for PWM/Timers
7500 CONSTANT MIDPOS EEWORD ( 1.50 mS

: RCINITNEW
TMRCNT PWMA0 PWM-PERIOD
MIDPOS PWMA0 PWM-OUT ( Servo 0 Leg 0 Joint 1
MIDPOS PWMA1 PWM-OUT ( Servo 1 Leg 0 Joint 2
MIDPOS PWMA2 PWM-OUT ( Servo 2 Leg 0 Joint 3
MIDPOS PWMA3 PWM-OUT ( Servo 3 Leg 1 Joint 1
MIDPOS PWMA4 PWM-OUT ( Servo 4 Leg 1 Joint 2
MIDPOS PWMA5 PWM-OUT ( Servo 5 Leg 1 Joint 3

TMRCNT PWMB0 PWM-PERIOD
MIDPOS PWMB0 PWM-OUT ( Servo 6 Leg 2 Joint 1
MIDPOS PWMB1 PWM-OUT ( Servo 7 Leg 2 Joint 2
MIDPOS PWMB2 PWM-OUT ( Servo 8 Leg 2 Joint 3
MIDPOS PWMB3 PWM-OUT ( Servo 9 Leg 3 Joint 1
MIDPOS PWMB4 PWM-OUT ( Servo 10 Leg 3 Joint 2
MIDPOS PWMB5 PWM-OUT ( Servo 11 Leg 3 Joint 3

TMRCNT TA0 PWM-PERIOD
MIDPOS TA0 PWM-OUT ( Servo 12 Leg 4 Joint 1
TMRCNT TA1 PWM-PERIOD
MIDPOS TA1 PWM-OUT ( Servo 13 Leg 4 Joint 2
TMRCNT TA2 PWM-PERIOD
MIDPOS TA2 PWM-OUT ( Servo 14 Leg 4 Joint 3
TMRCNT TA3 PWM-PERIOD
MIDPOS TA3 PWM-OUT ( Servo 15 Leg 5 Joint 1

TMRCNT TB0 PWM-PERIOD
MIDPOS TB0 PWM-OUT ( Servo 16 Leg 5 Joint 2
TMRCNT TB1 PWM-PERIOD
MIDPOS TB1 PWM-OUT ( Servo 17 Leg 5 Joint 3

TMRCNT TB2 PWM-PERIOD
MIDPOS TB2 PWM-OUT ( Servo 18
TMRCNT TB3 PWM-PERIOD
MIDPOS TB3 PWM-OUT ( Servo 19
; EEWORD

cmmffhc
09-21-05, 10:07 PM
Thanks for the help!

Regards