BTW, I believe "CMCON = 7" would be a moot entry. "ADCON1 = 7" makes ports A and E digital I/O rather than analog.
You may want to read this. It explains ADCON and CMCON.
http://www.picbasic.co.uk/forum/showthread.php?t=561