NXP Semiconductors UM10301, PCF2123, PCF85x3, PCA8565, PCA2125 User Manual

UM10301
User Manual for NXP Real Time Clocks PCF85x3, PCA8565 and PCF2123, PCA2125
Rev. 01 — 23 December 2008 User manual
Document information
PCA2125, PCF2120, RTC, real time clock, timekeeping, crystal,
32.768 kHz, backup.
Abstract This application note aims to assist a user of above mentioned Real Time
Clocks in achieving succesful design-in and application. It contains useful hints with respect to electrical schematic and PCB layout as well as code examples for the well established NXP PCF8563 and related Real Time Clocks. Also the more recent Real Time Clocks PCF2123 and PCA2125 have been taken into account.
NXP Semiconductors
UM10301
User Manual PCF85x3, PCA8565 and PCF2123, PCA2125
Revision history
Rev Date Description
01 20081223 Initial version.
This application note / user manual is a complete update of a previous publication titled: “Application note for the Philips Real Time Clocks PCF8563,73,83,93” which did not have an official AN/UM number and is superseded by this document.
The contents were revised with lots of additional information added and errors in the examples corrected. Additionally it includes information with respect to recently introduced RTCs.
Contact information
For additional information, please visit: http://www.nxp.com
For sales office addresses, please send an email to: salesaddresses@nxp.com
UM10301_1 © NXP B.V. 2008. All rights reserved.
User manual Rev. 01 — 23 December 2008 2 of 52
NXP Semiconductors
User Manual PCF85x3, PCA8565 and PCF2123, PCA2125
UM10301

1. Introduction

The real time clocks from NXP (previously Philips Semiconductors) have a long tradition and are used in numerous application fields. Starting from applications like VCR, they have been used in a wide variety or products like burglar alarm systems, water sprinklers, (platform) timers, e-metering, time-and-attendance monitoring, building access control, Point-of-Sale terminals, industrial applications, cars and trucks, telecom applications such as mobile phones and in gaming machines. In those applications they are used for functions like keeping calendar time, tariff switching, watch-dog, time stamping or waking up a system periodically to initiate certain actions, for example making measurements.
This application note deals with the PCF85x3 family with focus on the PCF8563, and with the more recent additions to the NXP RTC portfolio PCF2123 and PCA2125. The PCF2123 is an extremely low power RTC which allows fine tuning of the clock using an offset register (electronic tuning). PCA2125 is targeted at automotive applications. Where appropriate, comparisons to other devices are made.
PCF2120 is a low power 32.768 kHz oscillator with two integrated oscillator capacitances and a CLKOUT pin (32.768 kHz only), but without time, date and configuration registers. This application note is valid for the PCF2120 as well, particulary information with respect to oscillator, crystal, crystal and capacitor selection and layout guidelines.
Chapters 2 and 3 describe the features of these RTCs and include a comparison of the various types. Starting from chapter 4 more technical details are described that need to be understood in order to achieve succesful application of these real time clocks. Chapters 4 and 5 deal with the power-on reset and voltage-low detection. Chapters 6 through 10 deal with the heart of the RTC; the oscillator, the crystal, crystal and capacitor selection, accuracy and oscillator tuning. Chapter 11 contains a description of how century change, leap years and daylight savings time is handled or needs to be handled in an application. This is followed by some examples in chapter 12 about how to initialize the RTC and how to set alarm and timer. Providing backup power when the rest of the system is not powered is covered in chapter 13. In order to make a reliable and accurate application it is important that the PCB layout is designed carefully and guidelines to achieve this are listed in chapter 14. This is followed by some further design tips in chapters 15 and 16 about partial circuit switch down and low power consumption.
Sometimes a component behaves different from what one may initially expect. This does not imply that it behaves wrongly, but in order to properly deal with it, it is important to be aware of such behavior. Chapter 17 describes how inaccurate timer performance can be avoided. Chapter 18 explains why the RTC will loose time if I operations are not finalized within one second of initiating it.
The application note is concluded with a short chapter on trouble shooting.
2
C and SPI read and write
UM10301_1 © NXP B.V. 2008. All rights reserved.
User manual Rev. 01 — 23 December 2008 3 of 52
NXP Semiconductors
UM10301
User Manual PCF85x3, PCA8565 and PCF2123, PCA2125

2. Features

The NXP real-time clock portfolio includes types for low power, types for automotive and other high temperature applications and applications that need additional RAM. A third family of highly accurate temperature compensated real time clocks will be dealt with in a separate application note. Designed for a range of demanding applications, these real­time clocks/calendars are driven by a low-power 32.768 kHz quartz oscillator, use the SPI or I
Key features
2
C-bus for serial data transfer, and typically consume less than 1 μW of power.
Oscillator requires 32.768 kHz external quartz crystal
Resolution: seconds, minutes, hours, weekday, day, month, and year in 12- or 24-
hour (military) format. All time and alarm registers are in BCD format. Two types include a 1/10
Clock operating voltage: 1.0 V to 5.5 V or wider, see
Low backup current: Ranging from 100 nA to 2 μA at V
Three line SPI with separate I/O or I
th
and 1/100th second resolution register
2
C serial interface
Table 2
= 1 V and T
DD
= 25 °C
amb
Freely programmable timer and alarm functions, each with interrupt capability
Freely programmable Watchdog timer
Programmable clock output for peripheral devices: 32.768 kHz, 1024 Hz, 32 Hz and
1 Hz (not all types)
One or two integrated oscillator capacitors (connected to the output of amplifier
OSCO in case of only one integrated capacitor)
Internal power-on reset
Open-drain interrupt pin
Wide variety of packages available including naked die
Addresses and data are transferred serially via an SPI bus with a maximum speed of 7.0 Mbps (PCF2123, PCA2125) or via a two-line, bidirectional I
2
C-bus that operates at a maximum speed of 400 kbps (Fast-Mode, PCF8563 and PCA8565) or 100 kbps (Standard-Mode, PCF8583 and PCF8593). The built-in word address register is incremented automatically after each data byte is written or read.
With the PCF8583, the address pin A0 is used to program the software address, so that two devices can be connected to the same I
2
C-bus without additional hardware.
Each RTC has an internal power-on reset and a programmable clock output with open drain configuration to drive peripheral devices. A low voltage detector (not included on the PCF8583,93 and PCA2125) warns if the integrity of all clock functions is no longer guaranteed.
Power consumption is kept to a minimum in all the devices. The PCF2123 and PCF8563, optimized for battery-powered applications, consume as little as 100 nA at 2V and 250 nA at 1V respectively. With careful selection of the crystal used, the PCF2123 consumes less than 100 nA on a 1.5 V supply.
The seconds, minutes, hours, days, weekdays, months, years as well as the minute alarm, hour alarm, day alarm and weekday alarm registers are all coded in Binary Coded Decimal (BCD) format. This format is popular with RTCs for the reason that time and date in BCD format can easily be displayed in human-readable style without conversion.
UM10301_1 © NXP B.V. 2008. All rights reserved.
User manual Rev. 01 — 23 December 2008 4 of 52
NXP Semiconductors
UM10301
User Manual PCF85x3, PCA8565 and PCF2123, PCA2125
In BCD every digit of the decimal system is represented by a 4-bit group. For example: 157
= 0001 0101 0111
10
BCD
This is not the same as binary representation. It is clear that BCD is not the most efficient way of coding since every 4-bit group (nibble) could represent numbers 0 through 15, but in BCD never represents numbers bigger than 9. But for some applications it is convenient to use BCD and real time clocks are one such application.
Each 8-bit register contains two digits each represented by one nibble. Each 4-bit nibble can represent the value of 0 up to 9 in BCD, but for some digits the maximum value to be represented will be lower. The minute register for example will never have to count higher than 59. The upper most digit can here be represented by 3 bits, freeing up one bit that can be used to indicate something else.
Not all NXP real-time clocks have exactly the same register implementation and thus the datasheet of the particular device should be consulted. As an example the register organization of the PCF8563 is given below. Note that this is just one example and that register organization of other types is not necessarily exactly the same.
Table 1. Register overview PCF8563
Bit positions labelled as x are not implemented. When setting a register, also a value must be written for the ‘x’ bit positions. When these are read back, the read back values may differ from what was previously written. Bit positions labelled with 0 should always be written with logic 0; if read they could be either logic 0 or logic 1.
Address Register name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
00
control / status 1 TEST1 0 STOP 0 TESTC 0 0 0
HEX
control / status 2 0 0 0 TI/TP AF TF AIE TIE
01
HEX
02
seconds VL <seconds 00 to 59 coded in BCD>
HEX
03
minutes x <minutes 00 to 59 coded in BCD>
HEX
04
hours x x <hours 00 to 23 coded in BCD>
HEX
05
days x x <days 01 to 31 coded in BCD>
HEX
06
weekdays x x x x x <weekdays 0 to 6>
HEX
07
months / century C x x <months 01 to 12 coded in BCD>
HEX
08
years <years 00 to 99 coded in BCD>
HEX
09
minute alarm AE <minute alarm 00 to 59 coded in BCD>
HEX
0A
hour alarm AE x <hour alarm 00 to 23 coded in BCD>
HEX
0B
day alarm AE x <day alarm 01 to 31 coded in BCD>
HEX
0C
weekday alarm AE x x x x <weekday alarm 0 to 6>
HEX
0D
CLKOUT control FE x x x x x FD1 FD0
HEX
0E
timer control TE x x x x x TD1 TD0
HEX
0F
timer <timer countdown value>
HEX
UM10301_1 © NXP B.V. 2008. All rights reserved.
User manual Rev. 01 — 23 December 2008 5 of 52
NXP Semiconductors
User Manual PCF85x3, PCA8565 and PCF2123, PCA2125
The PCA8565 and PCA2125 oscillators operate over a wider temperature range (up to 125 ºC) and are suitable for use in the harsh environments found within automobiles. Power consumption remains low — only 700 nA at 2 V. Serial interface is I
All the RTCs have ESD protection that exceeds 2000 V HBM per JESD22-A114, 200 V MM per JESD22-A115. Charge Device Model values vary from 500 V to 2000 V CDM per JESD22-C101. Refer to the datasheet of the respective device. Latch-up testing, performed in accordance with JEDEC Standard JESD78, exceeds 100 mA.
UM10301
2
C or SPI.

3. Comparison

Table 2 on the next page gives a quick overview of the features, specifications and differences between the RTCs dealt with in this User Manual. The PCF8573 which belongs to the PCF85x3 family is no longer in production and has thus not been included in the table. However, this user manual is useful for this type as well.
Further there are some derived types from the main types listed in the table with small differences in for example delivery form or the number of integrated oscillator capacitors. Consult NXP for more details.

3.1 Event counter mode

Two real time clocks, PCF8583 and PCF8593, have an extraordinary feature. It is the event counter mode which can be selected by setting the appropriate bits in the control register. In this mode the oscillator is disabled and the oscillator input is switched to a high impedance state. This mode can be used to count pulses applied to the oscillator input OSCI. There is no crystal in the circuit and OSCO is left open circuit. The event counter stores up to 6 digits of data. Events are stored in BCD format. The 6 digits use three 8 bit registers (hundredth of a second, seconds, and minutes). D5 is the most significant and D0 the least significant digit. Every digit can contain values ranging from 0 to 9 and thus up to 999 999 events can be stored.
It is also possible to set an event counter alarm. When this function is enabled, the alarm occurs when the event counter registers match the programmed value. In this event the alarm flag is set. The inverted value of this flag can be transferred to the interrupt pin by setting the alarm interrupt enable in the alarm control register. In this mode the timer increments once for every one, one hundred, ten thousand or 1 million events, depending on the programmed value of the alarm control register. In all other events, the timer functions are as in clock mode.
Note that immediately following power-on, all internal registers are undefined and must be defined by software. It is also possible that upon power-on the device is initially in event-counter mode in which event the oscillator will not operate until the correct settings are written into the control registers.
The count value will increment on the falling edge. However, after a new count value has been programmed at least one rising edge must have occurred before events will be detected on the falling edge.
UM10301_1 © NXP B.V. 2008. All rights reserved.
User manual Rev. 01 — 23 December 2008 6 of 52
NXP Semiconductors
UM10301
User Manual PCF85x3, PCA8565 and PCF2123, PCA2125
Table 2. Comparison of six real time clocks
PCx85x3 family PCx212x family Features
PCF8563 PCA8565 PCF8583 PCF8593 PCF2123 PCA2125
Unique features Very low
power consumption
2
Type of interface I
Interface bus speed 400 kHz 400 kHz 100 kHz 100 kHz 7 MHz 7 MHz
Scratch pad RAM no no 240 bytes no no no
Year / leap year tracking yes / yes yes / yes yes / yes yes / yes yes / yes yes / yes
Year counter
C I2C I2C I2C SPI SPI
2 digit + 1 century bit
AEC-Q100 automotive qualification
2 digit + 1 century bit
High resolution, RAM, event counter
2 bit (4 years)
High resolution, event counter
2 bit (4 years)
Extremely low power consumption, electronic tuning
2 digit (99 years)
AEC-Q100 automotive qualification
2 digit (99 years)
100 ms, 10 ms time register no no yes yes no no
Electronic tuning register no no no no yes no
Programmable alarm and timer functions
Low voltage detector yes yes no no yes no
Event counter mode no no yes yes no no
Option to select between two I2C addresses
Integrated oscillator capacitor 1 at OSCO 1 at OSCO 1 at OSCO 1 at OSCO 2 1 at OSCO
Supply voltage range 1.8 V – 5.5 V 1.8 V – 5.5 V 2.5 V – 6.0 V 2.5 V – 6.0 V 1.6 V – 5.5 V 1.6 V – 5.5 V
Clock operating voltage 1.0 V – 5.5 V 1.8 V – 5.5 V 1.0 V – 6.0 V 1.0 V – 6.0 V 1.1 V – 5.5 V 1.3 V – 5.5 V
Typical current consumption 250 nA at
Operating temperature range -40 °C to
AEC-Q100 qualified no Yes
Packages U
[1] Naked die
yes yes yes yes yes yes
no no yes no no no
VDD = 1 V
+85 °C
[1]
, DIP8, SO8, TSSOP8, HVSON10
650 nA at VDD = 3 V
-40 °C to +125 °C
(TSSOP8)
TSSOP8, HVSON10
2 μA at VDD = 1 V
-40 °C to +85 °C
no no no yes
[1]
U
, DIP8, SO8, HVQFN20
1 μA at VDD = 2 V
-40 °C to +85 °C
DIP8, SO8 U
100 nA at VDD = 2 V
-40 °C to +85 °C
HVQFN16, TSSOP14
550 nA at VDD = 3 V
-40 °C to +125 °C
[1]
,
TSSOP14
Some derived versions are available such as PCF8563A and PCA8565A which include two integrated oscillator capacitors and are also available as naked die.
UM10301_1 © NXP B.V. 2008. All rights reserved.
User manual Rev. 01 — 23 December 2008 7 of 52
NXP Semiconductors
UM10301
User Manual PCF85x3, PCA8565 and PCF2123, PCA2125

