English
Language : 

DS1678 Datasheet, PDF (16/25 Pages) Maxim Integrated Products – Real-Time Event Recorder
DS1678 Real-Time Event Recorder
CLOCK, CALENDAR, AND ALARM
The time and calendar information is accessed by reading/writing the appropriate register bytes. Note that
some bits are set to zero. These bits always read zero regardless of how they are written. The contents of
the time, calendar, and alarm registers are in the BCD format and are year 2000 compliant.
The DS1678 can run in either 12-hour or 24-hour mode. Bit 6 of the hours register is defined as the 12- or
24-hour mode select bit. When high, the 12-hour mode is selected. In the 12-hour mode, bit 5 is the
AM/PM bit with logic one being PM. In the 24-hour mode, bit 5 is the second 10-hour bit (20–23 hours).
The day register increments at midnight. Values that correspond to the day of week are user defined, but
must be sequential, e.g., if 1 equals Sunday, then 2 equals Monday, and so on. Illogical time and date
entries result in undefined operation.
When reading or writing the time and date registers, secondary (user) buffers are used to prevent errors
when the internal registers update. When reading the time and date registers, the user buffers are
synchronized to the internal registers on an I2C start. The time and calendar information is read from
these secondary registers, while the clock continues to run. The countdown chain is reset whenever the
seconds register is written. Write transfers occur on the acknowledge from the device. Once the
countdown chain is reset, to avoid rollover issues the remaining time and date registers must be written
within one second.
The DS1678 also contains a time-of-day alarm. The alarm registers are located in registers 08h–0Bh. Bit
7 of each of the alarm registers is a mask bit (Table 4). When all the mask bits are logic zero, an alarm
occurs once per week when the values stored in timekeeping registers 00h–03h match the values stored in
the time-of-day alarm registers. An alarm is generated every day when the mask bit of the day alarm
register is set to one. An alarm is generated every hour when the day and hour alarm mask bits are set to
one. Similarly, an alarm is generated every minute when the day, hour, and minute alarm mask bits are set
to one. An alarm occurs every second when the day, hour, minute, and seconds alarm mask bits are set to
one. As a security measure to prevent unauthorized tampering, writing to any memory location or
changing any value in the RTC and control registers stop an event-log mission and clear the MIP bit to
zero.
Table 4. Time-of-Day Alarm Bits
ALARM REGISTER MASK BITS (BIT 7)
SECONDS MINUTES HOURS DAYS
(MS)
(MM)
(MH) (MD)
1
1
1
1
0
1
1
1
0
0
1
1
0
0
0
1
0
0
0
0
DESCRIPTION
Alarm once per second
Alarm when seconds match
Alarm when minutes and seconds match
Alarm when hours, minutes, and seconds match
Alarm when day, hours, minutes, and seconds match
16 of 25