I use this, works fine. Written by Scott Dattalo. Step through it to see how it does what it does ;================================================ ; Convert 8-bit data to ASCII for LCD ;================================================ ; http://www.piclist.com/techref/microchip/math/radix/b2a-16b5a-rl.htm ; ; binary_to_bcd - 8-bits ; ; Input with 8-bit binary number in "temp" ; A1*16+A0 ; ; Output ; ; d100 - hundreds digit of the BCD conversion ; d011 - tens and ones digits of the BCD conversion bin2bcd clrf d100 ;hundreds store swapf temp,w ;w = A0*16+A1 addwf temp,w ;w = A0+A1 andlw b'00001111' ;w = A0+A1 % 16 skpndc ;if A0+A1 > 16 addlw 0x16 ; w += 16 skpndc ;if w % 16 > 10 addlw 0x06 ; w += 6 addlw 0x06 ;w += 6 skpdc ;if w < 10 addlw -0x06 ; w -= 6 btfsc temp,4 addlw 0x16 - 1 + 0x6 skpdc addlw -0x06 btfsc temp,5 addlw 0x30 btfsc temp,6 addlw 0x60 btfsc temp,7 addlw 0x20 addlw 0x60 rlf d100,f btfss d100,w addlw -0x60 movwf d011 btfsc temp,7 incf d100,f movf d100,w movwf d100 swapf d011,w ;separate 10s andlw 0x0f movwf d010 movlw 0x0f ;separate 1s andwf d011,w movwf d011 ;add 0x30 to d100, d011 and d010 to convert to ASCII movlw 0x30 addwf d100,f addwf d010,f addwf d011,f -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics