I am not sure I understand, but I will try anyways. Variable "decimaltemp" is a word which contains the ASCII representation of some number (e.g. 25). Is this correct? And you want to compare it to variable "TempC" which has the binary value of the temperature. Correct? If so, you need to convert the ASCII value in var "decimaltemp" to a binary value.

To convert a to digit ASCII word to a binary value, you need to subtract 48 from each byte.

this might work, I am sure others have way of doing it too.

<code>
DecimalTemp var word
BinaryTemp var word

BinaryTemp = (DecimalTemp.highbyte - 48)*10 + (DecimalTemp.lowbyte - 48)
</code>

Don