Real Time Clock DS1687 by Dallas Semiconductor
Program functions
Read
All registers, User and Extended
RAM are read into the buffer according to the Memory mapping
Table.
Program
All writeable registers, User
and Extended RAM are programmed with data from the buffer according
to the Memory mapping Table.
Compare
All writeable registers, User
and Extended RAM are compared with data in the buffer according to
the Memory mapping Table.
Erase
The Timekeeping and Control
Registers are programmed as follows:
Register: |
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
A |
B |
48 |
49 |
4A |
4B |
4C |
4D |
Value: |
0h |
0h |
0h |
0h |
1h |
1h |
1h |
1h |
1h |
0h |
0h |
80h |
0h |
1h |
38h |
40h |
0h |
0h |
The User and Extended RAM is filled with FFh value.
Blank Check
All writeable registers,
User and Extended RAM are checked for the empty value (see 'Erase').
Note 1: |
For Program/Erase the device will first be 'frozen' by setting the bit 7 of Control Register B (SET) to '1' and after programming and verifying it will be set to value defined by the user for 'Program' or kept on '1' for 'Erase'. |
Note 2: |
For 'Program', 'Compare', 'Erase' and 'Blank Check' all the readonly registers - Ch, Dh, 40h (Model Number), 41h-46h (Serial Numbers), 47h (CRC), 4Eh (RTC Address-2) and 4Fh (RTC Address-3) are ignored and not programmed/verified. In addition at 'Compare' and 'Blank Check' bit 5 of the Control Register A (DV1) is ignored and not verified. |
Note 3: |
Though bit 5 of the Control Register A (DV1) can be programmed to '0', - it will automatically be set to '1' by the device after restart. |
Note 4: |
There is no checking against incorrect values during programming, so the user must take care of this. |
Memory mapping Table
|
DS1687 |
Galep4 |
|
bank 0 |
00h |
00h |
TIMEKEEPING AND CONTROL |
|
0Eh |
0Eh |
50 BYTES USER RAM |
|
40h |
40h |
64 BYTES USER RAM |
bank 1 |
40h |
80h |
MODEL NUMBER BYTE |
|
41h |
81h |
1ST BYTE SERIAL NUMBER |
|
42h |
82h |
2ND BYTE SERIAL NUMBER |
|
43h |
83h |
3RD BYTE SERIAL NUMBER |
|
44h |
84h |
4TH BYTE SERIAL NUMBER |
|
45h |
85h |
5TH BYTE SERIAL NUMBER |
|
46h |
86h |
6TH BYTE SERIAL NUMBER |
|
47h |
87h |
CRC BYTE |
|
48h |
88h |
CENTURE BYTE |
|
49h |
89h |
DATE ALARM |
|
4Ah |
8Ah |
EXTENDED CONTROL REG 4A |
|
4Bh |
8Bh |
EXTENDED CONTROL REG 4B |
|
4Ch |
8Ch |
RESERVERD |
|
4Dh |
8Dh |
RESERVERD |
|
4Eh |
8Eh |
RTC ADDRESS-2 |
|
4Fh |
8Fh |
RTC ADDRESS-3 |
|
50h & 53h |
90h |
128 BYTES EXTENDED RAM |