void Init_PWM(void)
{
PTCON0 = 0x00;
PTCON1 = 0x80;
PWMCON0 = 0x4F;
PWMCON1 = 0x00;
PTMRH = 0;
PTMRL = 0;
PDC0H = 0;
PDC0L = 0;
PDC1H = 0;
PDC1L = 0;
PDC2H = 0;
PDC2L = 0;
OVDCOND = 0x18;
OVDCONS = 0xFF;
FLTCONFIG = 0;
SEVTCMPH = 0;
SEVTCMPL = 0;
}
{
PTCON0 = 0x00;
PTCON1 = 0x80;
PWMCON0 = 0x4F;
PWMCON1 = 0x00;
PTMRH = 0;
PTMRL = 0;
PDC0H = 0;
PDC0L = 0;
PDC1H = 0;
PDC1L = 0;
PDC2H = 0;
PDC2L = 0;
OVDCOND = 0x18;
OVDCONS = 0xFF;
FLTCONFIG = 0;
SEVTCMPH = 0;
SEVTCMPL = 0;
}