Don't know if this can help but this is what I use to go back and forth between a ds1302, a pic, a Siteplayer and an LCD.
Hope it helps.Code:k = rtcmin : gosub h2d : decmin = k 'or k = rtchr, rtcsec, etc... '((((((((((((((((((((((((((((((((((((((())))))))))))))))))))))))))))))))))))))) 'Subroutine to convert from Hex to Dec '((((((((((((((((((((((((((((((((((((((())))))))))))))))))))))))))))))))))))))) h2d: ' Convert Hex coded time data -> decimal data K = (K & $F )+((K>>4)*10) Return k = decmin : gosub d2h : rtcmin = k 'or k=dechr, decsec,etc.. '((((((((((((((((((((((((((((((((((((((())))))))))))))))))))))))))))))))))))))) 'Subroutine to convert from Dec to Hex '((((((((((((((((((((((((((((((((((((((())))))))))))))))))))))))))))))))))))))) d2h: ' Convert Decimal -> Hex coded time data K = (K DIG 1) * $10 + (K DIG 0) Return


He boasts it takes only 33 cycles in all to complete, which I consider fantastic compared to any of the alternatives I can possibly write in BASIC Pro (after it converts into Assembler).

Bookmarks