> > Thinking about this: how do you make sure the independent
> > reading/setting of vars results in a consistent set of date? E.g. at
> > 13:59, you read the hours (13) and before you can read the minutes,
> > the clock is incremented to 14:00 so you read 00 with 13:00 as a
> > result.
>
> This is a really good question.  I'm hoping some of the more
> experienced programmers may be able to chime in here.  The hours,
> minutes, and seconds are all retrieved from different read cycles
> because they are stored in separate registers on the rtc.  There
> really isn't any way to read them all at the _exact_ same time.  As
> for setting the clock, there is a way to stop the rtc oscillator by
> setting the oscillator stop bit (bit 7 in the SECONDS register).
> Maybe set the osc stop bit before writing the time and then clearing
> it when finished would suffice?

Maybe just do a 2nd read to check that the time is what was expected.

Matt.

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to