Ioanni,

i do write the following for me to understand.

i have the var TEMPIR which gives a value for example of 14450.

Then i do have an other VAR which is temperature.

If i devide
Code:
temperature = TEMPIR / 50
we get
Code:
289
.

then for getting the temp value we do
Code:
temperature = temperature - 273
, which gives to us 16. But we do not get the remainder value.

The remainder value is
Code:
Remainder = TEMPIR*2//100
, which the result is 9 for our example of 14450.

Now i have an LCD that requires a CS value to be added in a command.

Name:  command.png
Views: 1793
Size:  15.3 KB

Thats why i gosub to find and calculate the CS value of the overal command.

I think that i need somehow to calculate and convert the variable to string, ourside from the HSEROUT command.

Apparently the DEC5 didnt work.