You have a word variable (16 bits)...Code:W0 VAR WORD W0 = 65535 + 1
What's happens when you do the above math?
%1111111111111111 + %0000000000000001 = %10000000000000000
17 bits doesn't fit in a 16 bit variable.
An idea...divide all your numbers in half and use 32767 ($7FFF) as your new 'ZERO' point, change the LCD out routine to show that.




Bookmarks