DS1306
7 of 22
registers is set to a logic 1. Similarly, an alarm is generated every minute when bit 7 of the day, hour, and
minute alarm registers is set to a logic 1. When bit 7 of the day, hour, minute, and seconds alarm registers
is set to a logic 1, an alarm occurs every second.
During each clock update, the RTC compares the Alarm 0 and Alarm 1 registers with the corresponding
clock registers. When a match occurs, the corresponding alarm flag bit in the status register is set to a 1. If
the corresponding alarm interrupt enable bit is enabled, an interrupt output is activated.
Table 2. TIME-OF-DAY ALARM MASK BITS
ALARM REGISTER MASK BITS (BIT 7)
SECONDS MINUTES HOURS DAYS
FUNCTION
1 1 1 1 Alarm once per second
0 1 1 1 Alarm when seconds match
0 0 1 1 Alarm when minutes and seconds match
0 0 0 1 Alarm hours, minutes, and seconds match
0 0 0 0 Alarm day, hours, minutes and seconds match
SPECIAL PURPOSE REGISTERS
The DS1306 has three additional registers (control register, status register, and trickle charger register)
that control the real-time clock, interrupts, and trickle charger.
CONTROL REGISTER (READ 0Fh, WRITE 8Fh)
BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0
0 WP 0 0 0 1Hz AIE1 AIE0
WP (Write Protect) – Before any write operation to the clock or RAM, this bit must be logic 0. When
high, the write protect bit prevents a write operation to any register, including bits 0, 1, and 2 of the
control register. Upon initial power-up, the state of the WP bit is undefined. Therefore, the WP bit should
be cleared before attempting to write to the device. When WP is set, it must be cleared before any other
control register bit can be written.
1Hz (1Hz Output Enable) – This bit controls the 1Hz output. W
hen this bit is a logic 1, the 1Hz output
is enabled. When this bit is a logic 0, the 1Hz output is high-Z.
AIE0 (Alarm Interrupt Enable 0) – When set to a logic 1, this bit permits the interrupt 0 request flag
(IRQF0) bit in the status register to assert INT0 . When the AIE0 bit is set to logic 0, the IRQF0 bit does
not initiate the INT0 signal.
AIE1 (Alarm Interrupt Enable 1) – W
hen set to a logic 1, this bit permits the interrupt 1 request flag
(IRQF1) bit in the status register to assert INT1. When the AIE1 bit is set to logic 0, the IRQF1 bit does
not initiate an interrupt signal, and the INT1 pin is set to a logic 0 state.
DS1306
8 of 22
STATUS REGISTER (READ 10H)
BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0
0 0 0 0 0 0 IRQF1 IRQF0
IRQF0 (Interrupt 0 Request Flag) – A logic 1 in the interrupt request flag bit indicates that the current
time has matched the Alarm 0 registers. If the AIE0 bit is also a logic 1, the
INT0 pin goes low. IRQF0 is
cleared when the address pointer goes to any of the Alarm 0 registers during a read or write. IRQF0 is
activated when the device is powered by V
CC1
, V
CC2
, or V
BAT
.
IRQF1 (Interrupt 1 Request Flag) – A logic 1 in the interrupt request flag bit indicates that the current
time has matched the Alarm 1 registers. If the AIE1 bit is also a logic 1, the INT1 pin generates a 62.5ms
active-high pulse. IRQF1 is cleared when the address pointer goes to any of the alarm 1 registers during a
read or write. IRQF1 is activated only when the device is powered by V
CC2
or V
BAT
.
TRICKLE CHARGE REGISTER (READ 11H, WRITE 91H)
This register controls the trickle charge characteristics of the DS1306. The simplified schematic of Figure
3 shows the basic components of the trickle charger. The trickle charge select (TCS) bits (bits 4–7)
control the selection of the trickle charger. In order to prevent accidental enabling, only a pattern of 1010
enables the trickle charger. All other patterns disable the trickle charger. The DS1306 powers up with the
trickle charger disabled. The diode select (DS) bits (bits 2–3) select whether one diode or two diodes are
connected between V
CC1
and V
CC2
. The diode select (DS) bits (bits 2–3) select whether one diode or two
diodes are connected between V
CC1
and V
CC2
. The resistor select (RS) bits select the resistor that is
connected between V
CC1
and V
CC2
. The resistor and diodes are selected by the RS and DS bits as shown
in Table 3.
Figure 3. PROGRAMMABLE TRICKLE CHARGER
DS1306
9 of 22
Table 3. TRICKLE CHARGER RESISTOR AND DIODE SELECT
TCS
Bit 7
TCS
Bit 6
TCS
Bit 5
TCS
Bit 4
DS
Bit 3
DS
Bit 2
RS
Bit 1
RS
Bit 0
FUNCTION
X X X X X X 0 0 Disabled
X X X X 0 0 X X Disabled
X X X X 1 1 X X Disabled
1 0 1 0 0 1 0 1 1 Diode, 2k
1 0 1 0 0 1 1 0 1 Diode, 4k
1 0 1 0 0 1 1 1 1 Diode, 8k
1 0 1 0 1 0 0 1 2 Diodes, 2k
1 0 1 0 1 0 1 0 2 Diodes, 4k
1 0 1 0 1 0 1 1 2 Diodes, 8k
0 1 0 1 1 1 0 0 Initial power-on state
If RS is 00, the trickle charger is disabled independently of TCS.
Diode and resistor selection is determined by the user according to the maximum current desired for
battery or super cap charging. The maximum charging current can be calculated as illustrated in the
following example. Assume that a system power supply of 5V is applied to V
CC1
and a super cap is
connected to V
CC2
. Also assume that the trickle charger has been enabled with one diode and resister R1
between V
CC1
and V
CC2
. The maximum current I
MAX
would, therefore, be calculated as follows:
I
MAX
= (5.0V - diode drop) / R1 (5.0V - 0.7V) / 2k 2.2mA
As the super cap charges, the voltage drop between V
CC1
and V
CC2
decreases and, therefore, the charge
current decreases.
POWER CONTROL
Power is provided through the V
CC1
, V
CC2
, and V
BAT
pins. Three different power supply configurations
are illustrated in Figure 4. Configuration 1 shows the DS1306 being backed up by a non-rechargeable
energy source such as a lithium battery. In this configuration, the system power supply is connected to
V
CC1
and V
CC2
is grounded. When V
CC
falls below V
BAT
the device switches into a low-current battery
backup mode. Upon power-up, the device switches from V
BAT
to V
CC
when V
CC
is greater than
V
BAT
+ 0.2V. The device is write-protected whenever it is switched to V
BAT
.
Configuration 2 illustrates the DS1306 being backed up by a rechargeable energy source. In this case, the
V
BAT
pin is grounded, V
CC1
is connected to the primary power supply, and V
CC2
is connected to the
secondary supply (the rechargeable energy source). The DS1306 operates from the larger of V
CC1
or
V
CC2
. When V
CC1
is greater than V
CC2
+ 0.2V (typical), V
CC1
powers the DS1306. When V
CC1
is less than
V
CC2
, V
CC2
powers the DS1306. The DS1306 does not write-protect itself in this configuration.
Configuration 3 shows the DS1306 in battery-operate mode, where the device is powered only by a single
battery. In this case, the V
CC1
and V
BAT
pins are grounded and the battery is connected to the V
CC2
pin.
Only these three configurations are allowed. Unused supply pins must be grounded.

DS1306

Mfr. #:
Manufacturer:
Maxim Integrated
Description:
Real Time Clock Serial Alarm RTC 3-Wire
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet