DS1302 分析与使用

/*
地址/命令直接
  7    6      5  4    3   2   1    0
  1  RAM/CK  A4  A3  A2  A1  A0  RD/WR

RAM/CK   1:RAM  0:RTC
RD/WR    1:Read 0:Write

---------------------------------------------------------------------------------------------
读取寄存器
---------------------------------------------------------------------------------------------
RTC  时钟寄存器
---------------------------------------------------------------------------------------------
 (1/2)前字节   |                           后字节             
READ   WRITE   |   BIT 7   BIT 6   BIT 5   BIT 4   BIT 3    BIT 2   BIT 1   BIT 0   RANGE
81h    80h     |   CH                 10 Seconds                          Seconds   00–59
83h    82h     |                      10 Minutes                          Minutes   00–59
85h    84h     |   12/24      0  10/(AM/PM) Hour                             Hour   1–12/0–23
87h    86h     |   0       0             10 Date                             Date   1–31
89h    88h     |   0       0       0    10 Month                            Month   1–12
8Bh    8Ah     |   0       0       0           0       0                      Day   1–7
8Dh    8Ch     |                         10 Year                             Year   00–99
8Fh    8Eh     |   WP      0       0           0       0        0       0       0     —
91h    90h     |   TCS    TCS     TCS        TCS      DS       DS      RS      RS     —
----------------------------------------------------------------------------------------------
==============================================================================================
----------------------------------------------------------------------------------------------
RAM     储存
----------------------------------------------------------------------------------------------
C1h    C0h                                                                          00-FFh
C3h    C2h                                                                          00-FFh
C5h    C4h                                                                          00-FFh
.       .                                                                             .
.       .                                                                             .
.       .                                                                             .
FDh    FCh                                                                          00-FFh
----------------------------------------------------------------------------------------------
*/

 

你可能感兴趣的:(编程基础)