DS1339 I C Serial Real-Time Clock
2
DETAILED DESCRIPTION
The DS1339 serial real-time clock (RTC) is a low-power clock/date device with two programmable time-of-day
2
alarms and a programmable square-wave output. Address and data are transferred serially through an I C bus.
The clock/date provides seconds, minutes, hours, day, date, month, and year information. The date at the end of
the month is automatically adjusted for months with fewer than 31 days, including corrections for leap year. The
clock operates in either the 24-hour or 12-hour format with AM/PM indicator. The DS1339 has a built-in power-
sense circuit that detects power failures and automatically switches to the backup supply, maintaining time and
date operation.
OPERATION
The DS1339 operates as a slave device on the serial bus. Access is obtained by implementing a START condition
and providing a device identification code followed by data. Subsequent registers can be accessed sequentially
until a STOP condition is executed. The device is fully accessible and data can be written and read when V
CC
is
greater than V
PF
. However, when V
CC
falls below V
PF
, the internal clock registers are blocked from any access. If
V
PF
is less than V
BACKUP
, the device power is switched from V
CC
to V
BACKUP
when V
CC
drops below V
PF
. If V
PF
is
greater than V
BACKUP
, the device power is switched from V
CC
to V
BACKUP
when V
CC
drops below V
BACKUP
. The
registers are maintained from the V
BACKUP
source until V
CC
is returned to nominal levels. The block diagram in
Figure 3 shows the main elements of the serial real-time clock.
OSCILLATOR CIRCUIT
The DS1339 uses an external 32.768kHz crystal. The oscillator circuit does not require any external resistors or
capacitors to operate. Table 1 specifies several crystal parameters for the external crystal. Figure 4 shows a
functional schematic of the oscillator circuit. The startup time is usually less than 1 second when using a crystal
with the specified characteristics.
8 of 18