Re: CMCON0 and ANSEL registers
Please read the register details. In my copy of the datasheet it's "REGISTER 8-1: CMCON0: COMPARATOR CONFIGURATION REGISTER". It tells you what the default (reset) value of the register is. And the "comparator mode bits" part tells you what you may want to set it to in your init() routine.