PDA

View Full Version : Need setting to turn off 16F688 comparators



Thomas Williams
- 20th December 2005, 18:40
I am in need of some help to determine the correct setting to turn the comparators off on a 16F688 so that I can use them for A/D inputs.

so far:

cmcon0= %00000000
cmcon1= %00000011
VRCON = %00000000

any other suggestions?

jessey
- 22nd December 2005, 00:39
Hello Thomas,

I just bought 30 16f688's at a very low price so I've been looking for all the information I could find about them and as far as what I've found from reading the archives here is that this statement also works CMCON0 = 7 ' Comparators disabled.

I don't quite understand the data sheet but it says:
Note:
The ANSEL (91h) and CMCON0 (19h)
registers must be initialized to configure
an analog channel as a digital input. Pins
configured as analog inputs will read ‘0’.

Then it goes on to say bit 7-6: Unimplemented: Read as '0'. Does that mean that setting CMCON0 to either 6 or 7 has the same effect?

Thanks
jessey