Looking at your earlier post you need to left justify and use the top 3 bits of adresh.
A better way to write this is,
Mike.
Code:
main:
[COLOR="blue"]ADCON1.7 = 0 'left justify[/COLOR]
ADCON0.2 = 1 'start A/D conversion
while(ADCON0.2=1) 'wait for it to complete
wend
output1 = adres[COLOR="blue"]h[/COLOR] / 32
WaitMs 100
Goto main
A better way to write this is,
Code:
main:
ADCON1.7 = 0 'left justify
ADCON0.2 = 1 'start A/D conversion
while(ADCON0.2=1) 'wait for it to complete
wend
output1 = adresh[COLOR="Blue"]>>5[/COLOR]
WaitMs 100
Goto main
Mike.