Hmm, the method I’m using to read the A/D is used on the melabs examples page. I have also used this method with a 16F688 without problems. I do get a varying number when I adjust a pot on the pin (0-256) for the 16F819. I need the 1024 resolution or I could use it as is. Something is setup wrong but I think I’m reading the A/D correctly. Correct me if I'm wrong. I will give your advice a try in a bit.

Thanks,
Mark

A melabs example;

' Read an analog voltage on RA0 and send the decimal representation
' of the value on the serial port at 2400 baud. 10-bit conversion
' yields 0-1023 result for 0-5 volt input.

' Define LOADER_USED to allow use of the boot loader.
' This will not affect normal program operation.
Define LOADER_USED 1

' Define ADCIN parameters
Define ADC_BITS 10 ' Set number of bits in result
Define ADC_CLOCK 3 ' Set clock source (3=rc)
Define ADC_SAMPLEUS 50 ' Set sampling time in uS

adval var word ' Create adval to store result


TRISA = %11111111 ' Set PORTA to all input
ADCON1 = %10000010 ' Set PORTA analog and right justify result

loop: ADCIN 0, adval ' Read channel 0 to adval

Serout2 PORTC.6,396,["Value: ",DEC adval,13,10] ' Display value

Pause 100 ' Wait .1 second

Goto loop ' Do it forever
End