IDT1337AG
REAL-TIME CLOCK WITH I
2
C SERIAL INTERFACE RTC
IDT®
REAL-TIME CLOCK WITH I
2
C SERIAL INTERFACE 7
IDT1337AG REV C 011514
Clock and Calendar
The time and calendar information is obtained by reading
the appropriate register bytes. The RTC registers are
illustrated in Table 1. 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 IDT1337AG 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 IDT1337AG 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 INTCN bits 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 1).
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 2 (Alarm Mask Bits table) 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.
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, 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.
IDT1337AG
REAL-TIME CLOCK WITH I
2
C SERIAL INTERFACE RTC
IDT®
REAL-TIME CLOCK WITH I
2
C SERIAL INTERFACE 8
IDT1337AG REV C 011514
Table 2. Alarm Mask Bits
Special-Purpose Registers
The IDT1337AG 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 active-low 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.
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 3 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.
Table 3. SQW/INT Output
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 seconds of every minute).
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 0 RS2 RS1 INTCN A2IE A1IE
INTCN RS2 RS1 SQW/INTB Output A2IE
000 1 Hz X
0 0 1 4.096 kHz X
0 1 0 8.192 kHz X
0 1 1 32.768 kHz X
1XX A2F
1
IDT1337AG
REAL-TIME CLOCK WITH I
2
C SERIAL INTERFACE RTC
IDT®
REAL-TIME CLOCK WITH I
2
C SERIAL INTERFACE 9
IDT1337AG REV C 011514
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 registers
activate the INTA
pin (provided that the alarm is enabled) and a match between the timekeeping registers and the
alarm 2 registers activates the SQW/INTB
pin (provided that the alarm is enabled). When the INTCN bit is set to
logic 0, a square wave is output on the SQW/INTB
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 INTA
(when INTCN = 0) or to assert SQW/INTB (when INTCN = 1). When the A2IE bit 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 INTA
. When the A1IE bit is set to logic 0, the A1F bit does not initiate the INTA signal. The A1IE
bit is disabled (logic 0) when power is first applied.
Table 4. Alarm/Interrupt Table
Bit 2 Bit 1 Bit 0
INTCN A2IE A1IE Alarm 1 Alarm 2 INTA
INTB/SQW
000 None None Hi SQW
0 0 1 INTA None Alarm 1 SQW
0 1 0 None INTA Alarm 2 SQW
0 1 1 INTA INTA Alarm 1 or Alarm 2 SQW
100 None None Hi Hi
101 INTA None Alarm 1 Hi
110 None INTB Hi Alarm 2
1 1 1 INTA INTB Alarm 1 Alarm 2

1337AGDCGI8

Mfr. #:
Manufacturer:
IDT
Description:
Real Time Clock RTC I2c Serial IC 1.8 to 5.5V 32kHz
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union