I have been looking at this post and may have picked up a little something. You guys are way ahead of me. I have only a few weeks experience.

I have an 16F877A which I have managed to interface with an LCD and KEYPAD.
All works great. Now I would like to read voltage through the ADC, A0 - A9.

Here is the code I am using.

DEFINE ADC_BITS 10
DEFINE ADC_CLOCK 3
DEFINE ADC_SAMPLEUS 50

X VAR BYTE
TRISA = %11111111
ADCON1 = % 10000010
PAUSE 500

MAIN:
ADCIN 1, X
LCDOUT X, " VOLTS"
PAUSE 500
GOTO MAIN
END

What I am getting now is random ascii characters for X. Sometimes they are sequential for a while.

Any help will be appreciated.

Geezer