I'm using the 7940N and I'm having trouble with calibration. I've set the SQWE and the RS bits to put out the clock frequency and I get 32.7697KHz on my frequency counter which is just slightly fast. By my calculations, I need to remove 102 counts per minute from the clock since 1.7Hz * 60 sec/min = 102. Since each CAL count is worth 2 clocks, I would normally set the CAL register (0x08) to 0x80 | 51. This should subtract 102 clocks per minute and give me a well calibrated time keeper.
However, setting CAL to any value seems to have no effect ... on the frequency out of the MF pin or in the time kept, still too fast. I'm setting the CAL when the clock is running and I'm wondering if perhaps CAL has to be set with the RTC in stop mode. This isn't mentioned in the datasheet. Does anyone know if this is the case ... RTC stop to load CAL? For example, is the CAL value not pulled in from the register until run changes state?
I know CAL is getting set to the value as I can read it back as well as any of the other RTC register addresses over I2C.