void test2()
{
PTCONbits.PTEN = 0;
TRISCbits.TRISC6 = 0; /* Set as a digital output */
TRISCbits.TRISC7 = 0; /* Set as a digital output */
PTCON2 = 0x04;
PTPER = 0x271;
/*~~~~~~~~~~ PWM6 Configuration ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
IOCON6bits.PENL = 1; /* PWM1L is controlled by PWM module */
IOCON6bits.PENH = 1; /* PWM1H is controlled by PWM module */
IOCON6bits.PMOD = 0; /* Select Independent Output PWM mode */
PWMCON6 = 0x80;//-->this was set and removed without results
PDC6 = 100; /* Initial Duty cycle */
SDC6= 200; /* Initial Duty cycle */
DTR6 = 0; /* Deadtime setting */
ALTDTR6 = 0; /* Deadtime setting */
PHASE6 = 0; /* No phase shift */
SPHASE6 = 0; /* No phase shift */
PTCONbits.PTEN = 1; /* Enable the PWM Module */
}