PCA8565 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2014. All rights reserved.
Product data sheet Rev. 4 — 5 December 2014 13 of 48
NXP Semiconductors
PCA8565
Real time clock/calendar
As an example, if the time (seconds through to hours) is set in one access and then in a
second access the date is set, it is possible that the time may increment between the two
accesses. A similar problem exists when reading. A roll over may occur between reads
thus giving the minutes from one moment and the hours from the next.
Recommended method for reading the time:
1. Send a START condition and the slave address for write (A2h).
2. Set the address pointer to registers Seconds (02h).
3. Send a RESTART condition or STOP followed by START.
4. Send the slave address for read (A3h).
5. Read the register Seconds.
6. Read the register Minutes.
7. Read the register Hours.
8. Read the register Days.
9. Read the register Weekdays.
10. Read the register Months_century.
11. Read the register Years.
12. Send a STOP condition.
8.6 Alarm registers
When one or more of the alarm registers are loaded with a valid minute, hour, day or
weekday and its corresponding bit alarm enable (AE_x) is logic 0, then that information is
compared with the actual minute, hour, day and weekday.
When all enabled comparisons first match, the Alarm Flag (AF) is set. AF will remain set
until cleared by command. Once AF has been cleared it is only set again when the
time increments to match the alarm condition once more. (For clearing the AF, see
Section 8.9.1.1 on page 18
.)
Alarm registers which have their bit AE_x at logic 1 are ignored.
Fig 6. Access time for read/write operations
WV
DDD
6/$9($''5(66 '$7$ 6723'$7$
67$57