IDT1337G
REAL-TIME CLOCK WITH I
2
C SERIAL INTERFACE RTC
IDT®
REAL-TIME CLOCK WITH I
2
C SERIAL INTERFACE 7
IDT1337G REV M 073013
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 IDT1337G 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 IDT1337G 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.
IDT1337G
REAL-TIME CLOCK WITH I
2
C SERIAL INTERFACE RTC
IDT®
REAL-TIME CLOCK WITH I
2
C SERIAL INTERFACE 8
IDT1337G REV M 073013
Table 2. Alarm Mask Bits
Special-Purpose Registers
The IDT1337G 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
IDT1337G
REAL-TIME CLOCK WITH I
2
C SERIAL INTERFACE RTC
IDT®
REAL-TIME CLOCK WITH I
2
C SERIAL INTERFACE 9
IDT1337G REV M 073013
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 and alarm 2 registers activates the INTA pin (provided that
the alarm is enabled). Alarm 1 registers have no effect on the INTA
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 INTCN = 1). It does not assert any interrupt pins when INTCN=0. 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.
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 calendar data. This bit is set to logic
1 anytime 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 present on VCC is 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.
This flag can be used to generate an interrupt on either INTA
or SQW/INTB depending on the status of the INTCN
bit in the control register. If the INTCN bit is set to logic 0 and A2F is at logic 1 (and A2IE bit is also logic 1), the INTA
pin goes low. If the INTCN bit is set to logic 1 and A2F is logic 1 (and A2IE bit is also logic 1), the SQW/INTB
pin
goes low. 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 also a logic 1, the INTA
pin goes low. 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.
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
OSF00000A2FA1F

1337GDVGI

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

Products related to this Datasheet