You're absolutely correct in both cases...
CMCON=7 is the same as CMCON=%00000111 which is the same as CMCON=$07...
now all you do is compare the setting of each bit against what it does in the CMCON register, which you're already done and discovered it turns the Comparators OFF and sets the relevant pins to Digital.
With regard to TRIS, never assume anything is going to set things for you automatically. It's so easy to go round and just set In or Out usage accordingly.
Well done... looks like you're in business.




Bookmarks