Hi,

I am using a pic16f818, and am having trouble with the a/d convertor. I just have a pot & an LED, here is the program:

define OSC 8
define adc_bits 10
define adc_sampleus 50
TRISA = 255
ADCON0 = 193
ADCON1 = 128

led var portb.1
value var word

start:
adcin 0, value
if value = 0 then value = 1
high led
pause value
low led
pause value
goto start
end

When I turn the pot I get a delay of 1, 2, or 3 mS. I would expect a delay of upto 1023mS. Can anyone please help?