UM10760 User manual for the I²C-bus RTC PCF8523

UM10760
User manual for the I²C-bus RTC PCF8523 demo board
OM13511
Rev. 1 — 2 February 2015
User manual
Document information
Info
Content
Keywords
Abstract
PCF8523, OM13511, ultra-low power, evaluation, demo board, how to
get started, I2C-bus, RTC, Real-Time Clock, tuning, time stamp, battery
switch, watch-dog, timer
User manual for the RTC I2C-bus demo board OM13511 which contains
the RTC PCF8523
UM10760
NXP Semiconductors
RTC PCF8523 evaluation board OM13511
Revision history
Rev
Date
Description
v.1
First revision
20150202
Contact information
For more information, please visit: http://www.nxp.com
For sales office addresses, please send an email to: [email protected]
UM10760
User manual
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 2 February 2015
© NXP B.V. 2015. All rights reserved.
2 of 13
UM10760
NXP Semiconductors
RTC PCF8523 evaluation board OM13511
1. Introduction
The PCF8523 is a real-time clock based on an ultra-low power oscillator and using an
I2C-bus for interfacing. The OM13511 is the ideal evaluation/demo board to use during
the design phase of any project, just power and I2C-bus must be connected. If an SPIbus would be the preferred interface, the PCF2123 with demo board OM13512 could be
used for evaluation.
2. Key features
2.1 Demo board OM13511
The RTC PCF8523TS with I2C-bus is mounted together with a quartz crystal, a coin cell
lithium battery and the decoupling capacitors to buffer the supply voltage. All signals are
accessible on a row of pins, overcoming the need to build a test printed-circuit board
before the circuit can be evaluated or the functionality being tested together with the final
application.
Fig 1.
OM13511 demo board
2.2 Real-time clock PCF8523
The PCF8523
• Has an ultra-low power consumption
• Provides time and calendar from seconds to years
UM10760
User manual
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 2 February 2015
© NXP B.V. 2015. All rights reserved.
3 of 13
UM10760
NXP Semiconductors
RTC PCF8523 evaluation board OM13511
• Accuracy is based on a 32.768 kHz quartz crystal
• Clock operating voltage: 1.0 V to 5.5 V
• Low backup current: typical 150 nA at VDD = 3.0 V and Tamb = 25 °C
• 2-line bidirectional 1 MHz Fast-mode Plus (Fm+) I2C interface, slave address: read
D1h, write D0h
• Battery backup input pin and switch-over circuit
• Freely programmable timer and alarm with interrupt capability
• Integrated oscillator load capacitors, programmable for quartz crystals with CL = 7 pF
or CL = 12.5 pF
• Programmable offset register for frequency adjustment
• Internal Power-On Reset (POR)
Fig 2.
3.
Block diagram PCF8523
Hardware setup
3.1 General requirement for the PCF8523
The RTC circuit just requires one external part: the tuning fork quartz crystal as
resonator. The oscillation capacitors are integrated and therefore there is no need for
external load capacitors. The quartz crystal must be placed close to the RTC circuit,
avoiding long lines, which may pick up noise. Any tracks with high frequency signals (fast
edges) close to the RTC, quartz crystal, or quartz interconnect should be avoided.
UM10760
User manual
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 2 February 2015
© NXP B.V. 2015. All rights reserved.
4 of 13
UM10760
NXP Semiconductors
RTC PCF8523 evaluation board OM13511
The I2C-bus interface works up to 1 MHz. Supply voltage: 1.8 V to 5.5 V. The RTC,
excluding the I2C-bus interface, however is operating down to as low as 1.0 V. It is
recommended to have a decoupling capacitor of 100 nF on the VDD-VSS rails close by.
Due to the low power consumption of below 1 μW, no precautions for heat dissipations
are required, even in a sealed housing environment. Frequencies of 1 Hz to 32.768 kHz
on CLKOUT pin can be used to measure the frequency for calibration and/or for general
purpose, e.g. as reference for frequency generation with a PLL.
3.2 Battery back-up
To guarantee the autonomy of the clock, continuous supply of power is needed. The
battery backup assures it. Any type of battery can be used. The battery voltage might be
larger (Lithium) or smaller (Alkaline or silver oxide) than the regular supply voltage VDD.
To reduce the power consumption of the RTC the VDD voltage is sampled for taking the
decision when to switch over to the battery. To assure the supply voltage does not drop
below the minimal threshold, the falling slew rate of VDD must be max 0.5 V/ms. R1, C2
are selected therefore accordingly (10 kΩ, 1 µF).
3.3 Optimizing power consumption
There are a number of factors influencing the power consumption:
• Supply voltage: the lower the supply voltage the lower the power consumption
• Oscillator: the quartz crystal is specified with the series resistance RS and a load
capacitance CL. The PCF8523 can be set to accept quartz crystals with a CL of
12.5 pF or 7 pF. With lower capacitance, the power consumption is lower. 6 pF
quartz crystals can also be used but then the frequency must be adjusted slightly via
the offset register. The serial resistance of the quartz dissipates energy. The lower
RS, the less energy is used. General rule: the larger the mechanical size of the quartz
package, the lower is the impedance. Check the components’ parameters of the
preferred quartz crystal supplier.
UM10760
User manual
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 2 February 2015
© NXP B.V. 2015. All rights reserved.
5 of 13
UM10760
NXP Semiconductors
RTC PCF8523 evaluation board OM13511
4. Circuit diagram
4.1 Detailed circuit diagram
Fig 3.
Circuit diagram of the demo board
Connectors and features:
• The single in line connector P2 (100 mil pitch) is giving access to all pins for
integrating the RTC into the application.
• Connector P1 could be used for interfacing with the Fm+ development board
OM13320.
• Jumper JP1 allows measuring the current consumption; for this, the jumper has to be
removed and replaced by a µA meter.
• Jumper U1/PW is used to activate the back-up battery. If the battery is not needed,
VBAT must be connected to VDD. This is also the default position of the jumper for
delivery to avoid battery drain.
• Jumper JP2 and JP3 allow visualizing the interrupts by the LEDs INT1 and INT2 on
top of the board. They are powered through dedicated LED-PW pin 7 on P2. The
current through the LEDs is 3000 times higher than the needs of the RTC.
UM10760
User manual
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 2 February 2015
© NXP B.V. 2015. All rights reserved.
6 of 13
UM10760
NXP Semiconductors
RTC PCF8523 evaluation board OM13511
• Jumper JP4 links in a 10 kΩ pull-up resistor for the open-drain output in case that
there is none in the application.
• The RC delay circuit R1 and C2 (plus C3) are guaranteeing that the VDD at the RTC
is not falling too fast to hamper uninterrupted power supply to the RTC.
• The pull-up resistors, R5 and R6, for the I2C-bus are of 47 kΩ.
• Position of the jumpers and connectors are found in the circuit diagram in Fig 3 and
the layout drawing in Fig 4.
Fig 4.
Demo board and top side layout
5. Optional features for test and evaluation
5.1 Oscillator
The characteristics of the oscillator with different quartz crystals can easily be verified.
• Landing pads for different size of quartz crystal
• Landing pads to add load capacitances C4 and C5
• Resistor R4 (0 Ω) can be replaced to simulate variance of quartz RS tolerances. Total
impedance of maximum 100 kΩ is recommended
5.2 Experimental area
On the board, there is space for adding a custom circuitry for general purpose. VSS and
VDD are available for easy set-up.
UM10760
User manual
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 2 February 2015
© NXP B.V. 2015. All rights reserved.
7 of 13
UM10760
NXP Semiconductors
RTC PCF8523 evaluation board OM13511
6. Software
The actual time must be set after power-on. For this, straightforward I2C-bus instructions
are used.
6.1 Functionality
The RTC PCF8523 is controlled via standard I2C-bus interface. Common I2C protocol
applies. The interface features the Fast Mode+ I2C-bus, operating up to 1 MHz. There is
theoretically no lower speed limit, however the access of the RTC should be completed
within less than 1 second, otherwise time counter-increments could be lost. During
access, the time registers of the RTC are frozen and after the read or write, sequence is
completed, a second’s increment is executed if necessary.
The clock tracks the actual time from seconds to year. It must initially be set to the
correct time. The days per month and leap year are corrected automatically.
The RTC can be programmed to generate an interrupt every 30 seconds or every
60 seconds.
A general-purpose RAM byte to store temporary information is at address 03h.
6.2 Software instructions for setting the clock
6.2.1 Setting the time
Setting the clock to 3.45 PM, December 15, 2015:
• I2C-bus START condition
• Slave address D0h, i.e. write bit set to 0
• Register address 00h: address pointer to register Control_1
• Register Control_1, 08h: set 12-hour mode and selects option for 7 pF quartz crystal
• Register Control_2, 00h: no timers or watch dog initiated
• Register Control_1, 88h: activate interrupt to monitor battery switch-over
Setting the actual time and date
• Register Seconds, 00h: 0 Seconds (clock integrity ok, MSB OS = 0)
• Register Minutes, 45h: 45 min
• Register Hours, 23h: PM, 3 hours
• Register Days, 15h: 15th day of the month
• Register Weekdays, 02h: Tuesday (second day of the week)
• Register Months, 12h: December
• Register Years, 15h: (20)15
• I2C-bus STOP condition
UM10760
User manual
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 2 February 2015
© NXP B.V. 2015. All rights reserved.
8 of 13
UM10760
NXP Semiconductors
RTC PCF8523 evaluation board OM13511
6.2.2 Reading the clock
Example reading the clock (some 2 minutes after writing)
• I2C-bus START condition
• Slave address D0h, i.e. write bit set to 0
• Register address 03h: address pointer to forth byte (register Seconds)
• I2C-bus repeated START condition
• Slave address D1h read mode, i.e. write bit set to 1
Reading the time/date registers:
• Register Seconds: e.g. 56 Seconds (clock integrity ok, i.e. OS = 0)
• Register Minutes: e.g. 46 Minutes
• Register Hours: e.g. 03 (PM, 03h)
• Register Days: e.g.15 (15th)
• Register Weekdays: e.g. 02 (Tuesday)
• Register Months: e.g. 12 (December)
• Register Years: e.g. 14 ((20)14)
• I2C-bus STOP condition
6.3 Frequency tuning
The 32 kHz quartz crystals are typically sold with a tolerance of either ±10 ppm or
±20 ppm at room temperature.
Remark: 11.5 ppm corresponds to a deviation of 1 s/day.
The quartz crystals feature a characteristic load capacity of either 7 pF or 12.5 pF.
Oscillators, utilizing 7 pF quartz crystals, feature slightly lower power consumption, where
the quartz crystals of 12.5 pF have largest production quantities. The tracks between
quartz and RTC represent some parasitic capacitances as well and must be kept short.
The PCF8523 has a tuning facility where above tolerances can be compensated.
Tuning procedure:
• Measure the 32xxx Hz (f) signal at the CLKOUT pin.
• The offset is calculated in ppm as Δf [ppm] = 106 × (f - 32768) / 32768
• Consult the offset table in the data sheet. Take the correction value and write it into
the register 0Eh.
• The correction is done with inhibition or addition: the oscillator runs at constant
speed, then every 2 hours (mode 0) 1 second is corrected by making it shorter or
longer. This is not visible at the CLKOUT.
Corrections can also be applied every minute by using mode 1. This mode consumes
slightly more power (< 1 % more).
The 32 kHz quartz crystal is of the type tuning fork and features a parabolic frequency
UM10760
User manual
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 2 February 2015
© NXP B.V. 2015. All rights reserved.
9 of 13
UM10760
NXP Semiconductors
RTC PCF8523 evaluation board OM13511
response over temperature. When the application is dominantly used over a limited
temperature range, it is often helpful to tune the frequency to be slightly higher at the
turnover point. The error around 25 °C (clock goes too fast) is then compensated during
the time when temperature is lower or higher. For example, for operation between 5 °C
and 45 °C, tune the clock 8 ppm faster than the value for 25 °C would be. (See Fig 5.)
(1) Characteristic if tuned to 32.768 kHz at 25 ºC
(2) Characteristic if tuned with the positive offset Δfoff
Fig 5.
Frequency averaged over application temperature range 5 °C to 45 °C
7. Reference
UM10760
User manual
[1]
AN11247 – Improved timekeeping accuracy with PCF85063, PCF8523 and
PCF2123 using an external temperature sensor, Application Note
[2]
PCF8523 - Real-Time Clock (RTC) and calendar, Data Sheet
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 2 February 2015
© NXP B.V. 2015. All rights reserved.
10 of 13
UM10760
NXP Semiconductors
RTC PCF8523 evaluation board OM13511
8. Legal information
8.1 Definitions
Draft — The document is a draft version only. The content is still under
internal review and subject to formal approval, which may result in
modifications or additions. NXP Semiconductors does not give any
representations or warranties as to the accuracy or completeness of
information included herein and shall have no liability for the consequences
of use of such information.
8.2 Disclaimers
Limited warranty and liability — Information in this document is believed to
be accurate and reliable. However, NXP Semiconductors does not give any
representations or warranties, expressed or implied, as to the accuracy or
completeness of such information and shall have no liability for the
consequences of use of such information.
In no event shall NXP Semiconductors be liable for any indirect, incidental,
punitive, special or consequential damages (including - without limitation lost profits, lost savings, business interruption, costs related to the removal
or replacement of any products or rework charges) whether or not such
damages are based on tort (including negligence), warranty, breach of
contract or any other legal theory.
Notwithstanding any damages that customer might incur for any reason
whatsoever, NXP Semiconductors’ aggregate and cumulative liability
towards customer for the products described herein shall be limited in
accordance with the Terms and conditions of commercial sale of NXP
Semiconductors.
Right to make changes — NXP Semiconductors reserves the right to make
changes to information published in this document, including without
limitation specifications and product descriptions, at any time and without
notice. This document supersedes and replaces all information supplied prior
to the publication hereof.
Suitability for use — NXP Semiconductors products are not designed,
authorized or warranted to be suitable for use in life support, life-critical or
safety-critical systems or equipment, nor in applications where failure or
malfunction of an NXP Semiconductors product can reasonably be expected
to result in personal injury, death or severe property or environmental
damage. NXP Semiconductors accepts no liability for inclusion and/or use of
NXP Semiconductors products in such equipment or applications and
therefore such inclusion and/or use is at the customer’s own risk.
Applications — Applications that are described herein for any of these
products are for illustrative purposes only. NXP Semiconductors makes no
representation or warranty that such applications will be suitable for the
specified use without further testing or modification.
Customers are responsible for the design and operation of their applications
and products using NXP Semiconductors products, and NXP
Semiconductors accepts no liability for any assistance with applications or
UM10760
User manual
customer product design. It is customer’s sole responsibility to determine
whether the NXP Semiconductors product is suitable and fit for the
customer’s applications and products planned, as well as for the planned
application and use of customer’s third party customer(s). Customers should
provide appropriate design and operating safeguards to minimize the risks
associated with their applications and products.
NXP Semiconductors does not accept any liability related to any default,
damage, costs or problem which is based on any weakness or default in the
customer’s applications or products, or the application or use by customer’s
third party customer(s). Customer is responsible for doing all necessary
testing for the customer’s applications and products using NXP
Semiconductors products in order to avoid a default of the applications and
the products or of the application or use by customer’s third party
customer(s). NXP does not accept any liability in this respect.
Export control — This document as well as the item(s) described herein
may be subject to export control regulations. Export might require a prior
authorization from competent authorities.
Evaluation products — This product is provided on an “as is” and “with all
faults” basis for evaluation purposes only. NXP Semiconductors, its affiliates
and their suppliers expressly disclaim all warranties, whether express,
implied or statutory, including but not limited to the implied warranties of noninfringement, merchantability and fitness for a particular purpose. The entire
risk as to the quality, or arising out of the use or performance, of this product
remains with customer.
In no event shall NXP Semiconductors, its affiliates or their suppliers be
liable to customer for any special, indirect, consequential, punitive or
incidental damages (including without limitation damages for loss of
business, business interruption, loss of use, loss of data or information, and
the like) arising out the use of or inability to use the product, whether or not
based on tort (including negligence), strict liability, breach of contract, breach
of warranty or any other theory, even if advised of the possibility of such
damages.
Notwithstanding any damages that customer might incur for any reason
whatsoever (including without limitation, all damages referenced above and
all direct or general damages), the entire liability of NXP Semiconductors, its
affiliates and their suppliers and customer’s exclusive remedy for all of the
foregoing shall be limited to actual damages incurred by customer based on
reasonable reliance up to the greater of the amount actually paid by
customer for the product or five dollars (US$5.00). The foregoing limitations,
exclusions and disclaimers shall apply to the maximum extent permitted by
applicable law, even if any remedy fails of its essential purpose.
8.3 Trademarks
Notice: All referenced brands, product names, service names and
trademarks are property of their respective owners.
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 2 February 2015
© NXP B.V. 2015. All rights reserved.
11 of 13
UM10760
NXP Semiconductors
RTC PCF8523 evaluation board OM13511
9. List of figures
Fig 1.
Fig 2.
Fig 3.
Fig 4.
Fig 5.
OM13511 demo board ...................................... 3
Block diagram PCF8523 ................................... 4
Circuit diagram of the demo board .................... 6
Demo board and top side layout ....................... 7
Frequency averaged over application
temperature range 5 °C to 45 °C..................... 10
UM10760
User manual
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 2 February 2015
© NXP B.V. 2015. All rights reserved.
12 of 13
UM10760
NXP Semiconductors
RTC PCF8523 evaluation board OM13511
10. Contents
1.
2.
2.1
2.2
3.
3.1
3.2
3.3
4.
4.1
5.
5.1
5.2
6.
6.1
6.2
6.2.1
6.2.2
6.3
7.
8.
8.1
8.2
8.3
9.
10.
Introduction ......................................................... 3
Key features ......................................................... 3
Demo board OM13511 ....................................... 3
Real-time clock PCF8523................................... 3
Hardware setup ................................................... 4
General requirement for the PCF8523 ............... 4
Battery back-up .................................................. 5
Optimizing power consumption .......................... 5
Circuit diagram .................................................... 6
Detailed circuit diagram ...................................... 6
Optional features for test and evaluation .......... 7
Oscillator ............................................................ 7
Experimental area .............................................. 7
Software ............................................................... 8
Functionality ....................................................... 8
Software instructions for setting the clock .......... 8
Setting the time .................................................. 8
Reading the clock ............................................... 9
Frequency tuning ............................................... 9
Reference ........................................................... 10
Legal information .............................................. 11
Definitions ........................................................ 11
Disclaimers....................................................... 11
Trademarks ...................................................... 11
List of figures..................................................... 12
Contents ............................................................. 13
Please be aware that important notices concerning this document and the product(s)
described herein, have been included in the section 'Legal information'.
© NXP B.V. 2015.
All rights reserved.
For more information, please visit: http://www.nxp.com
For sales office addresses, please send an email to: [email protected]
Date of release: 2 February 2015
Document identifier: UM10760