Description, Operation, Figure 1. block diagram – Rainbow Electronics DS1339 User Manual
Page 2
DS1339
2 of 18
DESCRIPTION
The DS1339 serial real-time clock is a low-power clock/date device with two programmable time-of-day
alarms and a programmable square-wave output. Address and data are transferred serially by a 2-wire
bidirectional 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.
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 1 shows the main elements of the
serial real-time clock.
Figure 1. BLOCK DIAGRAM
TIMEKEEPING,
CONTROL,
AND
TRICKLE
CHARGE
REGISTERS
SERIAL BUS
INTERFACE
OSCILLATOR
AND
DIVIDER
ADDRESS
REGISTER
CONTROL
LOGIC
SCL
SDA
X1
X2
SQW/
INT
POWER
CONTROL
V
CC
V
BACKUP