Hi everyone,

I'm new here avec I hope find help here.

I'm currently making a 3-phase variable frequency drive with PicBasic Pro and a PIC18F26K20 (28-pin, 64MHz, 3.3V). For simulation, I'm using ISIS Proteus.

I have to define 3 PWM hardware channels (one for each phase U, V and W) with the HPWM command.
My PIC have CCP1 on PORTC.2, CCP2A on PORTC.1 and CCP2B on PORTB.3.

So here my simple test program :

define OSC 64

DEFINE CCP1_REG PORTC
DEFINE CCP1_BIT 1
DEFINE CCP2_REG PORTC
DEFINE CCP2_BIT 2
DEFINE CCP3_REG PORTB
DEFINE CCP3_BIT 3

HPWM 1,127,8000
HPWM 2,100,8000
HPWM 3,50,8000

Unfortunately, in Isis, only HPWM1 and HPWM2 works well, but not the HPWM3 (no action). I don't know why.
My registers are maybe misdefined?