Thank you

I tried it with some led's on the I/O and it is counting nicely

Then I added the ADC and have put a potmeter to AN0

But the result following LCD_overview4 is showing nothing
LCD_overview3 is showing the right value

AD var word[16]
adval0 Var Word


READ_ADC:

ADCIN 0, adval0

for i = 1 to 2
for j = 0 to 7
PORTC = j+(i*8) 'PORTC4:3 selects the multiplexer
'PORTC2:0 selects the channel
' Read ADC here into AD[j+((i-1)*8)]
pause 1
ADCIN 0,AD[j+((i-1)*8)]
pause 1
next j

next i

lcd_overview3:
Lcdout $fe, 1 ' Clear screen
LCDOUT "AD0: ",DEC4 adval0
return

lcd_overview4:
Lcdout $fe, 1 ' Clear screen
LCDOUT "AD0: ",DEC4 AD.0," AD1: ",DEC4 ad.1," AD2: ",DEC4 ad.2," AD3: ",DEC4 ad.3
LCDOUT $FE,$c0
LCDOUT "AD4: ",DEC4 AD.4," AD5: ",DEC4 ad.5," AD6: ",DEC4 ad.6," AD7: ",DEC4 ad.7
return

goto read_adc