Anuradha1
Member level 2
Hi,
I have written a program in Assembly, to capture PWM signals. The CCP modules of pic16f877 are used.
The algorithm i followed was taken from "micro chip PicMicro CCP and ECCP Tips and tricks"
It works well. compiled and simulated. But for certain values i.e. when the duty cycle of PWM input is small (below 20% pulse width is 160 clock cycles), and it is very large (95% pulse width is 160 clock cycles) it provides error results.
As I noticed this happens bcz the micro controller miss the relevant edge, while saving current CCPR1L value.
Can some one help me to solve out this issue.
Thanks.
PS
cade attached
I have written a program in Assembly, to capture PWM signals. The CCP modules of pic16f877 are used.
The algorithm i followed was taken from "micro chip PicMicro CCP and ECCP Tips and tricks"
It works well. compiled and simulated. But for certain values i.e. when the duty cycle of PWM input is small (below 20% pulse width is 160 clock cycles), and it is very large (95% pulse width is 160 clock cycles) it provides error results.
As I noticed this happens bcz the micro controller miss the relevant edge, while saving current CCPR1L value.
Can some one help me to solve out this issue.
Thanks.
PS
cade attached