4. Power-on reset (POR)

Traditionally a power-on reset circuit is a circuit that generates a reset pulse once the supply voltage has reached a certain value upon power-up. The purpose is to ensure a defined behavior at start-up. This type of power-on reset is not present in these RTCs.
The power-on reset circuit (POR) for these RTCs does not look at the supply voltage, but instead it is based on an internal reset circuit which is active whenever the oscillator is stopped, refer to oscillator to start and during this time the circuit will generate a reset. Also when during operation the OSCI- or OSCO-pin is pulled to ground, causing oscillation to stop, the POR will generate a reset pulse. In the reset state the serial bus logic is initialized and all registers are reset according to the register reset values. Not all registers will be reset. The only registers that are reset are the ones that control a function i.e. decide on clock mode, enable an alarm etc. Refer to the datasheet of the respective device for details.
The power on reset duration is thus directly related to the crystal oscillator start-up time. Due to the long start-up times experienced by these types of circuits on-board testing of the device would take longer too. In order to speed up this, a mechanism has been built in to disable the POR (not for PCF8583, PCF8593 and PCF2123). This is called Power­on reset override. Again, refer to the respective datasheet for details. Once the override mode has been entered, the device stops immediately being reset and set-up operation e.g. entry into the external clock test mode, may commence via the serial interface.
Fig 1. When power is applied to the device it will take some time for the
V
DD
oscillation
internal
reset
Fig 1. Power-on reset

5. Voltage-low detector

PCF8563, PCA8565 and PCF2123 have an on-chip voltage-low detector, see Fig 2 and Fig 3. When VDD drops below a certain limit defined as V of PCF8563 and PCA8565 is set. Generally the VL-bit is intended to indicate that the time might be wrong, not that it necessarely is wrong. It will be set if one of the following four conditions occur:
The power has just been applied;
The power has dipped down and then recovered;
The power has gone away and then come back again;
When the oscillator stops running.
chip in reset
chip not in reset
t
001aaf897
, bit VL in the seconds register
low
UM10301_1 © NXP B.V. 2008. All rights reserved.
User manual Rev. 01 — 23 December 2008 8 of 52
NXP Semiconductors
UM10301
User Manual PCF85x3, PCA8565 and PCF2123, PCA2125
The implementation in the PCF2123 is slightly different. There a bit OS (Oscillator Stopped) is present instead of VL. The OS flag is set whenever the oscillator is stopped, and therefore also when this is due to the supply voltage dropping too low. The flag can only be cleared by software and only if the oscillator is running again.
V
DD
period of battery operation
V
low
VL set
(1) Valid for PCF8563 and PCA8565 (2) Valid for PCF2123
mgr887
normal power operation
t
Main supply
t
<OS>
V
OSC(MIN)
V
DD
Battery operation
Fig 2. Voltage-low detection Fig 3. Oscillator-stop detection
In the case of PCF8563/PCA8565 bit VL set indicates that the integrity of the clock information is no longer guaranteed. If the oscillator hasn’t stopped, the clock information will still be ok, but with V
having dropped below V
DD
there is no guarantee that this still
low
is the case because there is no way to be sure that the oscillator kept running. The VL flag can only be cleared by software.
Both VL and OS are intended to detect the situation when V example under battery operation. Should V
reach the limit where the flag is set before
DD
is decreasing slowly, for
DD
power is re-asserted, then the flag VL or OS will indicate that time may be (VL) or is (OS) corrupted. V
dropping below V
DD
low
or V
in itself does not cause any register to be
osc(min)
reset. Once the oscillator stops some registers will be reset.

6. Oscillator

A crystal oscillator as used in a real-time clock, see Fig 4, is built on the principle of Pierce and uses an inverting amplifier with a crystal in the feedback path and load capacitors C shift is contributed as a result of the amplifier’s non-zero output impedance in combination with C anti-resonant (i.e. parallel resonant) with the total capacitive load of the oscillating circuit as seen from the pins of the crystal. This total capacitance is called the load capacitance.
and C
IN
to provide the necessary additional phase shift. Some phase
OUT
. The oscillator operates at the frequency for which the crystal is
OUT
The load capacitance is defined as the capacitance seen from the pins of the crystal and is formed by C
, C
OUT
and C
IN
indicated in Fig 4. Electrically the crystal’s C0 is also a
STRAY
load capacitance which affects oscillator characteristics. However, it is not part of the defined ‘load capacitance’. During manufacturing the crystal is tuned to the specified frequency with a specified load capacitance connected to the crystal. Since C
is part of
0
the crystal, it is automatically taken into account during the adjustment procedure.
UM10301_1 © NXP B.V. 2008. All rights reserved.
User manual Rev. 01 — 23 December 2008 9 of 52
NXP Semiconductors
UM10301
User Manual PCF85x3, PCA8565 and PCF2123, PCA2125
C
is a result of parasitic capacitances due to PCB traces, IC pins etc. and is directly
STRAY
in parallel with C
of the crystal. In a practical situation care needs to be taken to keep
0
these parasitic capacitances as low as possible since it will add to the load capacitance and this load capacitance must meet the specified value for the crystal that is being used. If the load capacitance presented to a crystal is smaller than what the crystal was designed for, the oscillation frequency will be too high and thus if used with an RTC, the clock will run too fast.
RTC-IC
crystal
C
1
L
1
R
1
C
0
OSCOOSCI
C
L
C
stray
C
in
C
out
001aah846
Fig 4. Pierce Oscillator equivalent diagram
The inverting amplifier (with feedback resistor, and drive resistor which are not included in
Fig 4) is incorporated within the integrated circuit device. On the other hand, the quartz crystal is a discrete device external to the integrated circuit. In the PCF85x3, PCA8565 and PCF2123, PCA2125 the output capacitor C PCF8563A, PCA8565A and PCF2123 also include C
is integrated on the integrated circuit.
OUT
, see Table 3 for overview.
IN
Table 3. Overview of internal and external oscillator capacitors
PCx85x3 family PCx212x family Features
PCF8563 PCA8565 PCF8583 PCF8593 PCF2123 PCA2125
Integrated oscillator capacitor 1 at OSCO 1 at OSCO 1 at OSCO 1 at OSCO 2 1 at OSCO
Targeted crystal load capacitance 12.5 pF 12. 5 pF 12.5 pF 12. 5 pF 7 pF
[1]
12.5 pF
Value of integrated CIN, typ. - - 14 pF -
Value of integrated C
, typ. 25 pF 25 pF 40 pF 25 pF 14 pF 25 pF
OUT
Theoretically required at pin OSCI 25 pF 25 pF 18 pF 25 pF 0 pF 25 pF
[1] Can be used with 9 pF and 12.5 pF as well if external capacitance is added
UM10301_1 © NXP B.V. 2008. All rights reserved.
User manual Rev. 01 — 23 December 2008 10 of 52
NXP Semiconductors
UM10301
User Manual PCF85x3, PCA8565 and PCF2123, PCA2125
The values used in practice will be a bit smaller than the theoretically required values due to parasitic capacitances present in the application which add to the external physical capacitor.
For the PCF2123 the integrated C
and C
IN
are dimensioned for a crystal which
OUT
requires a load capacitance of 7 pF. If a crystal with required load capacitance of 12.5 pF is used still a small external capacitor is required, otherwise the clock will run too fast. For the other types the input capacitor C
is external and needs to be mounted on the
IN
printed circuit board. The power consumed by the oscillator circuit is through the amplifier and losses in R
of the crystal. Oscillation will start if the loop gain at 360° phase shift is
1
higher than one. The oscillator amplitude increases until the over-all loop gain is reduced to exactly 1 through either non linear effects of the amplifier (self limiting Pierce) or through some form of AGC (Automatic Gain Control) designed in into the amplifier.
The resonating frequency can be pulled by changing the value of the capacitor at OSCI or by adding a variable capacitor C
at OSCO as shown in Fig 5. External capacitors at
T
OSCI and OSCO should be connected to GND, except for PCF8573, PCF8583 and PCF8593. For the latter three it is better to connect these external capacitors to V
DD
instead because these devices are manufactured in a process that has the substrate connected to V
(n-substrate). In the other RTCs the substrate is at VSS (p-substrate).
DD
crystal
C
1
C
C
0
stray
R
1
OSCOOSCI
C
L
C
OUT
C
out
T
001aai727
(and CT if applicable) to VDD
L
1
C
in
(1) For PCF8573, PCF8583 and PCF8593 connect CIN and C
Fig 5. Oscillator frequency determining components
The reactive components indicated in
Fig 4 and Fig 5 determine the oscillating frequency. Near the resonance frequency the equivalent circuit of the crystal consists of the motional inductance L (in various literature also called series resistance R the static or shunt capacitance C
, the motional capacitance C1 and the motional resistance R1
1
). In parallel with this series circuit is
S
. It is the sum of the capacitance between the
0
electrodes and the capacitance added by the leads and mounting structure. If one were to measure the reactance of the crystal at a frequency far away from a resonance frequency, it is the reactance of this capacitance that would be measured.
When a crystal is chosen, such a crystal has a specified load capacitance C
. During
L
production the crystal manufacturer has adjusted the resonance frequency of the crystal using exactly this capacitance as the load for the crystal. The actual value of C
as seen
L
by the crystal in the application is determined by the external circuitry and parasitic
UM10301_1 © NXP B.V. 2008. All rights reserved.
User manual Rev. 01 — 23 December 2008 11 of 52
NXP Semiconductors
UM10301
User Manual PCF85x3, PCA8565 and PCF2123, PCA2125
capacitances. The external components of the oscillator have to be chosen such that the actual value of C
matches the specified value of CL. If there is mismatch the crystal will
L
not run exactly at its specified frequency resulting in the clock running slow or fast.
The crystal manufacturer can manufacture crystals for any load capacitance, but in practice some standard values are used. For use in real-time clocks you may find crystals specified for load capacitances of 7 pF, 9 pF and 12.5 pF with 12.5 pF the most common value.
(1) Frequency on the left scale and the equivalent deviation from the nominal frequency in ppm
on the right scale
Fig 6. Graph of oscillator frequency as function of load capacitance CL
Fig 6 depicts the influence of the load capacitance applied to the crystal on the oscillator frequency. The lower curve represents a crystal with a specified C curve represents a crystal with a specified C
of 12 pF. From this graph it is obvious that
L
the 7 pF crystal is more sensitive to deviations from the specified C
of 7 pF, the upper
L
. If the applied CL is 1
L
pF lower than specified, the frequency deviation will be 18 ppm, whereas the 12.5 pF crystal will only show a frequency deviation of 6 ppm if the applied C
is 1 pF below the
L
specified value. This is not surprising since the same absolute change in load capacitance is a larger relative change if the load capacitance is smaller. A lower load capacitance however will result in lower power consumption and in cases where this is an important requirement a crystal with lower required C
UM10301_1 © NXP B.V. 2008. All rights reserved.
User manual Rev. 01 — 23 December 2008 12 of 52
could be selected.
L
NXP Semiconductors
User Manual PCF85x3, PCA8565 and PCF2123, PCA2125
Now in order to determine the value of CL resulting from CIN, C and C effectively in series; the 32 kHz signal goes from OSCI through C to C
OUT
the remainder of this discussion, whenever in formulas C either the value of C C
OUT
C +
L
Since C L
1-C1-R1
C
it is necessary to realize that seen from the crystal, CIN and C
STRAY
and then through C
only, or in case a trimming capacitor CT is present too, the sum of
OUT
and CT. Now the load capacitance CL is given by:
CC
=
is in parallel with CL the total capacitance in parallel with the motional arm
0
is given by
PAR
OUTIN
CC
+
=
+
C
OUTIN
CC
OUTIN
CC
OUTIN
to OSCO. In parallel with this series circuit is C
OUT
STRAY
CC
++
STRAY
0
OUT
is written this represents
OUT
UM10301
(plus CT if mounted)
are
OUT
to ground, via ground
IN
. For
STRAY
The motional arm is a series circuit, which forms a closed circuit because there is a capacitance C can’t oscillate stand alone, but the equivalent capacitance C which determines together with L
the resulting resonance frequency is now given by the series circuit of C
1
C
. Thus C is given by
1
C
C
=
C
Typical values for crystal parameters are given in that C
is several orders of magnitudes smaller than the other capacitances in this
1
expression and therefore C will be a bit smaller as a result of C
=
ω
With
factor can be calculated.
connected in parallel to this series circuit. Of course the crystal itself
PAR
CC
+
1
LC
⎪ ⎨ ⎪
⎪ ⎨ ⎪
and
OUTIN
+
+
CC CC
CC
Q =
OUTIN
OUTIN
OUTIN
1
STRAY
STRAY
dominates. C will be in the order of magnitude of C1 but it
in series.
PAR
11
the resulting resonance frequency and quality
RC
ω
1
CC
++
01
CC
++
01
Table 4. From these values it is clear
PAR
and
Because C approximated by
Q
UM10301_1 © NXP B.V. 2008. All rights reserved.
User manual Rev. 01 — 23 December 2008 13 of 52
is orders of magnitude smaller than the other capacitances Q can be
1
11
=
a
ω
RC
11
NXP Semiconductors
User Manual PCF85x3, PCA8565 and PCF2123, PCA2125
Taking the numbers from Table 4 yields for L1 and Q:
L 11234
=
1
Q
=
This L of around 11000 H resulting in a Q of around 42000 explains why starting up the oscillator as well as stopping it can easily take more than a second. An oscillating quartz crystal is actually a mechanical oscillation and starting or stopping this takes time. Calculations of start up time and more in-depth theory about the oscillator and load capacitance are beyond the scope of this user manual, but can be found in AN10716 “Background information and theory related to Real Time Clocks and crystals”.
The use of AGC’s improve start up by high drive initially to get it going and then reduce drive for low power.
1
() ()
2
0
1
π
()
2
=
2
Cf
ππ
1
=
RCf
()
110
1
2
=
15
101.2327682
H
1
π
315
1055101.2327682
UM10301
42053
=
Table 4. Typical values for crystal and surrounding capacitors
Parameter Value Unit Source
f
0
±100 ppm [2]
f / f
0
Aging; f / f
B, freq(T) -0.035 ppm / °C2 [2]
C1 2.1 fF [2]
C0 1.2…1.5 pF [2]
CIN 25 ± 10 pF [1]
CIN, temp co. +47 ppm/°C [1]
R1 50…80 k [2]
CT variable 4…25 pF [3]
CT, temp co. 300 ppm/°C [3]
CT fixed 0603 Any pF [4]
CT fixed, tc ±30 for C0G ppm/°C [4]
0
32768 Hz [2]
±3…±5 ppm [2]
Sources for values in table 4:
[1] NXP, Datasheet PCF8563, February 2008.
[2] Product Data Sheets, MicroCrystal.
[3] Murata TZB04 trim capacitor
[4] Vishay Beyschlag, datasheet ceramic multilayer capacitor, C0G
UM10301_1 © NXP B.V. 2008. All rights reserved.
User manual Rev. 01 — 23 December 2008 14 of 52
NXP Semiconductors
UM10301
User Manual PCF85x3, PCA8565 and PCF2123, PCA2125

