NXP Semiconductors PCA8565, PCF85x3, PCF2123 References, Wrong time and date, wrong clock speed

Page 50

NXP Semiconductors

UM10301

 

User Manual PCF85x3, PCA8565 and PCF2123, PCA2125

19.4 Wrong time and date, wrong clock speed

When writing into the RTC registers care has to be taken that only valid values are written. For example, seconds only should go to 59, but it is possible to write for example 61 into the seconds register. Care needs to be taken that the software routines convert correctly to the BCD values used in the RTC. If a wrong value is written, at some point the register will return to a valid value, but then still the time indicated will not be correct, since the initial write was wrong.

If the clock is running too fast, usually the cause is spurious signals from other parts of the application that somehow couple into the oscillator signal and are interpreted as additional clock signals. As indicated in the parabolic curve of Fig 7, the crystal frequency will reduce if temperature decreases or increases with respect to the turn over temperature. Assuming that the load capacitance fits the crystal selected, the oscillator will run at 32.768 kHz and can only run slower under influence of temperature.

Refer to Chapter 14 “PCB layout guidelines” to avoid the problem of spurious signals coupling into the oscillator.

If the RTC runs too slow (or it appears to loose time) make sure that read and write operations are finalized within 1 second of initiating them. Refer to Chapter 18 “Timing requirements for I2C read and write”.

20. References

The documents below provide further useful information.

1.Product data sheets of all real time clocks for which this manual is valid.

2.AN10716_1; Background information and theory related to Real Time Clocks and crystals.

3.AN10652_1; Improved timekeeping accuracy with PCF8563 using external temperature sensor. Rev 1, 2 November 2007.

4.UM10204_3; I2C-bus specification and user manual. Rev 3, 19 June 2007.

5.Paper “An improved low power crystal oscillator”, Werner Thommen, EESCIR’99, Duisburg, Sept. 1999, pp. 146-149.

6.Epson Toyocom, Crystal Devices Catalogue “The crystal master”, 2007.

7.Micro Crystal, Product Catalog Quartz Crystals 2008.

UM10301_1

 

© NXP B.V. 2008. All rights reserved.

User manual

Rev. 01 — 23 December 2008

50 of 52

Image 50
Contents Abstract Info Content KeywordsDocument information Revision history Contact informationNXP Semiconductors Rev Date DescriptionIntroduction Features Register overview PCF8563 Address Register name BitEvent counter mode ComparisonFeatures Comparison of six real time clocksVoltage-low detector Power-on reset PORPower-on reset Oscillator-stop detection OscillatorVoltage-low detection Pierce Oscillator equivalent diagram Overview of internal and external oscillator capacitorsOscillator frequency determining components UM10301 + C Typical values for crystal and surrounding capacitors Parameter Value Unit SourceUsing an external oscillator Oscillation allowanceCrystal and crystal selection Effect of temperature Modes which don’t work− f nom Capacitors and capacitor selection Accuracy Influences on time accuracy Oscillator tuning Oscillator tuning 10.1 PCF2123 Offset register Year and leap year tracking Century and leap year, Daylight Saving TimeCentury tracking Daylight Saving Time DSTBlock Diagram PCF8563 Initialization and setting of alarm and timerInitialization of the RTC and setting the time Binary BCD AlarmSetting the alarm Register Comments AddressAlarm function Register Setting the timerSetting the timer Backup power supply Lithium Primary cellsBackup circuit using primary lithium cell Backup circuit using secondary cell NiCd or NiMH NiCd and NiMH secondary batteries13.3 Capacitors Charging the backup capacitor 1N4148 Diode selectionSome suggestions for diode D1 BAS716 BAS116 BAV170PCB layout guidelines PCB layout proposal for PCF8563 using leaded components Partial circuit switch down Hints to keep power consumption low Protection diodes0007 8473 ⋅ C b Rpmax as a function of bus capacitanceApplication diagram 1, I2C-bus interface Application diagram 2, SPI interfaceTimer Source clock frequency Delay for n = First period inaccuracy when using the timerTimer delays General countdown timer behaviourFirst period delay for timer counter value n Timer source clock Minimum timer period Maximum timer periodTiming requirements for I2C read and write Block diagram I2C interface and Time counters I2C interfaceSequence of events example Read Troubleshooting Oscillator startup time Checking for oscillationNo communication via I2C-bus References Wrong time and date, wrong clock speedDisclaimers Legal informationDefinitions TrademarksContents