IDT1339
REAL-TIME CLOCK WITH SERIAL I
2
C INTERFACE RTC
IDT®
REAL-TIME CLOCK WITH SERIAL I
2
C INTERFACE 7
IDT1339 REV S 031014
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 IDT1339 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 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 1 Hz square-wave output transitions
high 500 ms after the seconds data transfer, provided the
oscillator is already running.
Alarms
The IDT1339 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.
IDT1339
REAL-TIME CLOCK WITH SERIAL I
2
C INTERFACE RTC
IDT®
REAL-TIME CLOCK WITH SERIAL I
2
C INTERFACE 8
IDT1339 REV S 031014
Table 4. Alarm Mask Bits
Special-Purpose Registers
The IDT1339 has two additional registers (control and status) that control the RTC, alarms, and square-wave output.
Control Register (0Eh)
Bit 7: Enable Oscillator (EOSC). This bit when set to logic 0 starts the oscillator. When this bit is set to a logic 1,
the oscillator is stopped. This bit is enabled (logic 0) when power is first applied.
Bit 5: Battery-Backed Square-Wave and Interrupt Enable (BBSQI). This bit when set to a logic 1 enables the
square wave or interrupt output when
V
CC
is absent and the IDT1339 is being powered by the V
BACKUP
pin. When
BBSQI is a logic 0, the SQW/INT
pin goes high impedance when V
CC
falls below the power-fail trip point. This bit is
disabled (logic 0) when power is first applied.
Bits 4 and 3: Rate Select (RS2 and RS1). These bits control the frequency of the square-wave output when the
square wave has been enabled. Table 5 shows the square-wave frequencies that can be selected with the RS bits.
These bits are both set to logic 1 (32 kHz) when power is first applied.
DY/DT
Alarm 1 Register Mask Bits (Bit 7) Alarm Rate
A1M4 A1M3 A1M2 A1M1
X1111Alarm once per second.
X1110Alarm when seconds match.
X1100Alarm when minutes and seconds match.
X1000Alarm when hours, minutes, and seconds match.
00000Alarm when date, hours, minutes, and seconds match.
10000Alarm when day, hours, minutes, and seconds match.
DY/DT Alarm 2 Register Mask Bits (Bit 7) Alarm Rate
A2M4 A2M3 A2M2
X 1 1 1 Alarm once per minute (00 sec. of every min.).
X 1 1 0 Alarm when minutes match.
X 1 0 0 Alarm when hours and minutes match.
0 0 0 0 Alarm when date, hours, and minutes match.
1 0 0 0 Alarm when day, hours, and minutes match.
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
EOSC 0 BBSQI RS2 RS1 INTCN A2IE A1IE
IDT1339
REAL-TIME CLOCK WITH SERIAL I
2
C INTERFACE RTC
IDT®
REAL-TIME CLOCK WITH SERIAL I
2
C INTERFACE 9
IDT1339 REV S 031014
Table 5. SQW/INT Output
Bit 2: Interrupt Control (INTCN). This bit controls the relationship between the two alarms and the interrupt output
pins. When the INTCN bit is set to logic 1, a match between the timekeeping registers and the alarm 1 or alarm 2
registers activate the SQW/INT
pin (provided that the alarm is enabled). When the INTCN bit is set to logic 0, a
square wave is output on the SQW/INT
pin. This bit is set to logic 0 when power is first applied.
Bit 1: Alarm 2 Interrupt Enable (A2IE). When set to a logic 1, this bit permits the Alarm 2 Flag (A2F) bit in the
status register to assert SQW/INT
(when INTCN = 1). When the A2IE bit is set to logic 0 or INTCN is set to logic 0,
the A2F bit does not initiate an interrupt signal. The A2IE bit is disabled (logic 0) when power is first applied.
Bit 0: Alarm 1 Interrupt Enable (A1IE). When set to logic 1, this bit permits the Alarm 1 Flag (A1F) bit in the status
register to assert SQW/INT
(when INTCN = 1). When the A1IE bit is set to logic 0 or INTCN is set to logic 0, the A1F
bit does not initiate an interrupt signal. The A1IE bit is disabled (logic 0) when power is first applied.
Status Register (0Fh)
Bit 7: Oscillator Stop Flag (OSF). A logic 1 in this bit indicates that the oscillator either is stopped or was stopped
for some period of time and may be used to judge the validity of the clock and date data. This bit is edge triggered
and is set to logic 1 when the oscillator stops. The following are examples of conditions that can cause the OSF bit
to be set:
1) The first time power is applied.
2) The voltage on both
V
CC
and V
BACKUP
are insufficient to support oscillation.
3) The EOSC
bit is turned off.
4) External influences on the crystal (e.g., noise, leakage, etc.).
This bit remains at logic 1 until written to logic 0. This bit can only be written to a logic 0.
Bit 1: Alarm 2 Flag (A2F). A logic 1 in the Alarm 2 Flag bit indicates that the time matched the alarm 2 registers. If
the A2IE bit is a logic 1 and the INTCN bit is set to a logic 1, the SQW/INT
pin is also asserted. A2F is cleared when
written to logic 0. This bit can only be written to logic 0. Attempting to write to logic 1 leaves the value unchanged.
Bit 0: Alarm 1 Flag (A1F). A logic 1 in the Alarm 1 Flag bit indicates that the time matched the alarm 1 registers. If
the A1IE bit is a logic 1 and the INTCN bit is set to a logic 1, the SQW/INT
pin is also asserted. A1F is cleared when
written to logic 0. This bit can only be written to logic 0. Attempting to write to logic 1 leaves the value unchanged.
INTCN RS2 RS1 SQW/INT
Output A2IE A1IE
000 1 Hz XX
0 0 1 4.096 kHz X X
0 1 0 8.192 kHz X X
0 1 1 32.768 kHz X X
1XX A1F
01
1XX A2F
10
1XX A2F + A1F 11
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
OSF00000A2FA1F

1339AC-2SRGI8

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