> HI, >=20 > I have the RTCC on my PIC32 running and all is well but I need to conver= t from > POSIX to BCD to set the RTCC and from BDC to POSIX to TimeStamp out bound= data > packets. As this would be a frequent requirement for most systems that ar= e > communicating with networked devices I was surprised that PLIB has no fun= ctions to > convert between POSIX TIME format and BCD. >=20 > Have I overlooked something (I often do with Microchip Documentation) or = has any one > else created such functions and willing to share? >=20 > I am not a LINIX or PC person so have never worked with POSIX TIME format= .. From what > I can find in Google it is a 64Bit Int that counts seconds from midnight = on the 1st > Jan 1979. The PIC32 RTCC counts from 1st Jan 2000, so I need to add or su= btract an > offset in seconds and do the BCD conversions, But how are leap years cate= red for in > that calculation? >=20 > If no one has code for this I would really appreciate some pointers to he= lp me > create the functions. Microchip came out with an app note recently on converting between their RT= C chip and Linux time. Look at http://ww1.microchip.com/downloads/en/AppNotes/01412A.pdf for furth= er info. --=20 Scanned by iCritical. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .