i suggest our friend open the PIC datasheet in section 21(analog converter) and 22(analog comparator)

From there, you have to find how to disable AllAnalog stuff to make your i/o AllDigital.

Claxon1... you should read and write better the name of Sayzer