Hi Henrik,
No worries... I learn from mistakes as well. I appreciate all your help.
I believe we're getting very close. I have the following code:
if enc_counter <> enc_counter_old then 'see if value has changed
enc_counter_old = enc_counter 'move new value to old
Counter = enc_counter
Sign = Counter.15 ' Save sign
Counter = ((ABS Counter) * 5) ' Degrees is now 0 to 900
If Sign THEN Counter = -Counter ' Restore sign, value is now -900 to 900
lcdout $FE,1, sdec Counter / 10, ".", sdec Counter //10
lcdout $FE,$C0, sdec Counter
First, the counter increments by 5.
Also, in the first LCD statement, the count increments to +90 as expected. However, the negative value shows as 6553.1, 6552.6, etc...
The second LCD out statement displays +/- 900 as you explained.
Seems the absolute value gets lost when trying to display negative after formatting.
Is there maybe a way I can parse the decimal values prior to display statement to maintain the value?
Chris
Bookmarks