Hi everyone,
I'm new PBP, have a 5k ohm potentiometer, and I'm trying to dispaly it to the lcd. But I wa hoping I can display it in terms in 0% - 100%. Please help me with my codes below.

' Define ADCIN parameters
Define ADC_BITS 8 ' Set number of bits in result
Define ADC_CLOCK 3 ' Set clock source (3=rc)
Define ADC_SAMPLEUS 50 ' Set sampling time in uS
PortB = $00 ' all outputs off to start
TrisB = %00000000 ' All of Port B is outputs
TRISA = %11111111 ' Set PORTA to all input
adval var byte ' ADC result variable
ADCON1 = %00000001 ' Set PORTA analog

loop:
ADCIN 0, adval ' Store ADC value to adval

Serout 4, 6, [254, 1]
pause 2
serout 4, 6, [#adval] 'display to the LCD
pause 250
Goto loop ' Do it forever
End



Thanks in advance,
joe