Might seem like silly questions, but (1) have you checked that your Input pin is actually swinging Hi/Lo... (0-5v) does it need a pull-up/down Resistor? (2) Are you wired to the correct pin? (3) Is the pin shorting out against an adjacent pin?
I generally set the Ports digital, THEN set Port I/O directions... here's a little ditty that you can use to check if your Port is actually getting data... just needs an LED (with the obligatory Series Resistor) somewhere...
LED var PortB.0
InputPin var PortA.1
CMCON=7
TRISA=3
TRISB=0
Pause 500
Loop:
If InputPin=1 then
High LED
else
Low LED
endif
Goto Loop
End
Melanie




Bookmarks