beautypg.com

Rainbow Electronics DS1687 User Manual

Page 19

background image

DS1685/DS1687

19 of 38

EXTENDED FUNCTIONS

The extended functions provided by the DS1685/DS1687 that are new to the RAMified RTC family are
accessed by a software-controlled bank-switching scheme, as illustrated in Figure 4. In bank 0, the
clock/calendar registers and 50 bytes of user RAM are in the same locations as for the DS1287. As a
result, existing routines implemented within BIOS, DOS, or application software packages can gain
access to the DS1685/DS1687 clock registers with no changes. Also in bank 0, an extra 64 bytes of RAM
are provided at addresses just above the original locations for a total of 114 directly addressable bytes of
user RAM.

When bank 1 is selected, the clock/calendar registers and the original 50 bytes of user RAM still appear
as bank 0. However, the Dallas registers that provide control and status for the extended functions are
accessed in place of the additional 64 bytes of user RAM. The major extended functions controlled by the
Dallas registers are listed below:

1) 64-bit Silicon Serial Number
2) Century counter
3) Date Alarm
4) Auxiliary Battery Control/Status
5) Wake-Up
6) Kickstart
7) RAM Clear Control/Status
8) 128-bytes Extended RAM Access

The bank selection is controlled by the state of the DV0 bit in register A. To access bank 0, the DV0 bit
should be written to a 0. To access bank 1, DV0 should be written to a 1. Register locations designated as
reserved in the bank 1 map are reserved for future use by Dallas Semiconductor. Bits in these locations
cannot be written and return a 0 if read.

SILICON SERIAL NUMBER

A unique 64-bit lasered serial number is located in bank 1, registers 40h to 47h. This serial number is
divided into three parts. The first byte in register 40h contains a model number, 47h, to identify the device
type. Registers 41h to 46h contain a unique binary number. Register 47h contains a CRC byte used to
validate the data in registers 40h to 46h. All 8 bytes of the serial number are read-only registers.

The DS1685/DS1687 is manufactured such that no two devices contain an identical number in locations
41h to 47h.

CENTURY COUNTER

A register has been added in bank 1, location 48H, to keep track of centuries. The value is read in either
binary or BCD according to the setting of the DM bit.