OK, closer examination of the datasheet shows:
bits <2:0>: 011 = CIN- pin is configured as analog, CIN+ pin is configured as I/O, COUT pin configured as
Comparator output, CVREF is non-inverting input.
bit <3>: 1
CIS: Comparator Input Switch bit When CM<2:0> = 110 or 101: 1 = CIN+ connects to VIN- 0 = CIN- connects to VIN-
When CM<2:0> = 0xx or 100 or 111: CIS has no effect.
So...I don't see how CMCON0 would be causing my issue...?
Yeah, so now I'm kind of thinking the problem is in the Proteus simulator. I posted this because usually something like this means I've done something dumb in the setup. But since 3 smart people have looked at it and not seen an obvious problem (am I interpreting your responses correctly?) I think I'll next try the MPLAB simulator and then try a quick hardware prototype to see if indeed bit 0 actually changes when I change bit 5 in code. I kind of doubt it will.
Quick, everyone...last chance to solve my problem before I get out the soldering iron....![]()
Bookmarks