Hi,

are you sure of this line ???

Code:
CMCON0 = %00001011	' Analog comparator: Comparator w/ Output and with Internal Reference CM<2:0> = 011
Alain