Quote Originally Posted by Andy Wood View Post
Please check this line:
loop:
IF PORTA.4 THEN ' Wait until start of low pulse
Should it be:
IF PORTA.4 = 0 THEN ' Wait until start of low pulse
Andy
Unless he's just making sure that the timing loop doesn't start in the middle of the pulse...