http://www.picbasic.co.uk/forum/showthread.php?t=561
Do not let the thread title fool you, your PIC has analog on PORTC also.
Try a non analog pin or turn the ADC off and see what happens.