Hi !
I tried to read 10 samples of ADC values and sending to LCD display.
But on LCD I have the value of ADC and seven "0". (like : 77 0 0 0 0 0 0 0)Code:DataW var word[10] i var byte main: for i=0 to 9 ADCON0.1 = 1 ' Start conversion While ADCON0.1=1:Wend ' Wait for conversion DataW.HighByte=ADRESH ' Read variable from ADC and save DataW.LowByte=ADRESL pause 50 next i IF DATAW < 1023 THEN LCDOUT $fe,1 for i=0 to 9 lcdout dec dataw[i], " " next i endfor PAUSE 1000 Endif Goto main
Please, help ! What I do wrong ?
Thanks !
Bookmarks