> I am also able to output information and text onto an LCD > screen. What I would ideally like to do is display the a/d > conversion stored in value on the LCD screen. Can anyone > recommend a quick and easy way to do this. Here's a little snippet where I did exactly that: -------------------------------- BINARY_TO_BCD movwf BCD_TEMP ; save our number movlw 8 movwf BCD_COUNTER ; load counter w/8 (8bit #) clrf TENS ; zero out TENS clrf ONES ; zero out ONES BCDLOOP BCD_TENS_TEST ; if TENS digit is >= 5, add 3 movlw 5 subwf TENS,w btfss STATUS,C ; if TENS < 5 goto BCD_ONES_TEST ; goto next test movlw 3 ; otherwise add 3 addwf TENS,f BCD_ONES_TEST ; if ONES digit is >= 5, add 3 movlw 5 subwf ONES,w btfss STATUS,C ; if ONES < 5 goto BCD_SHIFT ; goto shift section movlw 3 ; otherwise add 3 addwf ONES,f BCD_SHIFT ; shift left all the way through rlf TENS,f ; shift TENS left rlf ONES,f ; shift ONES left btfss ONES,4 ; check for shift-out bit goto BCD_TEMP_SHIFT ; if nothing, move on movlw 1 ; otherwise add 1 to TENS addwf TENS,f BCD_TEMP_SHIFT rlf BCD_TEMP,f ; shift the value left btfss STATUS,C ; if there's no carryout goto BCD_SHIFTDONE ; move on movlw 1 ; otherwise add 1 to ONES addwf ONES,f BCD_SHIFTDONE movlw 0x0F ; we only need lower nybble andwf ONES,f ; mask out dead bits andwf TENS,f ; mask out dead bits decfsz BCD_COUNTER,f ; decrement BCD_COUNTER goto BCDLOOP ; if !=0 goto BCDLOOP return ; otherwise we should be done LCD_OUT_TEMPS movf TENS,w ; load value addlw 48 ; shift it to its ASCII value call LCD_OUT_DATA ; spit it out movf ONES,w ; load value addlw 48 ; shift it to its ASCII value call LCD_OUT_DATA ; spit her out too return --------------------------------- Not sure if you're familiar w/reading assembly, but the comments should be enough to explain the algorithm. I found it on some university class' web site for bin -> bcd conversion, then a simple addition of '0' to the number will give it the ascii value for output. If anything, doing it in C should be easier. :) This isn't exactly optimal either, but it works perfectly. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads