Hi, The debounce was the problem..Following both codes are working after adding some delay.. I didnt use CASE.. Pls suggest if it needs to be fine tuned..Thanx..
if (ADVAL > 200) AND (ADVAL < 256) THEN
toggle porte.0
pause 150
endif
-----------------------------------------------
ADCIN 0, adval
WHILE (ADVAL = 255) 'AND (ADVAL < 256)
toggle porte.0
pause 150
ADCIN 0, adval
WEND




Bookmarks