There's been some discussion about using RTCs lately. Typically, they send/receive in packed BCD. Except for the year, which is 0-99, all of the other variables are within 0-64 BCD. After briefly searching the PICLIST archives, I couldn't really find any snippets that weren't overkill for this purpose, so I made my own. Most of them were 0-FF converted to/from BCD. These are more specific to RTC time conversion and have reduced instruction counts over the "standard" code fragments. If you convert your hours to 12-hour format instead of the 24-hour output format of the RTC, you can use the obvious: ; BCD conversion is limited to "Hours" values less than 16 movf Hours, 0 addlw 0x06 skpdc addlw -0x06 movwf Hours This can also be used for month and day of the week. For minutes, seconds, and date, you can use: ; BCD conversion is limited to "Minutes" values less than 64 clrw btfsc Minutes, 4 addlw 0x16 btfsc Minutes, 5 addlw 0x32 addlw 0x06 skpdc addlw -0x06 movwf Time_Temp movf Minutes, 0 andlw 0x0F addwf Time_Temp, 0 skpndc addlw 0x06 addlw 0x06 skpdc addlw -0x06 movwf Minutes --Andrew _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads