beautypg.com

Rainbow Electronics DS1678 User Manual

Page 12

background image

DS1678

12 of 26

TIME-OF-DAY ALARM BITS Table 1

ALARM REGISTER MASK BITS (bit 7)

SECONDS

(MS)

MINUTES

(MM)

HOURS

(MH)

DAYS

(MD)

1

1

1

1

ALARM ONCE PER SECOND

0

1

1

1

ALARM WHEN SECONDS MATCH

0

0

1

1

ALARM WHEN MINUTES AND SECONDS
MATCH

0

0

0

1

ALARM WHEN HOURS, MINUTES, AND
SECONDS MATCH

0

0

0

0

ALARM WHEN DAY, HOURS, MINUTES, AND
SECONDS MATCH

The DS1678 also contains a time-of-day alarm. The alarm registers are located in registers 08h to 0Bh.
Bit 7 of each of the alarm registers are mask bits (See Table 1). When all of the mask bits are logic 0, an
alarm will occur once per week when the values stored in timekeeping registers 00h to 03h match the
values stored in the time-of-day alarm registers. An alarm will be generated every day when mask bit of
the day alarm register is set to 1. An alarm will be generated every hour when the day and hour alarm
mask bits are set to 1. Similarly, an alarm will be generated every minute when the day, hour, and minute
alarm mask bits are set to 1. When day, hour, minute, and seconds alarm mask bits are set to 1, an alarm
will occur every second.

As a security measure to prevent unauthorized tampering, writing to any memory location or changing
any value in the RTC and control registers will stop a event log mission and clear the MIP bit to a 0.

SPECIAL PURPOSE REGISTERS

The following description defines the operation of the special function registers of the DS1678.

CONTROL REGISTER

MSB

LSB

ME

CLR

DIS1

DIS0

RO

TR1

TR0

COE

ME - Mission Enable – This bit enables the device to begin a mission. The ME bit can not be written to
a 1 unless the MEM CLR bit in the Status register is a 1, signifying that the memory and registers have
been cleared. With the ME bit set to a one, the device will wait for the first event to occur (

INT

is

activated). Once that first event occurs, the time/date stamp will be recorded in the start time stamp
register, the event 0 elapsed time from last event bytes are both written with zeros, the event count
register will be incremented, and the elapsed time count will begin incrementing to be ready with the
duration of time from the first event until the next event.

When the ME bit is set to logic 0, the DS1678 will wait until a 1 is written to the MIP bit via the 2-wire
interface to start the mission. When the MIP bit is written to a 1, the ME bit will be set to a one, the
current time/date will be recorded in the start time stamp, the event 0 elapsed time from last event bytes
are both written with zeros, the event count register will be incremented, and the elapsed time count will
begin incrementing to be ready with the duration of time from the start until the first event.

The ME bit is automatically written to a 0 whenever a mission is stopped.