PDA

View Full Version : 16F88 - AD converter module always "ON"



flotulopex
- 17th September 2006, 20:32
Hi there,

I'm trying to understand the AD converter module on my 16F88.

For testing purposes, I have a LCD and a pot connected to the PIC and everything runs fine.

The ADCON0 register controlls the AD module. Bit 0 (ADON) activates or shuts off the module (0=OFF / 1=ON).

When I set this Bit to 0, I expect the AD converter module to be stopped. Operating the pot at that time will still show changing values on the display.

I don't understand why.

Darrel Taylor
- 17th September 2006, 21:06
Hi flotulopex,

If you are using the ADCIN statement to get the A/D values, then it will turn the ADON bit back on each time you use it.

If you were using the A/D registers manually, it would still be off.

But if you really want the Pins to be digital, you should...
ANSEL = 0
CMCON = 7

HTH,

flotulopex
- 18th September 2006, 12:11
Thank you.

I didn't know about the ADCIN exact operation.

The Micro Code Studio's help file is a little to spartan to me...