DS1390–DS1394
Low-Voltage SPI/3-Wire RTCs with
Trickle Charger
16
Maxim Integrated
Alarms
All five devices contain one time-of-day/date alarm.
Writing to registers 88h through 8Ch sets the alarm.
The alarm can be programmed (by the alarm enable
and INTCN bits of the control register) to activate the
SQW/INT or INT output on an alarm-match condition.
The alarm can activate the SQW/INT or INT output while
the device is running from V
BACKUP
if BBSQI is
enabled. Bit 7 of each of the time-of-day/date alarm
registers are mask bits (Table 4). When all the mask
bits for each alarm are logic 0, an alarm only occurs
when the values in the timekeeping registers 00h to 06h
match the values stored in the time-of-day/date alarm
registers. The alarms can also be programmed to
repeat every second, minute, hour, day, or date. Table
4 shows the possible settings. Configurations not listed
in the table result in illogical operation.
The DY/DT bits (bit 6 of the alarm day/date registers)
control whether the alarm value stored in bits 0 to 5 of
that register reflects the day of the week or the date of
the month. If DY/DT is written to logic 0, the alarm is the
result of a match with date of the month. If DY/DT is
written to a logic 1, the alarm is the result of a match
with day of the week.
When the RTC register values match alarm register set-
tings, the alarm-flag (AF) bit is set to logic 1. If the
alarm-interrupt enable (AIE) is also set to logic 1 and
the INTCN bit is set to logic 1, the alarm condition acti-
vates the SQW/INT signal.
Since the contents of register 08h are expected to nor-
mally contain a match value of 00–99 decimal, the
codes F[0–9], and FF have been used to tell the part to
mask the tenths or hundredths of seconds accordingly.
Power-Up/Down, Reset, and
Pushbutton Reset Functions
A precision temperature-compensated reference and
comparator circuit monitors the status of V
CC
. When an
out-of-tolerance condition occurs, an internal power-fail
signal is generated that blocks read/write access to the
device and forces the RST pin (DS1391/DS1393 only)
low. When V
CC
returns to an in-tolerance condition, the
internal power-fail signal is held active for t
RST
to allow
the power supply to stabilize, and the RST (DS1391/
DS1393 only) pin is held low. If the EOSC bit is set to
logic 1 (to disable the oscillator in battery-backup
mode), the internal power-fail signal and the RST pin is
kept active for t
RST
plus the startup time of the oscillator.
The DS1391/DS1393 provide for a pushbutton switch to
be connected to the RST output pin. When the
DS1391/DS1393 are not in a reset cycle, it continuously
monitors the RST signal for a low-going edge. If an
edge is detected, the part debounces the switch by
pulling the RST pin low and inhibits read/write access.
After PB
DB
has expired, the part continues to monitor
the RST line. If the line is still low, it continues to monitor
the line looking for a rising edge. Upon detecting
release, the part forces the RST pin low and holds it low
for an additional PB
DB
.
ALARM REGISTER MASK BITS (BIT 7)
REGISTE
R 08H
DY/DT
AM4 AM3 AM2 AM1
ALARM RATE
FFh X 1 1 1 1 Alarm every 1/100th of a second
F[0–9]h X 1 1 1 1 Alarm when hundredths of seconds match
[0–9][0–9] X 1 1 1 1 Alarm when tenths, hundredths of seconds match
[0–9][0–9] X 1 1 1 0
Alarm when seconds, tenths, and hundredths of seconds
match
[0–9][0–9] X 1 1 0 0
Alarm when minutes, seconds, tenths, and hundredths of
seconds match
[0–9][0–9] X 1 0 0 0
Alarm when hours, minutes, seconds, tenths, and
hundredths of seconds match
[0–9][0–9] 0 0 0 0 0
Alarm when date, hours, minutes, seconds, tenths, and
hundredths of seconds match
[0–9][0–9] 1 0 0 0 0
Alarm when day, hours, minutes, seconds, tenths, and
hundredths of seconds match
Table 4. Alarm Mask Bits
DS1390–DS1394
Low-Voltage SPI/3-Wire RTCs with
Trickle Charger
17
Maxim Integrated
Bit 7: Enable Oscillator (EOSC). When set to logic 0,
this bit starts the oscillator. When this bit is set to logic
1, the oscillator is stopped whenever the device is pow-
ered by V
BACKUP
. The oscillator is always enabled
when V
CC
is valid. This bit is enabled (logic 0) when
V
CC
is first applied.
Bit 5: Battery-Backed Square-Wave and Interrupt
Enable (BBSQI). This bit when set to logic 1 enables the
square wave or interrupt output when V
CC
is absent and
the DS1390/DS1392/DS1393/DS1394 are being pow-
ered by the V
BACKUP
pin. When BBSQI is logic 0, the
SQW/INT pin (or SQW and INT pins) goes high imped-
ance when V
CC
falls below the power-fail trip point. This
bit is disabled (logic 0) when power is first applied.
Bits 4 and 3: Rate Select (RS2 and RS1). These bits
control the frequency of the square-wave output when
the square wave has been enabled. The table below
shows the square-wave frequencies that can be select-
ed with the RS bits. These bits are both set to logic 1
(32kHz) when power is first applied.
Bit 2: Interrupt Control (INTCN). This bit controls the
SQW/INT signal. When the INTCN bit is set to logic 0, a
square wave is output on the SQW/INT pin. The oscilla-
tor must also be enabled for the square wave to be out-
put. When the INTCN bit is set to logic 1, a match
between the timekeeping registers and either of the
alarm registers then activates the SQW/INT (provided
the alarm is also enabled). The corresponding alarm
flag is always set, regardless of the state of the INTCN
bit. The INTCN bit is set to logic 0 when power is first
applied.
Bit 0: Alarm Interrupt Enable (AIE). When set to logic
1, this bit permits the alarm flag (AF) bit in the status
register to assert SQW/INT (when INTCN = 1). When
the AIE bit is set to logic 0 or INTCN is set to logic 0,
the AF bit does not initiate the SQW/INT signal. The AIE
bit is disabled (logic 0) when power is first applied.
BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0
EOSC 0 BBSQI RS2 RS1 INTCN 0 AIE
Control Register (0D/8Dh) (DS1390/DS1393/DS1394 Only)
BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0
EOSC 0XXXX0X
Control Register (0D/8Dh) (DS1391 Only)
RS2 RS1 SQUARE-WAVE OUTPUT FREQUENCY
0 0 1Hz
0 1 4.096kHz
1 0 8.192kHz
1 1 32.768kHz
Special-Purpose Registers
The DS1390–DS1394 have three additional registers
(control, status, and trickle charger) that control the
RTC, alarms, square-wave output, and trickle charger.
Control bits used in the DS1390 become general-pur-
pose, battery-backed, nonvolatile SRAM bits in the
DS1391.
DS1390–DS1394
Low-Voltage SPI/3-Wire RTCs with
Trickle Charger
18
Maxim Integrated
Bit 7: Oscillator Stop Flag (OSF). A logic 1 in this bit
indicates that the oscillator has stopped or was
stopped for some time and may be used to judge the
validity of the clock and calendar data. This bit is
edge-triggered and is set to logic 1 when the internal
circuitry senses the oscillator has transitioned from a
normal run state to a STOP condition. The following are
examples of conditions that can cause the OSF bit to
be set:
1) The first time power is applied.
2) The voltage present on V
CC
and V
BACKUP
is
insufficient to support oscillation.
3) The EOSC bit is turned off.
4) External influences on the crystal (i.e., noise,
leakage, etc.).
This bit remains at logic 1 until written to logic 0. This
bit can only be written to logic 0. Attempting to write
OSF to logic 1 leaves the value unchanged.
Bit 6: Alarm Flag (AF). A logic 1 in the AF bit indicates
that the time matched the alarm registers. If the AIE bit
The INTCN bit used in the DS1390/DS1393/DS1394
becomes the SQW pin-enable bit in the DS1392. This
bit powers up a zero, making SQW active.
BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0
EOSC 0 BBSQI RS2 RS1 ESQW 0 AIE
Control Register (0D/8Dh) (DS1392 Only)
BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0
OSF000000AF
Status Register (0E/8Eh)
is logic 1 and the INTCN bit is set to logic 1, the
SQW/INT pin is also asserted. AF is cleared when writ-
ten to logic 0. This bit can only be written to logic 0.
Attempting to write to logic 1 leaves the value
unchanged.
Trickle-Charge Register (0F/8Fh)
The simplified schematic in Figure 8 shows the basic
components of the trickle charger. The trickle-charge
select (TCS) bits (bits 4 to 7) control the selection of
the trickle charger. To prevent accidental enabling,
only a pattern on 1010 enables the trickle charger. All
other patterns disable the trickle charger. The trickle
charger is disabled when power is first applied. The
diode-select (DS) bits (bits 2 and 3) select whether or
not a diode is connected between V
CC
and V
BACKUP
.
If DS is 01, no diode is selected or if DS is 10, a diode
is selected. The ROUT bits (bits 0 and 1) select the
value of the resistor connected between V
CC
and
V
BACKUP
. Table 5 shows the resistor selected by the
resistor-select (ROUT) bits and the diode selected by
the diode-select (DS) bits.
TCS3 TCS2 TCS1 TCS0 DS1 DS0 ROUT1 ROUT0 FUNCTION
X X X X 0 0 X X Disabled
X X X X 1 1 X X Disabled
X X X X X X 0 0 Disabled
10100101No diode, 250 resistor
10101001One diode, 250 resistor
10100110No diode, 2k resistor
10101010One diode, 2k resistor
10100111No diode, 4k resistor
10101011One diode, 4k resistor
00000000Initial default value—disabled
Table 5. Trickle-Charge Register

DS1391U-3+

Mfr. #:
Manufacturer:
Maxim Integrated
Description:
Real Time Clock Low-V SPI/3-Wire With Trickle Charger
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union