You're doing the right thing, just writing values to registers - such as this clip of yours and mine:
Code:
// Set the PWM to the options selected in the PIC10 / PIC12 / PIC16 / PIC18 MCUs.
// PWM5POL active_hi; PWM5EN enabled;
PWM5CON = 0x80;
PWMCON0 = %01010100 'PWM[5:0] outputs enabled
Yours writes in binary, mine (from the MCC) writes in HEX
Many of the other lines (those with 'bits' in the name) write to a specific bit in a register, and makes it easier to understand rather than writing to 8 bits, just to change 1.
As others have said, generally the PWM hardware isn't suitable for servos, and while it can be used it requires a lot of 'messing about' to get it to work - basically it's far too low a resolution 'as is' - as it's PWM, not servo signals.