
Real Time Clock Control
The cpuModule is equipped with a real time clock (RTC) which provides system date and time functions, and also provides 128 nonvolatile memory locations. The contents of these memory locations are retained whenever an external backup battery is connected, whether or not system power is connected.
You may access the RTC date, time, and memory using an index and data register at I/O addresses 70h and 71h. Address 70h is the Index register. It must be written with the number of the register to read or write. Refer to the map below for valid choices for the index. Data is then written to or read from the selected register by writing or reading (respectively) the data register at address 71h.
WARNING Do NOT change values stored in the RTC registers listed as RESERVED in the table below. Doing so will interfere with proper cpuModule operation.
Registers of the RTC are shown below.
.
Table 47 Real Time Clock Registers
Registers | Registers | Number of | Function |
(hex) | (decimal) | Bytes |
|
|
|
|
|
00h | 0 | 1 | BCD Seconds |
|
|
|
|
02h | 2 | 1 | BCD Minutes |
|
|
|
|
04h | 4 | 1 | BCD Hours |
|
|
|
|
06h | 6 | 1 | Day of Week |
|
|
|
|
07h | 7 | 1 | Day of Month |
|
|
|
|
08h | 8 | 1 | Month |
|
|
|
|
09h | 9 | 1 | Year |
|
|
|
|
4 | RTC Control Registers | ||
|
|
|
|
36 | |||
|
|
|
|
32h | 50 | 1 | BCD Century |
|
|
|
|
13 | |||
|
|
|
|
64 | User RAM | ||
|
|
|
|
Chapter 4: Using the cpuModule 63 |