PDA

View Full Version : Conversion problem



NavMicroSystems
- 1st March 2004, 13:05
I would like to use a 1Wire RTC-Chip on one of my projects.

The real-time clock is a 5-Byte binary counter.
It is incremented 256 times per second.
The least significant Byte is a count of fractional seconds.
The upper 4 Bytes are a count of seconds.

Time/date is represented by the number of seconds since a reference point,
which is determined by the user.
For example, 12:00 A.M., January 1, 2000 could be a reference point.

I don't need the count of fractional seconds, so the least significant byte can be ignored.

Do you have some hints how to convert the binary reading to date and time (and back)
using the integer brain of a PIC?

NavMicroSystems
- 3rd March 2004, 19:11
Does really nonone have any ideas to solve this ?