Nxp Semiconductors PCA8565 用户手册

下载
页码 52
 
 
NXP Semiconductors 
UM10301
 
User Manual PCF85x3, PCA8565 and PCF2123, PCA2125
UM10301_1 
© NXP B.V. 2008. All rights reserved.
User manual 
Rev. 01 — 23 December 2008 
5 of 52
In BCD every digit of the decimal system is represented by a 4-bit group. For example:  
157
10
 = 0001 0101 0111
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
HEX
 
control / status 1 
TEST1 
STOP 
TESTC 
01
HEX
 
control / status 2 
TI/TP 
AF 
TF 
AIE 
TIE 
02
HEX
 
seconds 
VL 
<seconds 00 to 59 coded in BCD> 
03
HEX
 
minutes 
<minutes 00 to 59 coded in BCD> 
04
HEX
 
hours 
<hours 00 to 23 coded in BCD> 
05
HEX
 
days 
<days 01 to 31 coded in BCD> 
06
HEX
 
weekdays 
x x x x x 
<weekdays 
to 
6> 
07
HEX
 
months / century 
<months 01 to 12 coded in BCD> 
08
HEX
 
years 
<years 00 to 99 coded in BCD> 
09
HEX
 
minute alarm 
AE 
<minute alarm 00 to 59 coded in BCD> 
0A
HEX
 
hour alarm 
AE 
<hour alarm 00 to 23 coded in BCD> 
0B
HEX
 
day alarm 
AE 
<day alarm 01 to 31 coded in BCD> 
0C
HEX
 
weekday alarm 
AE 
<weekday alarm 0 to 6> 
0D
HEX
 
CLKOUT 
control 
FE 
x x x x x FD1 
FD0 
0E
HEX
 
timer 
control  TE 
x x x x x TD1 
TD0 
0F
HEX
 
timer 
<timer countdown value>