6.1 Oscillation allowance

Fig 4 shows the Pierce oscillator schematic with the external crystal. For an oscillation to take place the real component of the oscillator impedance has to be larger than the motional resistance R take place since no operating point can be reached.
Similarly, if the supply voltage is too low or the temperature is too low, no oscillation can build up.
A method to test how much margin the design has is to include a resistor R with the crystal. The value of the resistor is changed (a trimmer is useful here) to see at which values of R resistance is lowered until oscillation starts. This value of R value is increased again until oscillation stops, R
The oscillation allowance OA is defined as:
OA = R
X-start
+ R1
(sometimes called RS or ESR). If R1 is too large no oscillation will
1
in series
X
oscillation starts and stops. Starting from a large value of RX the
X
is called R
X
is called R
X
.
X-stop
X-start
. Now the
As a rule of thumb, the motional resistance of the crystal chosen should be
OA
R
1
5
This test can be done in the lab under room temperature. This should give enough safety margins to allow for production spread of IC and crystal and to deal with the increasing value of R
under influence of increased temperature.
1

6.2 Using an external oscillator

It is possible to supply a clock signal from an external oscillator instead of using the internal oscillator if for some reason it is desired to not use the internal oscillator. In this case no crystal will be connected to the OSCI and OSCO pins. Instead the external oscillator must be connected to OSCI while OSCO must be left floating.
The signal may swing from V amplitude at the oscillator input pin would be about 500 mV, swinging around a 250 mV bias i.e. never going negative (not for PCF8583 and PCF8593, see below). For the PCF85x3 supplying a signal with amplitude between 500 mV and 1000 mV is a good starting point, with the bias such that the signal doesn’t go negative and operates in the same region as would have been the case with a crystal. Square or sine wave is both ok. For the PCF2123 the amplitude should be somewhat smaller. If the oscillator amplitude is larger than the supply voltage to the RTC it is advisable to use a resistive divider for the oscillator signal to bring its amplitude within the supply voltage of the RTC. Without such a divider it will work too and nothing will be damaged (as long as the currents via the clamping diodes don’t exceed the maximum limits) because the device has internal clamping diodes from V
SS
performance will be better if the oscillator amplitude is brought within the range from 0 V to the actual V
used for the RTC. This will first prevent periodic currents flowing via the
DD
upper clamping diode to the decoupling capacitor on the supply pin. Secondly the signal
UM10301_1 © NXP B.V. 2008. All rights reserved.
User manual Rev. 01 — 23 December 2008 15 of 52
to VDD. However, with a crystal attached the signal
SS
to OSCI and from OSCI to VDD (not on PCF2123). However,
NXP Semiconductors
UM10301
User Manual PCF85x3, PCA8565 and PCF2123, PCA2125
levels can be tuned such that they are similar to those when the internal oscillator is used.
Suppose that the RTC is supplied with 3.3 V and that the amplitude of the external CLK is 5 V (from 0 V to 5 V). Using 1 M and 220 k resistors the signal could be reduced to (220 / 1220) x 5 V = 0.9 V. This is better in line with the signals that the internal circuitry handles when an external crystal is used as is the case in the standard application. This reduced signal can then be applied to the OSCI pin directly or via a small capacitor of e.g. 22 pF - 100 pF. This is a lower power option, where bias from the resistive devider and oscillator will be lost and will be determined by the oscillator input. This option is also more susceptible to noise.
If PCF8583 and PCF8593 are used together with a crystal, the signal would swing around a bias of some 100 mV below V it should be either AC coupled, or swinging with amplitude of around 1 V below V where the lower value may be lower than 1 V below V from (V
– 1 V) to VDD would be ok, but also swinging from VSS to VDD.
DD
. If these RTCs are fed with an external signal,
DD
DD
as well. For example, swinging
DD
,
Remark: Values mentioned here are guidelines only. For every application correct operation must be verified.

