Can we suppress leading zero's in LCDOUT?
I'm trying to print a value in a BYTE sized VAR to a specific place on the LCD.
(a standard 16x2, and using DT's Anypin.php)
I need to get the number right-justified and w/o leading zero's.
I currently have a 0-255 number comming from the ADC on AN0.
(later I will need to do some math and expand the the result to Xnum-per-mV)
I'm currently doing something like this:
Code:
MYNUMBER VAR BYTE
MYNUMBER = 0
...
ADCIN 0, MYNUMBER
...
LCDOUT $FE, $83, DEC MYNUMBER
and it prints out "127 " instead of " 127" on the LCD.
My number needs to be printed before (in front of) some text that remains on the LCD during these numeric updates, like " 127-Dingles".
I tried DEC5 and get the digits in the right place but they have leading zero's (instead of spaces)
Is there a way to format my number right-justified and suppress the leading zero's?