Arrowspace
Banned
I written a code for center aligned PWM using dspic30f but at output i am getting edge aligned PWM , can anyone correct my code .
PWMCON1 = 0b00110011;
PTCON = 0;
_PTCKPS = 0;
_PTMOD = 0b10;
PTPER = 600;
PDC1 = PTPER;
PDC2 = PTPER;
PTMR = 0;
_PTEN = 1;
PWMCON1 = 0b00110011;
PTCON = 0;
_PTCKPS = 0;
_PTMOD = 0b10;
PTPER = 600;
PDC1 = PTPER;
PDC2 = PTPER;
PTMR = 0;
_PTEN = 1;