Rtc seconds count not updating
There's basically a 1 second window, and where within that 1 second is uncertain. If you're displaying the time on a screen, you usually don't care.But if you're trying to measure higher-precision events, you have a couple of options to maintain accuracy: If you want the time with higher resolution, you have to go through a more complex Dance: you need to somehow combine the knowledge of when each 1-second interval begins, with a higher-resolution timebase.This is sort of like using a camera to take a picture of a clock: the time shown on the clock is changing, but a picture of the clock is constant.I have not found an RTC which allows you to capture the current time and keep it indefinitely.To recap: If we can't translate between formats, with the structured time format, we can't easily do interval arithmetic between instants.With the offset format, the things we can't easily do are slow operations.
The most well-known and commonly used epoch is the Unix epoch, or January 1, 1970, at midnight UTC.We recently started writing software to make use of a real-time clock IC, and found to our chagrin that the chip was missing a rather useful function, namely elapsed time in seconds since the standard epoch (January 1, 1970, midnight UTC). A real-time clock/calendar (RTC) is a micropower chip that has an oscillator on it that keeps counting time, independent of main system power.Usually this is done with a lithium battery that can power the RTC for years, so that even when the rest of the system is powered down, there is still an accurate time reference. One part from that era was the Motorola MC146818, which is no longer manufactured, although you can still look at the datasheet on Freescale's website.The basic idea is this: You hook up a crystal oscillator that has a frequency such that 1 second is exactly 2 cycles for some value of N.The MC146818, for example, takes 32.768k Hz crystals (N=15) as well as 1.048576MHz (N=20) or 4.194304MHz (N=24).