DS1501/DS1511 Y2KC Watchdog Real-Time Clocks
13 of 22
The third method of reading the time and date uses the alarm function. The alarm can be configured to activate
once per second, and the time-of-day alarm-interrupt enable bit (TIE) is enabled. The TE bit should always be
enabled. When the IRQ pin goes active, the time and date information does not change until the next update.
SETTING THE CLOCK
It is recommended to halt updates to the external set of double-buffered RTC registers when writing to the clock.
The (TE) bit should be used as described above before loading the RTC registers with the desired RTC count (day,
date, and time) in 24-hour BCD format. Setting the TE bit to 1 transfers the new values written to the internal RTC
registers and allows normal operation to resume.
CLOCK ACCURACY
The accuracy of the clock is dependent upon the accuracy 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 coupled into the
oscillator circuit can result in the clock running fast.
A standard 32.768kHz quartz crystal should be directly connected to the DS1501 X1 and X2 oscillator pins. The
crystal selected for use should have a specified load capacitance (C
L
) of either 6pF or 12.5pF, and the CS bit set
accordingly. An external 32.768kHz oscillator can also drive the DS1501. When using an external oscillator the X2
pin must be left open. The DS1511 contains an embedded crystal and is factory trimmed to be better than ±1
min/month at +25
°
C.
Refer to Application Note 58: Crystal Considerations for Dallas Real-Time Clocks for detailed information.
Table 2. Register Map
DATA
ADDRESS
B7 B6 B5 B4 B3 B2 B1 B0
FUNCTION
BCD
RANGE
00H 0 10 Seconds Seconds Seconds 00–59
01H 0 10 Minutes Minutes Minutes 00–59
02H 0 0 10 Hours Hour Hours 00–23
03H 0 0 0 0 0 Day Day 1–7
04H 0 0 10 Date Date Date 01–31
05H
EOSC E32K
BB32 10 Month Month Month 01–12
06H 10 Year Year Year 00–99
07H 10 Century Century Century 00–39
08H AM1 10 Seconds Seconds Alarm Seconds 00–59
09H AM2 10 Minutes Minutes Alarm Minutes 00–59
0AH AM3 0 10 Hours Hour Alarm Hours 00–23
0BH AM4 Dy/Dt 10 Date Day/Date Alarm Day/Date 1–7/1–31
0CH 0.1 Second 0.01 Second Watchdog 00–99
0DH 10 Second Second Watchdog 00–99
0EH BLF1 BLF2 PRS PAB TDF KSF WDF IRQF Control A
0FH TE CS BME TPE TIE KIE WDE WDS Control B
10H Extended RAM Address RAM Address 00–FF
11H Reserved
12H Reserved
13H Extended RAM Data RAM Data 00–FF
14H-1FH Reserved
Note: 0 = 0 and are read only.
POWER-UP DEFAULT STATES
These bits are set upon power-up: EOSC = 0, E32K = 0, TIE = 0, KIE = 0, WDE = 0, and WDS = 0. Unless
otherwise specified, the state of the control/RTC/SRAM bits in the DS1501/DS1511 is not defined upon initial
power application; the DS1501/DS1511 should be properly configured/defined during initial configuration.
DS1501/DS1511 Y2KC Watchdog Real-Time Clocks
14 of 22
USING THE CLOCK ALARM
The alarm settings and control reside within registers 08h to 0Bh (Table 2). The TIE bit and alarm mask bits AM1 to
AM4 must be set as described below for the IRQ or PWR outputs to be activated for a matched alarm condition.
The alarm functions as long as at least one supply is at a valid level. Note that activating the PWR pin requires the
use of V
BAUX
.
The alarm can be programmed to activate on a specific day of the month, day of the week, or repeat every day,
hour, minute, or second. It can also be programmed to go off while the DS1501/DS1511 are in the battery-backed
state of operation to serve as a system wakeup. Alarm mask bits AM1 to AM4 control the alarm mode. Table 3
shows the possible settings. Configurations not listed in the table default to the once-per-second mode to notify the
user of an incorrect alarm setting. When the RTC register values match alarm register settings, the time-of-
day/date alarm flag TDF bit is set to 1. Once the TDF flag is set, the TIE bit enables the alarm to activate the IRQ
pin. The TPE bit enables the alarm flag to activate the PWR pin. Note that TE must be enabled when a match
occurs for the flags to be set.
Table 3. Alarm Mask Bits
DY/DT AM4 AM3 AM2 AM1 ALARM RATE
X 1 1 1 1 Once per second
X 1 1 1 0 When seconds match
X 1 1 0 0 When minutes and seconds match
X 1 0 0 0 When hours, minutes, and seconds match
0 0 0 0 0 When date, hours, minutes, and seconds match
1 0 0 0 0 When day, hours, minutes, and seconds match
CONTROL REGISTERS
The DS1501/DS1511 controls and status information for the features are maintained in the following register bits.
Month Register (05h)
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
EOSC E32K
BB32 10 Month Month
EOSC, Oscillator Start/Stop Bit (05h Bit 7)
This bit when set to logic 0 starts the oscillator. When this bit is set to logic 1, the oscillator is stopped. This bit is
automatically set to logic 0 by the internal power-on reset when power is applied and V
CC
rises above the power-fail
voltage.
E32K, Enable 32.768kHz Output (05h Bit 6)
This bit, when written to 0, enables the 32.768 kHz oscillator frequency to be output on the SQW pin if the oscillator
is running. This bit is automatically set to logic 0 by the internal power-on reset when power is applied and V
CC
rises above the power-fail voltage.
BB32, Battery Backup 32kHz Enable Bit (05h Bit 5)
When the BB32 bit is written to 1, it enables a 32kHz signal to be output on the SQW pin while the part is in
battery-backup mode, if voltage is applied to V
BAUX.
AM1 to AM4, Alarm Mask Bits (08H Bit 7; 09H Bit 7; 0AH Bit 7; 0BH Bit 7)
Bit 7 of registers 08h to 0Bh contains an alarm mask bit, AM1 to AM4. These bits, in conjunction with the TIE
described later, allow the IRQ output to be activated for a matched-alarm condition. The alarm can be programmed
to activate on a specific day of the month, day of the week, or repeat every day, hour, minute, or second. Table 3
shows the possible settings for AM1 to AM4 and the resulting alarm rates. Configurations not listed in the table
default to the once-per-second mode to notify the user of an incorrect alarm setting.
DY/DT, Day/Date Bit (0BH Bit 6)
The DY/DT bit controls whether the alarm value stored in bits 0 to 5 of 0BH reflects the day of the week or the date
of the month. If DY/DT is written to a 0, the alarm is the result of a match with the date of the month. If DY/DT is
written to a 1, the alarm is the result of a match with the day of the week.
DS1501/DS1511 Y2KC Watchdog Real-Time Clocks
15 of 22
Control A Register (0Eh)
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
BLF1 BLF2 PRS PAB TDF KSF WDF IRQF
BLF1, Valid RAM and Time Bit 1 (0Eh Bit 7); BLF2, Valid RAM and Time Bit 2 (0Eh Bit 6)
These status bits give the condition of any batteries attached to the V
BAT
or V
BAUX
pins. The DS1501/DS1511
constantly monitor the battery voltage of the backup-battery sources (V
BAT
and V
BAUX
). The BLF1 and BLF2 bits are
set to 1 if the battery voltages on V
BAT
and V
BAUX
are less than V
BLF
(typ), otherwise BLF1 and BLF2 bits are 0.
BLF1 reflects the condition of V
BAT
with BLF2 reflecting V
BAUX
. If either bit is read as 1, the voltage on the respective
pin is inadequate to maintain the RAM memory or clock functions. These bits are read only.
PRS, Reset Select Bit (0Eh Bit 5)
When set to 0, the PWR pin is set high-Z when the DS150/DS1511 go into power-fail. When set to 1, the PWR pin
remains active upon entering power-fail.
PAB, Power Active-Bar Control Bit (0Eh Bit 4)
When this bit is 0, the PWR pin is in the active-low state. When this bit is 1, the PWR pin is in the high-impedance
state. The user can write this bit to 1 or 0. If either TDF and TPE = 1 or KSF = 1, the PAB bit is cleared to 0. This bit
can be read or written.
TDF, Time-of-Day/Date Alarm Flag (0Eh Bit 3)
A 1 in the TDF bit indicates that the current time has matched the alarm time. If the TIE bit is also 1, the IRQ pin
goes low and a 1 appears in the IRQF bit. This bit is cleared by reading the register or writing it to 0.
KSF, Kickstart Flag (0Eh Bit 2)
This bit is set to a 1 when a kickstart condition occurs or when the user writes it to 1. If the KIE bit is also 1, the IRQ
pin goes low and a 1 appears in the IRQF bit. This bit is cleared by reading the register or writing it to 0.
WDF, Watchdog Flag (0Eh Bit 1)
If the processor does not access the DS1501/DS1511 with a write within the period specified in addresses 0CH
and 0DH, the WDF bit is set to 1. WDF is cleared by writing it to 0.
IRQF, Interrupt Request Flag (0Eh Bit 0)
The interrupt request flag (IRQF) bit is set to 1 when one or more of the following are true:
TDF = TIE = 1
KSF = KIE = 1
WDF = WDE = 1
i.e., IRQF = (TDF x TIE) + (KSF x KIE) + (WDF x WDE)
Any time the IRQF bit is 1, the IRQ pin is driven low.
Clearing IRQ and Flags
The time-of-day/date alarm flag (TDF), watchdog flag (WDF), kickstart flag (KSF), and interrupt request flag (IRQF)
are cleared by reading the flag register (0EH). The address must be stable for a minimum of 15ns while CE and OE
are active. After the address stable requirement has been met, either a change in address, a rising edge of OE, or
a rising edge of CE causes the flags to be cleared. The IRQ pin goes inactive after the IRQF flag is cleared. TDF
and WDF can also be cleared by writing to 0.

DS1501W+

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