DS1339 I
2
C Serial Real-Time Clock
10 of 20
Table 2. Crystal Specifications*
PARAMETER SYMBOL MIN TYP MAX UNITS
Nominal Frequency f
O
32.768 kHz
Series Resistance ESR 50
k
Load Capacitance C
L
6 pF
*The crystal, traces, and crystal input pins should be isolated from RF generating signals. Refer to
Application Note 58: Crystal Considerations for Dallas Real-Time Clocks for additional specifications.
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 may result in the clock running fast.
Figure 4 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
DS1339C ONLY
The DS1339C 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.
Figure 4. Typical PC Board Layout for Crystal
LOCAL GROUND PLANE (LAYER 2)
CRYSTAL
X1
X2
GND
NOTE: AVOID 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.
DS1339 I
2
C Serial Real-Time Clock
11 of 20
ADDRESS MAP
Table 3 shows the address map for the DS1339 registers. During a multibyte access, when the address pointer
reaches the end of the register space (10h), 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 3. 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 0059
01h 0 10 Minutes Minutes Minutes 0059
02h 0 12/24
AM/PM
10 Hour Hour Hours
1–12
+AM/PM
0023
20 Hour
03h
0
0
0
0
0
Day
Day
1–7
04h
0
0
10 Date
Date
Date
0131
05h Century 0 0
10
Month
Month
Month/
Century
0112 +
Century
06h 10 Year Year Year 0099
07h A1M1 10 Seconds Seconds
Alarm 1
Seconds
0059
08h A1M2 10 Minutes Minutes
Alarm 1
Minutes
0059
09h A1M3 12/24
AM/PM
10 Hour Hour
Alarm 1
Hours
1–12 +
AM/PM
0023
20 Hour
0Ah A1M4 DY/DT 10 Date Day, Date
Alarm 1
Day,
Alarm 1
Date
1-7, 1-31
0Bh A2M2 10 Minutes Minutes
Alarm 2
Minutes
0059
0Ch A2M3
12/24
AM/PM
10 Hour Hour
Alarm 2
Hours
1–12 +
AM/PM
0023
20 Hour
0Dh A2M4
DY/DT
10 Date Day, Date
Alarm 2
Day,
Alarm 2
Date
1–7, 131
0Eh
EOSC
0 BBSQI RS2 RS1 INTCN A2IE A1IE Control
0Fh OSF 0 0 0 0 0 A2F A1F Status
10h TCS3 TCS2 TCS1 TCS0 DS1 DS0
ROUT1 ROUT0
Trickle
Charger
Note: Unless otherwise specified, the state of the registers are not defined when power is first applied or when V
CC
and V
BACKUP
falls below the
V
BACKUP(MIN)
.
DS1339 I
2
C Serial Real-Time Clock
12 of 20
TIME AND DATE OPERATION
The time and date information is obtained by reading the appropriate register bytes. Table 3 shows the RTC
registers. The time and date are set or initialized by writing the appropriate register bytes. The contents of the time
and date registers are in the BCD format. The DS1339 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 20-hour bit (20 to
23 hours). All hours values, including the alarms, must be re-entered 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 to 00.
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 address pointer rolls over to zero. The countdown chain
is reset whenever the seconds register is written. Write transfers occurs 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 one second. If enabled, the 1Hz square-wave output transitions high 500ms after the seconds data
transfer, provided the oscillator is already running.
ALARMS
The DS1339 contains two time of day/date alarms. Alarm 1 can be set by writing to registers 07h to 0Ah. Alarm 2
can be set by writing to registers 0Bh to 0Dh. The alarms can be programmed (by the Alarm Enable and INTCN
bits of the Control Register) to activate the SQW/INT output on an alarm match condition. 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 a 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.
The device checks for an alarm match once per second. When the RTC register values match alarm register
settings, the corresponding Alarm Flag ‘A1F’ or ‘A2F’ bit is set to logic 1. If the corresponding Alarm Interrupt
Enable ‘A1IE’ or ‘A2IE’ is also set to logic 1 and the INTCN bit is set to logic 1, the alarm condition activates the
SQW/INT) signal. If the BBSQI bit is set to 1, the INT output activates while the part is being powered by V
BACKUP
.
The alarm output remains active until the alarm flag is cleared by the user.

DS1339U-2+

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