Datasheet

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
ADDRESS
DATA
FUNCTION
BCD
RANGE
B7
B6
B5
B4
B3
B2
B1
B0
00h
0
10 Seconds
Seconds
Seconds
0059
01h
0
10 Minutes
Minutes
Minutes
0059
02h
0
0
10 Hours
Hour
Hours
0023
03h
0
0
0
0
0
Day
Day
1–7
04h
0
0
10 Date
Date
Date
0131
05h
EOSC
E32K
BB32
10 Month
Month
Month
0112
06h
10 Year
Year
Year
0099
07h
10 Century
Century
Century
0039
08h
AM1
10 Seconds
Seconds
Alarm Seconds
0059
09h
AM2
10 Minutes
Minutes
Alarm Minutes
0059
0Ah
AM3
0
10 Hours
Hour
Alarm Hours
0023
0Bh AM4
DY/
DT
10 Date Day/Date Alarm Day/Date 1–7/131
0Ch
0.1 Second
0.01 Second
Watchdog
0099
0Dh
10 Second
Second
Watchdog
0099
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
00FF
11h
Reserved
12h
Reserved
13h
Extended RAM Data
RAM Data
00FF
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.