
DS1678
4 of 24
The INT pin can be activated in three different ways depending on how the user programs the Trigger
Select (TRx) bits. The event can be triggered by a falling edge on the INT pin only, a rising edge only,
or it can be triggered by both the rising and falling edges. By logging both the rising and falling edges as
events, the time when something is turned on and turned off can be determined and the amount of time
that the external system was in either state.
This assumes that the external system always starts logging data in a known state. For example, if a light
switch is being monitored and the switch is always in the off position before a mission is started, the first
event would be turning the lights on. The next event would have to be to turn the lights off. The time
between the events would be the amount of time the lights were in the on state. The time from turning the
lights off until the next event, which would be to turn the lights back on again, would be the amount of
time the lights were off.
The INT pin can also be used as an output when the DS1678 is not in an Event Logging Mission. The
INT
pin will become an output and generate an Alarm Interrupt if the Duration Interval Select (DISx)
bits are both set to zero and the RTC reaches the preset value in the Alarm register. The INT output
remains low as long as the status bit causing the interrupt is present and the DISx bits are both set to zero.
The INT pin is an open-drain input/output with a weak internal pull-down resistor to prevent the pin
from floating if the signal connected to the pin is tri-stated. Without the resistor, the input would float
and potentially log phantom events. With the pull-down resistor, the pin can be transitioned to a low
state causing an event to be recorded if the INT pin was being held high by an outside signal that
becomes tri-stated.
X1, X2 - Connections for a standard 32.768 kHz quartz crystal, Daiwa part number DT-26S or
equivalent. For greatest accuracy, the DS1678 must be used with a crystal that has a specified load
capacitance of 12.5 pF. There is no need for external capacitors or resistors. Note: X1 and X2 are very
high impedance nodes. It is recommended that they and the crystal be guard-ringed with ground and that
high frequency signals be kept away from the crystal area. For more information on crystal selection and
crystal layout considerations, please consult Application Note 58, “Crystal Considerations with Dallas
Real Time Clocks.”
MEMORY
The memory map in Figure 2a shows the general organization of the DS1678. As can be seen in the
figure, the device memory is in one contiguous segment with a data port to access the Event Log
Memory. Since the 2-wire bus only has the capability to use one byte addressing, the DS1678 utilizes
the data port to access the 2048 bytes of Event Log Memory. The address that the next data will be
written to is stored in the Address Pointer registers LSB (3Fh) and MSB (40h). These will be helpful in
recovering all of the data if a rollover occurs. The address pointer will point to the oldest event in the
memory after a rollover. This is the memory location in Event log memory that would be over written by
the next event. Read the data from this point to the end of the memory and the Start Time Stamp
including the two Byte ETC from Last Event. Working backward from the value in the Start Time
Stamp, subtract the value in the ETC from Last Event to get the time the last event in the memory
occurred. Then subtract the values in each of the 2-byte memory locations for elapsed time between
events in order to recover the time the previous event occurred.
The value in the Elapsed Time Counter register LSB (3Dh) and MSB (3Eh) is the value in the actual
Elapsed time counter. This is the time from the last event recorded until logging was stopped. Since a
new event has not occurred, this data has not been stored in the Event Memory yet.