AnsweredAssumed Answered

PWM input capture

Question asked by siddaraju.basanth on Oct 27, 2016
Latest reply on May 12, 2017 by danxs
Hi ,

We have a requirement to capture the PWM input at Timer2 channel 1.
We are using STM8AF6266 micro.

Requirement:
We have to capture 2 PWM inputs received at Timer2 channel 1.
1) Falling edge 100 - 0 % 200Hz signal in 1sec.
2) Rising edge 0 - 100 % 200Hz signal in 1sec.

Based on this inputs captured We have to update PWM output duty cycle from
 a) 0-100% 200Hz signal in 1 sec (Dimmer ON ) for case 1 input captured
b) 100 - 0% 200Hz signal in 1 sec (Dimmer OFF ) for case 2 input captured.

I have refered to the example code of STM8 and I am not able to meet the requirement  with reference to the sample/example code.

Can anyone help me on this. Please let me know if you have any quires related to it.
Thanks,



Outcomes