PWM1_16BIT_WritePeriodRegister(10000);
PWM1_16BIT_SetSlice1Output1DutyCycleRegister(5000);
PWM1_16BIT_SetSlice1Output2DutyCycleRegister(5000);
PWM1_16BIT_LoadBufferRegisters();
while(1)
{
PWM1_16BIT_Enable();
DELAY_milliseconds(20);
PWM1_16BIT_Disable();
DELAY_milliseconds(20);
}
|