Wagner and others, Sorry that my question was not accurate. I have 16-bit value from timer3 (PIC17C43). It can be something between 1Eh...1700h. Lets say 0...270Fh for sure. I have to convert that value to ascii-numbers, because the value will be displayed with a LCD module (that needs ascii-characters, of course) and will be transmitted to a pc (RS232). I have 4 digits for display and transmit. So, the 16-bit value needs to be converted to four ascii-numbers. The timer value can't be greater than 270Fh, that's 9999 in ascii. This is the conversion I need! Thanks in advance Juha