Hello everyone.
While trying to figure out something new for a clock I'm building
(including firmware), I spent some time reading all chapters of Maxim's
DS3231 RTC chip datasheet. So I met a useful and often forgotten register
(from ds3231 datasheet):

*Control/Status Register (0Fh)*
*Bit 7: Oscillator Stop Flag (OSF). *
A  logic  1  in  this  bit indicates  that  the  oscillator  either  is
stopped  or  was stopped for some period and may be used to judge the
validity of the timekeeping data. This bit is set to logic 1 any  time
that  the  oscillator  stops.  The  following  are examples  of
conditions  that  can  cause  the  OSF  bit  to be set:

   1. The first time power is applied.
   2. The  voltages  present  on  both  VCC and  VBAT are insufficient to
   support oscillation.
   3. The EOSC bit is turned off in battery-backed mode.
   4. External  influences  on  the  crystal  (i.e.,  noise,  leak-age,
   etc.).

This bit remains at logic 1 until written to logic 0

Most Arduino libraries do not handle it but it can provide useful
information in case there's something wrong with the i2c clock data. Not
too precise but at least you have a hint to start troubleshooting from the
RTC.

I would reset OSF every time the user sets the time and read its status
periodically. Then display something unusual if it is set.

The tubes I am using have both decimal points, so they can be used to
display something useful.

Now that I think of it, having 4 Nixies therefore 8 decimal points, I can
display binary data too!

I hope I was not the only one not using this flag :) (amongst those clock
builders that do not use GPS or NTP).
Paolo

-- 
You received this message because you are subscribed to the Google Groups 
"neonixie-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send an email to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/neonixie-l/CABj2VaYig0odp8KCF_G2hpE2gUBnR2kvDYo0vxXyXqjz_Uke7A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to