View Single Post
  #1   Spotlight this post!  
Unread 05-05-2005, 17:50
tux tux is offline
Registered User
AKA: Lee Harr
FRC #3842 (Shock-a-Bots)
Team Role: Mentor
 
Join Date: Apr 2005
Rookie Year: 2005
Location: Rochester, NY
Posts: 91
tux is an unknown quantity at this point
servo range of motion

Hi;

I am using a HiTEC HS-322HD servo connected to the PWM Out port of the Edu controller.

I wonder if it is possible to make the servo turn more than it turns now.

Right now I am using code like ...
pwm08 = 0;
or
pwm08 = 255;
(those being the extremes) and the servo turns a total of about 180 degrees.

I see some sample code in the default code like this ...

Example: The following would generate a 40KHz PWM with a 50% duty cycle on the CCP2 pin (PWM OUT 1):
CCP2CON = 0x3C;
PR2 = 0xF9;
CCPR2L = 0x7F;
T2CON = 0;
T2CONbits.TMR2ON = 1;
Setup_PWM_Output_Type(USER_CCP,IFI_PWM,IFI_PWM,IFI _PWM);

but search as I might, I do not see anything telling what this is all about.

Is this type of code used to have better control over servos?

Apparently Setup_PWM_Output_Type() is defined in ifi_library.c which I do not see that file in the distribution.

Any pointers appreciated.