DS12885/DS12887/DS12887A/DS12C887/DS12C887A
Real-Time Clocks
10 ____________________________________________________________________
Pin Description (continued)
PIN
SO,
PDIP
EDIP PLCC TQFP
NAME FUNCTION
19 19 23 21 IRQ
Active-Low Interrupt Request Output. The IRQ pin is an active-low output of the
device that can be used as an interrupt input to a processor. The IRQ output
remains low as long as the status bit causing the interrupt is present and the
corresponding interrupt-enable bit is set. The processor program normally
reads the C register to clear the IRQ pin. The RESET pin also clears pending
interrupts. When no interrupt conditions are present, the IRQ level is in the high-
impedance state. Multiple interrupting devices can be connected to an IRQ
bus, provided that they are all open drain. The IRQ pin is an open-drain output
and requires an external pullup resistor to V
CC
.
20 24 22 V
BAT
Connection for a Primary Battery. (DS12885 Only.) Battery voltage must be held
between the minimum and maximum limits for proper operation. If a backup
supply is not supplied, V
BAT
must be grounded. Connect the battery directly to
the V
BAT
pin. Diodes in series between the V
BAT
pin and the battery may
prevent proper operation. UL recognized to ensure against reverse charging
when used with a lithium battery.
21
21
(DS12887A/
DS12C887A)
25 24 RCLR
Active-Low RAM Clear. The RCLR pin is used to clear (set to logic 1) all the
general-purpose RAM, but does not affect the RAM associated with the RTC. To
clear the RAM, RCLR must be forced to an input logic 0 during battery-backup
mode when V
CC
is not applied. The RCLR function is designed to be used
through a human interface (shorting to ground manually or by a switch) and not
to be driven with external buffers. This pin is internally pulled up. Do not use an
external pullup resistor on this pin.
23 23 27 26 SQW
Square-Wave Output. The SQW pin can output a signal from one of 13 taps
provided by the 15 internal divider stages of the RTC. The frequency of the
SQW pin can be changed by programming Register A, as shown in Table 1.
The SQW signal can be turned on and off using the SQWE bit in Register B. The
SQW signal is not available when V
CC
is less than V
PF
.
24 24 28 28 V
CC
DC Power Pin for Primary Power Supply. When V
CC
is applied within normal
limits, the device is fully accessible and data can be written and read. When
V
CC
is below V
PF
reads and writes are inhibited.
DS12885/DS12887/DS12887A/DS12C887/DS12C887A
Real-Time Clocks
____________________________________________________________________ 11
Detailed Description
The DS12885 family of RTCs provide 14 bytes of real-
time clock/calendar, alarm, and control/status registers
and 114 bytes (113 bytes for DS12C887 and
DS12C887A) of nonvolatile, battery-backed static RAM.
A time-of-day alarm, three maskable interrupts with a
common interrupt output, and a programmable square-
wave output are available. The devices also operate in
either 24-hour or 12-hour format with an AM/PM indica-
tor. A precision temperature-compensated circuit moni-
tors the status of V
CC
. If a primary power-supply failure
is detected, the devices automatically switch to a back-
up supply. The backup supply input supports a primary
battery, such as lithium coin cell. The devices are
accessed through a multiplexed address/data bus that
supports Intel and Motorola modes.
Oscillator Circuit
The DS12885 uses an external 32.768kHz crystal. The
oscillator circuit does not require any external resistors
or capacitors to operate. Table 1 specifies several crys-
tal parameters for the external crystal. Figure 1 shows a
functional schematic of the oscillator circuit. An enable
bit in the control register controls the oscillator.
Oscillator startup times are highly dependent upon
crystal characteristics, PC board leakage, and layout.
High ESR and excessive capacitive loads are the major
contributors to long startup times. A circuit using a
crystal with the recommended characteristics and
proper layout usually starts within one second.
An external 32.768kHz oscillator can also drive the
DS12885. In this configuration, the X1 pin is connected
to the external oscillator signal and the X2 pin is left
unconnected.
COUNTDOWN
CHAIN
X1
X2
CRYSTAL
C
L
1C
L
2
RTC REGISTERS
DS12885
Figure 1. Oscillator Circuit Showing Internal Bias Network
PARAMETER SYMBOL MIN TYP MAX UNITS
Nominal
Frequency
f
O
32.768 kHz
Series
Resistance
ESR 50 kΩ
Load
Capacitance
C
L
6pF
Table 1. Crystal Specifications*
*
The crystal, traces, and crystal input pins should be isolated
from RF generating signals. Refer to
Application Note 58:
Crystal Considerations for Dallas Real-Time Clocks
for
additional specifications.
DS12885/DS12887/DS12887A/DS12C887/DS12C887A
Real-Time Clocks
12 ____________________________________________________________________
Clock Accuracy
The accuracy of the clock is dependent upon the accu-
racy of the crystal and the accuracy of the match
between the capacitive load of the oscillator circuit and
the capacitive load for which the crystal was trimmed.
Additional error is added by crystal frequency drift
caused by temperature shifts. External circuit noise cou-
pled into the oscillator circuit can result in the clock run-
ning fast. Figure 2 shows a typical PC board layout for
isolation of the crystal and oscillator from noise. Refer to
Application Note 58: Crystal Considerations with Dallas
Real-Time Clocks
for more detailed information.
Clock Accuracy for DS12887, DS12887A,
DS12C887, DS12C887A Only
The encapsulated DIP modules are trimmed at the fac-
tory to an accuracy of ±1 minute per month at +25°C.
Power-Down/Power-Up
Considerations
The real-time clock continues to operate, and the RAM,
time, calendar, and alarm memory locations remain
nonvolatile regardless of the V
CC
input level. V
BAT
must
remain within the minimum and maximum limits when
V
CC
is not applied. When V
CC
is applied and exceeds
V
PF
(power-fail trip point), the device becomes accessi-
ble after t
REC
—if the oscillator is running and the oscil-
lator countdown chain is not in reset (Register A). This
time allows the system to stablize after power is
applied. If the oscillator is not enabled, the oscillator-
enable bit is enabled on power-up, and the device
becomes immediately accessible.
Time, Calendar, and Alarm
Locations
The time and calendar information is obtained by read-
ing the appropriate register bytes. The time, calendar,
and alarm are set or initialized by writing the appropri-
ate register bytes. Invalid time or date entries result in
undefined operation. The contents of the 10 time, cal-
endar, and alarm bytes can be either binary or binary-
coded decimal (BCD) format.
The day-of-week register increments at midnight, incre-
menting from 1 through 7. The day-of-week register is
used by the daylight saving function, so the value 1 is
defined as Sunday. The date at the end of the month is
automatically adjusted for months with fewer than 31
days, including correction for leap years.
Before writing the internal time, calendar, and alarm reg-
isters, the SET bit in Register B should be written to logic
1 to prevent updates from occurring while access is
being attempted. In addition to writing the 10 time, calen-
dar, and alarm registers in a selected format (binary or
BCD), the data mode bit (DM) of Register B must be set
to the appropriate logic level. All 10 time, calendar, and
alarm bytes must use the same data mode. The SET bit
in Register B should be cleared after the data mode bit
has been written to allow the RTC to update the time and
calendar bytes. Once initialized, the RTC makes all
updates in the selected mode. The data mode cannot be
changed without reinitializing the 10 data bytes. Tables
2A and 2B show the BCD and binary formats of the time,
calendar, and alarm locations.
The 24-12 bit cannot be changed without reinitializing the
hour locations. When the 12-hour format is selected, the
higher-order bit of the hours byte represents PM when it
is logic 1. The time, calendar, and alarm bytes are always
accessible because they are double-buffered. Once per
second the seven bytes are advanced by one second
and checked for an alarm condition.
If a read of the time and calendar data occurs during
an update, a problem exists where seconds, minutes,
hours, etc., may not correlate. The probability of read-
ing incorrect time and calendar data is low. Several
methods of avoiding any possible incorrect time and
calendar reads are covered later in this text.
LOCAL GROUND PLANE (TOP LAYER)
CRYSTAL
GND
X2
X1
NOTE: AVOID ROUTING SIGNAL LINES
IN THE CROSSHATCHED AREA
(UPPER LEFT QUADRANT) OF
THE PACKAGE UNLESS THERE IS
A GROUND PLANE BETWEEN THE
SIGNAL LINE AND THE DEVICE PACKAGE.
Figure 2. Layout Example

DS12885T+

Mfr. #:
Manufacturer:
Maxim Integrated
Description:
Real Time Clock RTC
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union