Looking at the code etc I can figure out the following...
If portb.0 = 1 then
cnt=cnt+1
endif
If portb.1 = 1 then
cnt=cnt-1
endif
So if the key attached to portb.0 is pressed then the variable cnt would reduce by 1 and would increase by 1 if the portb.1 key is pressed.
Using the example code you would reference the variable [key] and so could operate the same math based on the reading.
If you have modified the code already, please post it here and I'll make the modifications for you and place comments in the code so you understand more what it is doing.
Leigh
Bookmarks