juha tuomi wrote: > Hi ! > I have a little problem. I should convert a 16 bit value to > ASCII-characters. > 2 bytes -> '9' '9' '9' '9' four separate ASCII-chars. > The 16 bit value can not be greater than 9999, so 4 digits will be enough. > Do you have any solution? It is not clear if your 16 bits value is in hexadecimal or already in decimal. According to your text about that the 16 bits value can not be greater than 9999, it looks like it is in bcd (binary coded decimal), is that right? If it is in decimal, well, just a nibble separation to the right, AND 0Fh, OR 30h, you get the ascii code for the digit. if it is in hexadecimal, it is all wrong, first because 9999h (39321 decimal) will not fit in only 4 decimal digits. Wagner