You will need to add this near the beginning of your code
Code:
ANSEL = %00000000
CMCON0 = %00000111
http://www.picbasic.co.uk/forum/showthread.php?t=561