WEBB,TIM (A-Sonoma,ex1) wrote: > Actually, I am taking a binary number from 0 - 255 and I want to > display it in decimal on an LCD Display. > > That means that I will have to calculate each of the three numbers and > then add 0x30 to convert them to ASCII. Tim: From my web page, at: http://home.netcom.com/~fastfwd/answers.html#PIC00008 LIST R=DEC ASCIIO EQU .... ;A FILE REGISTER. ASCIIT EQU .... ;ANOTHER FILE REGISTER. ASCIIH EQU .... ;ANOTHER FILE REGISTER. ; ENTER WITH ORIGINAL 8-BIT VALUE IN "ASCIIO". EXITS WITH ASCII ; REPRESENTATION OF ONES' DIGIT IN "ASCIIO", TENS' DIGIT IN ;"ASCIIT", AND HUNDREDS' DIGIT IN "ASCIIH". CONVRT MOVLW '0' MOVWF ASCIIH MOVWF ASCIIT DO100S MOVLW 100 SUBWF ASCIIO,W BNC DO10S MOVWF ASCIIO INCF ASCIIH GOTO DO100S DO10S MOVLW 10 SUBWF ASCIIO,W BNC ADJUST MOVWF ASCIIO INCF ASCIIT GOTO DO10S ADJUST MOVLW '0' ADDWF ASCIIO -Andy === Andrew Warren -- aiw@cypress.com === Principal Design Engineer === Cypress Semiconductor Corporation === === Opinions expressed above do not === necessarily represent those of === Cypress Semiconductor Corporation -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu