Meng Alice

IC and Pwm problems

Discussion created by Meng Alice on Jun 15, 2016

I use IC to capture an input square wave, and then generate my output square wave by PWM model .

The frequency of my output is several times of the imput wave, such as 2 times, 5 times, so much as

60 times. I use IC to detect the rising edge and the trailing edge to get the pulse width, according this to determine the period of the PWM.

 

But I found when my input wave frequency change, the output can't be change together with the input

wave, even the times of the frequency also can't be contain.

 

Whether I need to close my PWM at the end of PWM period and enable it at the beginning of the

wave edge. How can I make my output wave change following the input wave change.

My programme, the input and output wave are attached.

Original Attachment has been moved to: ECT.rar

Attachments

Outcomes