i think you will find that Proton does support 3 CCP modules
Les said
At the moment, the HPWM command only supports 2 pwm channels.
I am currently looking into more channels, but Microchip have not made it easy as they shift around the configurations for different PICmicro devices, and some have several channels of PWM, each with a slightly different setup.
I've said this in the past and I'll say it again. The HPWM command was implemented so that PBP users would not have withdrawal symptoms. The best way to use the PWM channels is to access the PICmicro registers yourself.
Personally, I don't go anywhere near the HPWM command because it's inefficient in so much as it has to calculate the period etc everytime it's used. Even if the change is so small a single register change could do the job.
you may want to try this
Setting up hardware PWM really isn't that hard.
From the examples in your 16F767 datasheet;
Setup 10-bit PWM for 1.22kHz with a 20MHz osc.
Device 16F767
Declare XTAL 20
' Word vars for 10-bit value of each PWM duty cycle
Dim Duty1 As Word ' Channel #1
Dim Duty2 As Word ' #2
Dim Duty3 As Word ' #3
' Set CCPx pins to outputs
TRISC.2=0 ' CCP1 output
TRISC.1=0 ' CCP2 output (could also be assigned to RB3)
TRISB.5=0 ' CCP3 output
' Set CCP modules to PWM mode
CCP1CON = %00001100 ' Mode select = PWM
CCP2CON = %00001100 ' Mode select = PWM
CCP3CON = %00001100 ' Mode select = PWM
' Set period up for 1.22kHz PWM freq
PR2 = $FF
' Set TMR2 up for 1:16 prescale & turn it on
T2CON = %00000110 ' TMR2 ON 1:16 prescale
Duty1 = 512 ' 50% duty cycle. 1024/2 "10-bit resolution"
CCP1CON.4 = Duty1.0 ' Setup 10-bit duty cycle as
CCP1CON.5 = Duty1.1 ' a 10-bit word
CCPR1L = Duty1 >> 2
Duty2 = 512
CCP2CON.4 = Duty2.0
CCP2CON.5 = Duty2.1
CCPR2L = Duty2 >> 2
Duty3 = 512
CCP3CON.4 = Duty3.0
CCP3CON.5 = Duty3.1
CCPR3L = Duty3 >> 2
just alter the pic type and try it, it should work
wizpic