Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
void pwmTask(unsigned int pulse_width,unsigned int period)
{
unsigned int time_on = pulse_width;
unsigned int time_off = period - pulse_width;
while(1)
{
pwm_output = 1; //pwm_output = signal connected to FET
sleep(time_on);
pwm_output = 0;
sleep(time_off);
}
}
Prabakaran said:If we use both timer also , how could i generate the PWM output. if we one timer also we can generate the PWM with constant Duty cycle. So Ashad can u explain me how we can generate the PWM with duty cycle can be varied from 0 to 100 % .