I believe you may have a mismatch condition on the ports.
Try changing the following:
to:Code:INTCON.1 = 0 HIGH GPIO.1 PAUSE 100 LOW GPIO.1
Code:temp = GPIO.2'read to dummy variable to clear mismatch condition of port (see s3.2.2 of datasheet) INTCON.1 = 0 HIGH GPIO.1 PAUSE 100 LOW GPIO.1
Bookmarks