I have the following:

PIC12F675
GPIO.5 for Analog input
GPIO.4 for reset to my transceiver
internal OSC 4Mhz

I run my code and everything seems to be fine. I turn the power off then try again and get flunctuation in my analog samples. I get random numbers! I use my scope and meter to see what the sensor is supplying to the GPIO.5 input and it seems to be a stable output. The PIC and the sensor is within 0.25" from one another. I have tried both the Vref and VDD with the same results.

If someone can look at the following code to see if I have missed anything. Sometimes you get to close and never see the simple stuff.

Do I need to place the following in my code:
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

[code]

@ device pic12F675,intrc_osc,wdt_off,pwrt_off,protect_off,M CLR_off
INCLUDE "modedefs.bas"

dEFINE OSC 4 ' We're using a 4 MHz oscillator
DEFINE OSCCAL_1k 1 ' DEFINE OSCCAL FOR PIC12C671 or PIC12F675
adval VAR WORD 'Create adval to store result

sample VAR BYTE ' Holds number of samples to take
samples VAR WORD ' Multiple A/D sample accumulator
samples = 0 ' Clear samples accumulator on power-up

ANSEL = %00110001 ' Set ADC clock to Frc and GP0 & GP1 to analog mode
ADCON0 = %10000001 ' Configure and turn on A/D Module:
' Right justify result

High GPIO.4 ' Cycle reset pin for transceiver
pause 5
low GPIO.4
pause 500

loop:
for sample = 1 to 20
ADCON0.1 = 1
notdone:
if ADCON0.1 = 1 then notdone
adval.highbyte = ADRESH
adval.lowbyte = ADRESL
samples = samples + adval
next sample
adval = samples/20

SerOut2 GPIO.5,84, ["+", DEC adval,13,10]

samples = 0 ' Reset samples to 0 for next sampling routine
Pause 1000 ' Wait 2 seconds
GoTo loop ' Do it forever start over at loop
end

[code]

Thanks again Scott