DS1558
7 of 18
CLOCK OPERATIONS
Table 2 and the following paragraphs describe the operation of the RTC, alarm, and watchdog functions.
Table 2. DS1558 REGISTER MAP
DATA
ADDR GE ESS
B
7
B
6
B
5
B
4
B
3
B
2
B
1
B
0
FUNCTION/RAN
7FFFF 00–99 h 10 YEAR YEAR YEAR
7FFF 01–12 Eh X X X 10 M MONTH MONTH
7FFFD 01–31 h X X 10 DATE DATE DATE
7FFF 01–07 Ch X FT X X X DAY DAY
7FFF 00–23 Bh X X 10 HOUR HOUR HOUR
7FFFAh X 10 MINUTES MINUTES MINUTES 00–59
7FFF9h
OSC
10 SECONDS SECONDS SECONDS 00–59
7FFF 00–39 8h W R 10 CENTURY CENTURY CONTROL
7FFF7h WDS BMB4 BMB3 BMB2 BMB1 BMB0 RB1 RB0 WATCHDOG
7FFF6h AE Y ABE Y Y Y Y Y INTERRUPTS
7FFF5h AM4 Y 10 DATE DATE ALARM DATE 01–31
7FF A 1 HOURS ALARM HOURS 00–23 F4h M3 Y 0 HOURS
7FFF3h A 1 INUT MINUTES ALARM MINUTES 00–59 M2 0 M ES
7FFF2h A 1 CO SECONDS ALARM SECONDS 00–59 M1 0 SE NDS
7FFF1h Y Y Y UNUSED Y Y Y Y Y
7FFF0h W 0 F 0 FLAGS F AF BL 0 0 0
X = Unused, Read/Writeable Under Write and
Y = Unused, Read/Writeable Without Write and Read Bit Control
BLF = Batter w Flag
CLOCK OSCILLATOR CONTROL
The oscillator can be turned off to minimi the battery. The
Read Bit Control AE = Alarm Flag Enable
FT = Frequency Test Bit
OSC = Oscillator Start/Stop Bit
ABE = Alarm in Backup-Battery Mode Enable
W = Write Bit AM1–AM4 = Alarm Mask Bits
R = Read Bit WF = Watchdog Flag
WEN = Watchdog Enable Bit AF = Alarm Flag
BMB0–BMB4 = Watchdog Multiplier Bits 0 = Reads as a 0 and Cannot Be Changed
RB0–RB1 = Watchdog Resolution Bits y Lo
ze current drain from OSC
the seconds register (B7 of 7FFF9h). Setting
bit is the MSB of
OSC to a 1 stops the oscillator; setting to a 0 starts the
oscillator. The initial state of OSC is not guaranteed. When power is applied for the first time, the OSC
bit should be enabled. quency can be verified by se bit and
monitoring the
Oscillator operation and fre tting the FT
IRQ
/FT pin for 512Hz.
OSCILLATOR STARTUP TIME
Oscillator startup times are highly dependent upon crystal characteristics 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 following the recommended layout usually starts within 1 second.
DS1558
8 of 18
of double-buffered
ad without register
tinue while in this
he control register
t halt is issued,
alt com
t ume within 1 second after the read bit is set to
s. The read bit m inimum of 500 s to ensure the extern
e the read bit, halts
updates to the 7FFF8h–7FFFFh registers. After setting the write bit to a 1, RTC registers can be loaded
rite bit to a 0 then
resume.
y of the clock is dependent upon the accuracy of the crystal and the accuracy of the match
load for which the crystal was
by temperature shifts. External
o the oscillator circuit can result in the clock running fast. Refer to Application
n.
READING THE CLOCK
When reading the RTC data, it is recomme ed to halt updates to the external set
RTC registers. This puts the external registers into a static state, allowing data to be re
values changing during the read process. Normal updates to the internal registers con
state. External updates are halted when a 1 is written into the read bit, B6 of t
(7FFF8h). As long as a 1 remains in the control register read bit, updating is halted. Af
the registers reflect the RTC count (day, date, and time) that was current at the moment
is issued. Normal updates to the external se f registers
nd
o
u
er a
the h mand
al
re
st be a 0 for a m
s
a 0 for a minimum of 500
registers are updated.
SETTING THE CLOCK
The MSB bit, B7, of the control register is the write bit. Setting the write bit to a 1, lik
with the desired RTC count (day, date, and time) in 24-hour BCD format. Setting the w
transfers the values written to the internal RTC registers and allows normal operation to
CLOCK ACCURACY
The accurac
between the capacitive load of the oscillator circuit and the capacitive
trimmed. Additional error is added by the crystal-frequency drift caused
circuit noise coupled int
Note 58 “Crystal Considerations with Dallas Real-Time Clocks” for detailed informatio
FREQUENCY TEST MODE
The DS1558 frequency test mode uses the open-drain IRQ /FT output. With the oscillator running, the
IRQ /FT output toggles at 512Hz when the FT bit is a 1, the alarm-flag enable bit (AE) is a 0, and the
r the watchdog register is reset (register 7FFF7h = 00h). The watchdog-enable bit (WDS) is a 1, o
IRQ
/FT
of the 32.768kHz output and the frequency test mode can be used as a measure of the actual frequency
RTC oscillator. The
IRQ /FT pin is an open-drain output that requires a pullup resistor for proper
operation. The FT bit is cleared to a 0 on power-up.
. Register 7FFF6h
The AE and ABE
bits must be set as described below for the
USING THE CLOCK ALARM
The alarm settings and control for the DS1558 reside within registers 7FFF2h–7FFF5h
contains two alarm-enable bits: alarm enable (AE) and alarm in backup enable (ABE).
IRQ
/FT output to be activated for a matched alarm condition.
The alarm can be programmed to activate on a specific day of the month or repeat every day, hour,
minute, or second. It can also be programmed to go off while the DS1558 is in the battery-backed state of
operation to serve as a system wake-up. Alarm mask bits AM1–AM4 control the alarm mode. Table 3
ions not listed in the table default to the once-per-second mode to
notify the user of an incorrect alarm setting.
shows the possible settings. Configurat
DS1558
9 of 18
AM1 ALARM RATE
Table 3. ALARM MASK BITS
AM4 AM3 AM2
1 1 1 1 Once per second
1 1 1 0 Whe ec s man s ond tch
1 1 0 0 minutes and s match When second
1 0 0 hours, minutes, and seconds match 0 When
0 0 0 When date, hours, m s, and s s match 0 inute econd
W he R C regis atch alarm s, AF a 1. If AE is also set to a 1, the
a ond ac i
hen t T ter values m register setting is set to
larm c ition t vates the IRQ /FT pin. The IRQ /FT signal by a or write to the flags
register (address 7FFF0h). W
is cleared read
hen
CE
h is active, t e IRQ /FT si clear by having the address gnal can be ed
stable for as short as 15ns and either OE or
WE
active, ut is teed e cleared unless t
RC
is
fulfilled (F ess has been s
b not guaran to b
igure 2). Once the addr elected for at least 15ns, the IRQ al can be cleared
i ate ut is eed to be c til t
RC
is re he alarm flag is also
c by ad or e flags reg the flag e s until the end of the
read/write cycle and the
/FT sign
mmedi ly, b not guarant leared un fulfilled (Figu 3). T
leared a re write to th ister, but does not chang state
IRQ /FT igna as b cl ed
s l h een ear .
The IRQ /FT pin can also be activated in ked mode. The the battery-bac IRQ /FT goes low if an alarm
ABE and AE are set. Th he power-up transition,
ted during power-up se can be read after system power-up
ine if an alarm was generated d sequence. Figure 4 illustrates alarm timing
ttery mode and power-up states.
occurs and both e ABE and AE bits are cleared during t
but an alarm genera ts AF. Therefore, the AF bit
to determ uring the power-up
during the backup-ba
Figure 2. CLEARING IRQ WAVEFORMS ACTIVE
Figure 3. CLEARING IRQ WAVEFORMS

DS1558W-TRL

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