Exactly!
CMCON0 Register:
bit 6 COUT: Comparator Output bit.
This is the logic bit output of the Comparator.
CM: Comparator Mode = 100
With this setup the comparator is comparing VIN- (CIN-/GP1) to VIN+ (which is not an external pin but it is "From CVREF Module", internal voltage reference)
So you need to look at the description of COUT in the CMCON0 register listed below AND you need to look at Table 8-1 in the DS.
This will help you work out what value CMCON0.6 will be based upon a given input on GP1.
Take note that CINV is a configuration bit within the CMCON0 register that determines the logic polarity of COUT.
COUT: Possible values
When CINV = 0:
1 = VIN+ > VIN-
0 = VIN+ < VIN
When CINV = 1:
1 = VIN+ < VIN-
0 = VIN+ > VIN
Bookmarks