Hello,
I have a problem with pulse width measurements. I am trying to measure pulse widths from a signal that has a duty cycle from 0%-100%. The problem I am facing is that the define pulsin max does not behave the way I had anticipated. For instance, the signal I am measuring has a period of about 9 ms. So, I was expecting that defining pulsin max at 900 would return a variable value of 900 when duty cycle was 100% (always high). However, the variable gets set at "0" instead.
My boards are already made and the pwm signal is already assigned to portc.2, so I cannot use the CCP module, or the interupts on change from portB.
Any suggestions for measuring this signal?
Or, Is there a way to modify the Pic basic command so that a 100% duty cycle would return the defined pulsin max value, instead of 0?
Thanks!
Bookmarks