Is it okay to read RTC continuosly?

I am building a Nixie tube clock with the Arduinix nixie driver shield. I am using a Chronodot RTC to keep time. Right now I have the code set to continuously check the RTC. Is this okay? Or is this bad for the RTC?

Yes. No.

Define "continuously". It seems a bit silly to read an RTC with one-second resolution a lot more frequently than that. A friend was doing that and his RTC was losing time. I forget how fast he was reading the RTC, but when he slowed things down it was OK. Our theory was that the RTC was so busy servicing the bus that it didn't have time to update its internal registers, but that is just a guess, so strictly anecdotal evidence. It might be an interesting experiment to try and re-create that situation.

An RTC shall not loose time when being read. Some RTCs loose a second when there is more than 1 second between starting I2C transaction and the finish of the I2C transaction (as the internal time counters increments are stopped when I2C bus is in action). Such RTCs include an 1bit register where a 1second transition, if any, is stored and processed afterwards (when the second tick occurred during I2C transaction). So unless "the act of reading via I2C" does not last for more than 1 second it is safe (for reading time and date from an I2C RTC you do not need more than 0.5msecs).

There is Time.h library however, which includes a mechanism, where the RTC is used for the syncing of the "system time" at specific periods only, ie. every 10minutes.

Some RTCs (and GPS modules) have a PPS or Pulse Per Second output pin. After reading the date/time from the RTC once at bootup, you can just count the passage of seconds from the PPS pin.

Other RTCs like the Chronodot have a 32kHz SQW output. You can count pulses from this pin (in an ISR to avoid missing pulses), and every 32,000th pulse, you know one second has passed.

EDIT: Looks like the Chronodot can also be placed in PPS mode: http://www.radekw.com/blog/2011/01/11/chronodot-sqw-and-arduino-interrupts/

tylernt:
Other RTCs like the Chronodot have a 32kHz SQW output. You can count pulses from this pin (in an ISR to avoid missing pulses), and every 32,000th pulse, you know one second has passed.

Actually every 32,768th pulse. Had me wondering for a minute if it really was 32kHz, not until p14 in the datasheet does it say otherwise!

[quote author=Jack Christensen link=topic=188817.msg1397755#msg1397755 date=1379607943]

tylernt: Other RTCs like the Chronodot have a 32kHz SQW output. You can count pulses from this pin (in an ISR to avoid missing pulses), and every 32,000th pulse, you know one second has passed.

Actually every 32,768th pulse. Had me wondering for a minute if it really was 32kHz, not until p14 in the datasheet does it say otherwise! [/quote]Sorry, I just Googled it and didn't delve too deeply. Guess you need to use an unsigned int too...

Forget the previous story about slowing an RTC down by reading it too often (like I said, it was anecdotal). I tried with a DS1307 and also with a DS3232 and after several hours, the time is still right on. The code below manages to read the RTC about 2170 times per second.

#include <DS1307RTC.h>        //http://playground.arduino.cc/Code/Time
#include <Streaming.h>        //http://arduiniana.org/libraries/streaming/
#include <Time.h>             //http://playground.arduino.cc/Code/Time
#include <Wire.h>             //http://arduino.cc/en/Reference/Wire

const int LED = 8;
const int RTC_ADDR = 0x68;

void setup(void)
{
    pinMode(LED, OUTPUT);
    Serial.begin(115200);
}

void loop(void)
{
    static uint8_t secLast;
    static unsigned int nReads;
    static boolean ledState;
    
    Wire.beginTransmission(RTC_ADDR);
    Wire.write(0);
    Wire.endTransmission();
    Wire.requestFrom(RTC_ADDR, 1);
    uint8_t sec = Wire.read();
    ++nReads;
    if (secLast != sec) {
        secLast = sec;
        printTime(RTC.get());
        digitalWrite(LED, ledState = !ledState);
        Serial << ' ' << nReads << endl;
        nReads = 0;
    }
}

//print date and time to Serial
void printDateTime(time_t t)
{
    printDate(t);
    Serial << ' ';
    printTime(t);
}

//print time to Serial
void printTime(time_t t)
{
    printI00(hour(t), ':');
    printI00(minute(t), ':');
    printI00(second(t), ' ');
}

//print date to Serial
void printDate(time_t t)
{
    printI00(day(t), 0);
    Serial << monthShortStr(month(t)) << _DEC(year(t));
}

//Print an integer in "00" format (with leading zero),
//followed by a delimiter character to Serial.
//Input value assumed to be between 0 and 99.
void printI00(int val, char delim)
{
    if (val < 10) Serial << '0';
    Serial << _DEC(val);
    if (delim > 0) Serial << delim;
    return;
}

I too have several loggers on the net that read the time from the RTC every time through the loop. I have no issues with accuracy just as others have mentioned. If you are worried about it, you could use the Time library. It does a time sync from the RTC periodically rather than every time through the loop. I also have a couple loggers running in this configuration, with no issues.

Wow, thanks for all the replies everybody. Yeah, I forgot to mention it is a Chronodot. I am reading now.hour() and now.minute() every time through the loop function using the RTClib library from adafruit. https://github.com/adafruit/RTClib