// Center aligned PWM.
// Note: The PWM period is set to dLoopInTcy/2 but since it counts up and
// and then down => the interrupt flag is set to 1 at zero => actual
// interrupt period is dLoopInTcy
PHASE1 = LOOPINTCY;
PHASE2 = LOOPINTCY;
PHASE3 = LOOPINTCY;
PTPER = 2*LOOPINTCY+1; //one trigger per PWM period
PWMCON1 = 0x0204; // Enable PWM output pins and configure them as
PWMCON2 = 0x0204; // complementary mode
PWMCON3 = 0x0204;