DS1337 I
2
C Serial Real-Time Clock
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. Crystal
frequency drift caused by temperature shifts creates additional error. External circuit noise coupled into the
oscillator circuit can result in the clock running fast. Figure 1
shows a typical PC board layout for isolating the
crystal and oscillator from noise. Refer to Application Note 58: Crystal Considerations with Dallas Real-Time
Clocks for detailed information.
Figure 1. Typical PC Board Layout for Crystal
LOCAL GROUND PLANE (LAYER 2)
X1
CRYSTAL
X2
GND
NOTE:
A
VOID ROUTING SIGNALS IN THE CROSSHATCHED
AREA (UPPER LEFT-HAND QUADRANT) OF THE PACKAGE
UNLESS THERE IS A GROUND PLANE BETWEEN THE SIGNAL
LINE AND THE PACKAGE.
DS1337C ONLY
The DS1337C integrates a standard 32,768Hz crystal in the package. Typical accuracy at nominal V
CC
and +25°C
is approximately +10ppm. Refer to Application Note 58 for information about crystal accuracy vs. temperature.
OPERATING MODES
The amount of current consumed by the DS1337 is determined, in part, by the I
2
C interface and oscillator
operation. The following table shows the relationship between the operating mode and the corresponding I
CC
parameter.
Operating Mode V
CC
Power
I
2
C Interface Active 1.8V V
CC
5.5V I
CC
Active (I
CCA
)
I
2
C Interface Inactive 1.8V V
CC
5.5V I
CC
Standby (I
CCS
)
I
2
C Interface Inactive 1.3V V
CC
1.8V Timekeeping (I
CCTOSC
)
I
2
C Interface Inactive
Oscillator Disabled 1.3V V
CC
1.8V
Data Retention
(I
CCTDDR
)
DS1337 I
2
C Serial Real-Time Clock
ADDRESS MAP
Table 2 shows the address map for the DS1337 registers. During a multibyte access, when the address pointer
reaches the end of the register space (0Fh) it wraps around to location 00h. On an I
2
C START, STOP, or address
pointer incrementing to location 00h, the current time is transferred to a second set of registers. The time
information is read from these secondary registers, while the clock may continue to run. This eliminates the need
to re-read the registers in case of an update of the main registers during a read.
Table 2. Timekeeper Registers
ADDRESS BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0 FUNCTION RANGE
00H 0 10 Seconds Seconds Seconds 00–59
01H 0 10 Minutes Minutes Minutes 00–59
AM/PM
02H 0
12/24
10 Hour
10 Hour Hour Hours
1–12
+AM/PM
00–23
03H 0 0 0 0 0 Day Day 1–7
04H 0 0 10 Date Date Date 01–31
05H Century 0 0 10 Month Month
Month/
Century
01–12 +
Century
06H 10 Year Year Year 00–99
07H A1M1 10 Seconds Seconds
Alarm 1
Seconds
00–59
08H A1M2 10 Minutes Minutes
Alarm 1
Minutes
00–59
AM/PM
09H A1M3
12/24
10 Hour
10 Hour Hour
Alarm 1
Hours
1–12 +
AM/PM
00–23
Day
Alarm 1
Day
1–7
0AH A1M4
DY/DT
10 Date
Date
Alarm 1
Date
01–31
0BH A2M2 10 Minutes Minutes
Alarm 2
Minutes
00–59
AM/PM
0CH A2M3
12/24
10 Hour
10 Hour Hour
Alarm 2
Hours
1–12 +
AM/PM
00–23
Day
Alarm 2
Day
1–7
0DH A2M4
DY/DT
10 Date
Date
Alarm 2
Date
01–31
0EH
EOSC
0 0 RS2 RS1 INTCN A2IE A1IE Control
0FH OSF 0 0 0 0 0 A2F A1F Status —
Note: Unless otherwise specified, the state of the registers is not defined when power is first applied or V
CC
falls below the V
OSC
.
I
2
C INTERFACE
The I
2
C interface is accessible whenever V
CC
is at a valid level. If a microcontroller connected to the DS1337 resets
while reading from the DS1337 during an I
2
C read, the two could become unsynchronized. The microcontroller must
terminate the last byte read with a Not-Acknowledge (NACK) to properly terminate the read. When the microcontroller
resets, the DS1337 I
2
C interface may be placed into a known state by toggling SCL until SDA is observed to be at a
high level. At that point the microcontroller should pull SDA low while SCL is high, generating a START condition.
DS1337 I
2
C Serial Real-Time Clock
CLOCK AND CALENDAR
The time and calendar information is obtained by reading the appropriate register bytes. The RTC registers are
illustrated in Table 2
. The time and calendar are set or initialized by writing the appropriate register bytes. The
contents of the time and calendar registers are in the binary-coded decimal (BCD) format.
The day-of-week register increments at midnight. Values that correspond to the day of week are user-defined but
must be sequential (i.e., if 1 equals Sunday, then 2 equals Monday, and so on.). Illogical time and date entries
result in undefined operation.
When reading or writing the time and date registers, secondary (user) buffers are used to prevent errors when the
internal registers update. When reading the time and date registers, the user buffers are synchronized to the
internal registers on any start or stop and when the register pointer rolls over to zero.
The countdown chain is reset whenever the seconds register is written. Write transfers occur on the acknowledge
pulse from the device. To avoid rollover issues, once the countdown chain is reset, the remaining time and date
registers must be written within 1 second. The 1Hz square-wave output, if enable, transitions high 500ms after the
seconds data transfer, provided the oscillator is already running.
The DS1337 can be run in either 12-hour or 24-hour mode. Bit 6 of the hours register is defined as the 12- or
24-hour mode-select bit. When high, the 12-hour mode is selected. In the 12-hour mode, bit 5 is the AM/PM bit
with logic high being PM. In the 24-hour mode, bit 5 is the second 10-hour bit (20–23 hours). All hours values,
including the alarms, must be reinitialized whenever the 12/24-hour mode bit is changed. The century bit (bit 7 of
the month register) is toggled when the years register overflows from 99–00.
ALARMS
The DS1337 contains two time-of-day/date alarms. Alarm 1 can be set by writing to registers 07h–0Ah. Alarm 2
can be set by writing to registers 0Bh–0Dh. The alarms can be programmed (by the INTCN bit of the control
register) to operate in two different modes—each alarm can drive its own separate interrupt output or both alarms
can drive a common interrupt output. Bit 7 of each of the time-of-day/date alarm registers are mask bits (Table 2
).
When all of the mask bits for each alarm are logic 0, an alarm only occurs when the values in the timekeeping
registers 00h–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 3
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–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 logic 1, the alarm is the result of a match with day of the
week.
When the RTC register values match alarm register settings, the corresponding alarm flag (A1F or A2F) bit is set
to logic 1. The bit(s) will remain at a logic 1 until written to a logic 0 by the user. If the corresponding alarm
interrupt enable (A1IE or A2IE) is also set to logic 1, the alarm condition activates one of the interrupt output (INTA
or SQW/INTB) signals. The match is tested on the once-per-second update of the time and date registers.

DS1337S

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

Products related to this Datasheet