When displaying your km/h data, suffix it with one or two ASCII spaces ($20 Decimal 32). This will overwrite any characters remaining from the end of the prvious display.
It's neater to RIGHT JUSTIFY numeric displays, this saves the km/h waving about along the right-hand side of the numeric value which becomes a distraction... this probably will look a lot more professional...
rather than this, which despite being simpler code, ends up looking tatty...Code:LCDOUT $FE,$80 If kmh<100 then LCDOUT " " If kmh<10 then LCDOUT " " LCDOUT #kmh," km/h" ' note no trailing spaces required
Code:LCDOUT $FE,$80,#kmh," km/h " ' note the couple of trailing spaces here




Bookmarks