Hello, I am having some trouble geting simple data into my PIC16F767. I have writen a program that goes somthing like this.

TRISB = %11111111
TRISA = %00000000
ADCON1 = %00001111

Start: IF PortB.0 = 1 THEN HIGH PortA.0
LOW PortA.0
PAUSE 1
GOTO Start

I wrote this to clarify some problems I was having in a much larger aplication where the PIC is monitoring sensor inputs on a mobile robot.
The hardware that I have built seems to work fine in that when I program the PIC to output data to motors LEDs ect it works fine but when I tell the PIC to read the status of an I/O line it does nothing. The above program produces the following output; When PortB.0 through PortB.5 goes high, PortA.0 through PortA.3 or so goes high for about 5 seconds. When PortB.6 or PortB.7 go high the I/O lines on the above PortA lines breifly go high but this only works twice. ???? this is completly bazar and I have no idea what I could be doing wrong as I have some previous experience with PICs.
Thanks for any ideas or sugestions!!

note: I tried the program on a PIC18F252 with the same problems.
I also looked at the oscillator signal with my oscope and it is fine.