My guess is that you are sending a simple byte out to the LCD, and it is then displaying the ASCII equivalent. For example, take the following:
Code:
Number1 VAR BYTE
Number1 = 123
When Number1 is sent directly to the LCD, it will cause the “{“ to display.
What you will need to do is enumerate each decimal place of the number and send that to the LCD. For example:
Code:
Number1 VAR BYTE
Temp VAR BYTE
Number1 = 123
‘Get Value of digit in 100’s place
Temp = Number1/100 ‘With Number1 = 123 then Temp = 1
Temp = Temp + 48 ‘Convert value to ASCII equivalent
‘Send temp to LCD
‘Get Value of digit in 10’s place
Temp = Number/10 ‘With Number1 = 123 then Temp = 12
Temp = Temp//10 ‘Get Remainder so with Number1 = 123 then Temp = 2
Temp = Temp + 48 ‘Convert value to ASCII equivalent
‘Send temp to LCD
‘Get Value of digit in 1’s place
Temp = Number1//10 ‘Get Remainder so…with Number1 = 123 then Temp = 3
Temp = Temp + 48 ‘Convert value to ASCII equivalent
‘Send temp to LCD
This will print out the leading "0"s, and will only enumerate a BYTE. It's just a simple code example, but it should help explain the concept and get you started on a more specific solution to met you needs.
Hope this helps, good luck.
SteveB
Bookmarks