Arrati-
Thank you for your help. Although it looks good, your program does strange things! With no input on RC.5(LOW), X1 is all over the place, 126,76,20,216, etc., while W1 remains zero.
Arrati-
Thank you for your help. Although it looks good, your program does strange things! With no input on RC.5(LOW), X1 is all over the place, 126,76,20,216, etc., while W1 remains zero.
Adding the IF statement fixed it, and all is good! Thank you, Arrati.
Main:
count PORTC.5, 1000, W1
if W1 > 60 then
X1 = X1+(w1-60)
endif
lcdout $fe,1, dec W1
lcdout $fe,$c0, dec X1
pause 10
goto Main
Bookmarks