Hi Mel ...

Just a ( very ) little challenge for you ...

and what about using Pulsin Portx, 1, ...just followed with a RCTime Portx,0, ...
you can measure all in only 1 cycle !!!

Goes well ...and solution tested at 4 and 20 Mhz !!!

Best regards,
Alain