![NXP Semiconductors UM10301 PCA8565 Скачать руководство пользователя страница 27](http://html1.mh-extra.com/html/nxp-semiconductors/um10301-pca8565/um10301-pca8565_user-manual_1721664027.webp)
NXP Semiconductors
UM10301
User Manual for PCF85x3, PCF85x63, PCA8565, PCF2123, and
PCA21125
UM10301
All information provided in this document is subject to legal disclaimers.
© NXP Semiconductors N.V. 2015. All rights reserved.
User manual
Rev. 2.1 — 23 July 2015
27 of 54
Table 5.
Setting the time and date
Sequence of commands / data to be sent
Binary (BCD)
HEX
Register
Address
Comments
generate I
2
C start condition
1 0 1 0 0 0 1 0
A2
I
2
C slave address, write
0 0 0 0 0 0 0 0
00
word address 0, next bytes are data
0 0 0 0 0 0 0 0
00
00
control/status 1, no test modes or POR override
0 0 0 0 0 0 0 0
00
01
control/status 2, no alarm/timer flags or interrupts
0 0 0 0 0 0 0 0
00
02
set seconds, clear voltage low detector
0 1 0 0 0 1 0 1
45
03
set minutes to 45
0 0 0 1 0 1 0 0
14
04
set hours to 14
0 0 0 1 0 1 1 0
16
05
set days to 16
0 0 0 0 0 1 0 1
05
06
set weekdays to Friday, Monday is day 1
1 0 0 0 0 1 1 1
87
07
set month to 7 and century bit to 1
0 0 0 0 1 0 0 0
08
08
set years to 08
1 0 0 0 0 0 0 0
80
09
disable minute alarm and reset to 00
1 0 0 0 0 0 0 0
80
0A
disable hour alarm and reset to 00
1 0 0 0 0 0 0 0
80
0B
disable day alarm and reset to 00
1 0 0 0 0 0 0 0
80
0C
disable weekday alarm and reset to 00
1 0 0 0 0 0 0 0
80
0D
set frequency out to 32768 Hz e.g. for tuning
0 0 0 0 0 0 0 0
00
0E
timer switched off
generate I
2
C stop condition
12.2 Alarm
It is possible to program several types of alarm. Let’s take the example to set an alarm
such that always 15 minutes past the hour the alarm flag AF is set and an interrupt
generated.
Table 6.
Setting the alarm
Sequence of commands / data to be sent
Binary (BCD)
HEX
Register
Address
Comments
generate I
2
C start condition
1 0 1 0 0 0 1 0
A2
I
2
C slave address, write