Hi Kurt. The easiest thing to do is set all of the ports to digital. When you use the ADCIN command, it will convert the particular port to analog. I put these lines on the top of almost all of my 16F819 programs.
OSCCON = $60 'set int osc to 4mhz
ADCON1 = 7 ' set all inputs to digital. adcin command will convert to analog
@ DEVICE MCLR_ON, INTRC_OSC, WDT_ON, LVP_OFF, BOD_OFF, PWRT_ON, PROTECT_ON
X VAR BYTE
START:
ADCIN 0,X ' read pot on ANA0 & place value in x
Bookmarks