Reply To: PWM by pic 16F877A

Home Forums Microcontrollers PIC Microcontroller PWM by pic 16F877A Reply To: PWM by pic 16F877A

#11538

Shubham
Participant

Hi Ligo

i want a generate a pulse with 1 uS ON time. the total time period is 255 uS. the duty cycle for this wave is 0.003984. but when i try to stimulate it in proteus the ON period comes out to be 0.1 uS. the code which i have written is as follows:

void main(void)
{
TRISC2_bit=0;
PWM1_Init(3920);
PWM1_Start();
while(1)
{
PWM1_Set_Duty(0.09996);
}
}

please help me out as i m novice in using PIC Microcontroller.

string(7) "9898001"