7. Crystal and crystal selection

Select a crystal of the tuning fork type with a nominal frequency of 215 Hz = 32768 Hz. The allowed tolerance depends on the requirements for the application and on whether a trimming capacitor will be used. If a trimming capacitor will be used even a tolerance of ±100 ppm is ok since it can be compensated. Either through hole or surface mount crystals can be used where the latter provide the smallest dimensions which makes the circuit less susceptible to noise pick up.
As previously pointed out crystals used for RTCs come in three versions, optimized for three standard values for C
12.5 pF crystal has a timekeeping current of about 1.6x more than an RTC using a 7 pF crystal. If lowest power consumption is a key consideration, a 7 pF crystal (some manufacturers use 6 pF) should be selected. The PCF2123 has been optimized for use with such a crystal. The other RTCs include load capacitance optimized for a 12.5 pF crystal. Using a 7 pF crystal would require an external capacitor of about 9.7 pF and thus the capacitances at OSCI and OSCO would not be balanced. In general this may have a detrimental influence on start-up behaviour but no problems are expected when a 7 pF crystal is used in combination with the PCF8563 because it uses an AGC in its oscillator.
An oscillator using a 12.5 pF crystal will be more stable and less susceptible to noise and parasitic capacitances. One reason for this is that the capacitors on the input and output will have higher values and therefore create a higher load for noise. Further these higher values make the parasitic capacitance relatively smaller for the same PCB.
with 12.5 pF the most common. Generally, an RTC using a
L
Besides technical considerations there are also procurement issues. Crystals designed for a 12.5 pF load capacitance are readily available through many distributors. Crystals designed for a load capacitance of 7 pF or 9 pF are not as readily available and may have longer lead times or require a minimum quantity to be purchased.
The series resistance R
should ideally remain below 50 k. If higher values are used
1
(up to 100 k is ok) the current consumption of the oscillator will increase a bit. If the
UM10301_1 © NXP B.V. 2008. All rights reserved.
User manual Rev. 01 — 23 December 2008 16 of 52
Loading...
+ 36 hidden pages