Yup that's the much accurate way if the PIC have the CCP module. Case not, Pulsin may work... but accuracy is pretty poor.
So you can still detect the rising edge, start a timer, wait 'till falling edge. You have now the High Pulse measure. From there you reset the Timer and wait the next rising edge. There you have the Low pulse measure.
Few maths later, you have the duty cycle.
http://www.picbasic.co.uk/forum/show...36&postcount=4
also look at this one
http://www.picbasic.co.uk/forum/show...se+measurement
HTH
Last edited by mister_e; - 18th December 2006 at 04:10.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks