Hi! BCD stands for binary coded decimal. ASCII code of numbers from 0-9 is just number + 48. I presume readout from RTC comes in a format like this: hi nibble holds tens and low nibble holds ones of clock.So what you want to do is this: result in BCD from RTC is in w: ;TENS movwf TEMP ;store result somewhere swapf TEMP, w ;reverse nibbles in w andlw 00001111b ;mask ones nibble. You have binary value of tens in w now. addlw .48 ;add 48 decimal and you have ASCII value of tens now. Here you have two options: you can either display it ;or store it somewhere and display the lot later. ;ONES movf TEMP, w ;get readout once again andlw 00001111b ;mask tens nibble.You have binary value of ones in w now. addlw .48 ;convert to ASCII store, display, erase, whatever Regards, Samo > Hi all, > > I'm working on a project using an 16F877, a DS1307 rtc and an LCD. The > problem I am having is getting the rtc data displayed correctly on the LCD. > > the Ds1307 data is in BCD format, and doesn't want to easily be displayed. > I'm sure someone out there has done this before. I'm just looking for > suggestions. > > Thanks, > > Jim Monteith > > -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.