Page 1 of 1
String not working on physical LCD?
Posted: Wed Oct 25, 2017 4:12 pm
by imtiaz9
on pic16f886 and 2X16 lcd, i convert UINT veriable with value ( 50000) into string display on lcd. simulation is working correct in flwcode but not working on physical hardware. lcd show -15536 value. is this software issue or hardware?
Re: String not working on physical LCD?
Posted: Wed Oct 25, 2017 5:11 pm
by Benj
Hello,
This is a software limitation. The ToString$ function converts to a signed int and the LCD Print Number function will do the same.
We fixed it in v6 and v7 so that you can print signed and unsigned numbers right up to 32-bit using the LCD.
The easiest way to fix the problem is to convert the number to a string yourself using a macro. Please see the attached example.