Hello
I'm using 16f877;
i changed the lcdout command like yours and
here , i checked for the ADC reading:
@ DEVICE pic16F877
@ DEVICE pic16F877, WDT_on
@ DEVICE pic16F877, PWRT_ON
@ DEVICE pic16F877, PROTECT_OFF
@ DEVICE pic16F877, HS_OSC

DEFINE LCD_DREG PORTB
DEFINE LCD_DBIT 0
DEFINE LCD_RSREG PORTE
DEFINE LCD_RSBIT 1
DEFINE LCD_EREG PORTE
DEFINE LCD_EBIT 0
DEFINE LCD_RWREG PORTE
DEFINE LCD_RWBIT 2
DEFINE LCD_BITS 8
DEFINE LCD_LINES 2
DEFINE LCD_COMMANDUS 1000
DEFINE LCD_DATAUS 225
DEFINE ADC_BITS 10
DEFINE ADC_CLOCK 2
DEFINE ADC_SAMPLEUS 100

bar var byte
raw var word
I var byte

trisa=1
trisb=0
trise=0

lcdout $FE,$40,0,$1F,$1F,$1F,$1F,$1F,$1F,0,$fe,1
ADCON1=$8e
PAUSE 200
ADCIN 0,raw
bar=(1023-raw)/64
for I=1 to bar
lcdout dec3 raw
next I
END
there is a 16 digit number : 2732732732732732 and does not change;
if i reset the pic , there is another number 2742742742742742 , so goes on ...
I think i it couldn't read raw.
And the number does not change;maybe my loop is wrong