How to concatenate vars in c programmed pic?
I programming a 16f84a pic in hitech C to drive a hd44780 lcd. So far I've got the lcd initialized and can write individual characters and strings to the lcd. Now I need to do something like this:

var = 250;<br>
`lcd_write_string`("MyVar has value: " + var);<br>
so the lcd should show "MyVar has value: 250"<br>

First of all how should I concatenate a var and a string?
second, the variable var contains an 8 bit binary number (0-255 in decimal). If var = 23; the 8 bit number has to be split into 2 to represent the 2 and the 3 in ascii to then be shown by the lcd. how can I do this? It seems I have to do base 10 conversions or a if tree to split all 2 digit numbers to then be shown in the lcd. Is there an easier way around this?

thanks!


How to concatenate vars in c programmed pic?
===

I programming a 16f84a pic in hitech C to drive a hd44780 lcd. So far I've got the lcd initialized and can write individual characters and strings to the lcd. Now I need to do something like this:

var = 250;<br>
`lcd_write_string`("MyVar has value: " + var);<br>
so the lcd should show "MyVar has value: 250"<br>

First of all how should I concatenate a var and a string?
second, the variable var contains an 8 bit binary number (0-255 in decimal). If var = 23; the 8 bit number has to be split into 2 to represent the 2 and the 3 in ascii to then be shown by the lcd. how can I do this? It seems I have to do base 10 conversions or a if tree to split all 2 digit numbers to then be shown in the lcd. Is there an easier way around this?

thanks!

