DS1305
7 of 22
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, 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 DS1305 has three additional registers (control register, status register, and trickle charger register)
that control the RTC, interrupts, and trickle charger.
CONTROL REGISTER (READ 0Fh, WRITE 8Fh)
BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0
EOSC
WP 0 0 0 INTCN AIE1 AIEO
EOSC (Enable Oscillator) – This bit when set to logic 0 starts the oscillator. When this bit is set to a
logic 1, the oscillator is stopped and the DS1305 is placed into a low-power standby mode with a current
drain of less than 100nA when power is supplied by V
BAT
or V
CC2
. On initial application of power, this bit
will be set to a logic 1.
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, 2, and 7 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.
INTCN (Interrupt Control) – This bit controls the relationship between the two time-of-day alarms and
the interrupt output pins. When the INTCN bit is set to a logic 1, a match between the timekeeping
registers and the Alarm 0 registers activates the
INT0 pin (provided that the alarm is enabled) and a
match between the timekeeping registers and the Alarm 1 registers activate the
INT1 pin (provided that
the alarm is enabled). When the INTCN bit is set to a logic 0, a match between the timekeeping registers
and either Alarm 0 or Alarm 1 activate the INT0 pin (provided that the alarms are enabled). INT1 has no
function when INTCN is set to a logic 0.
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.
DS1305
8 of 22
AIE1 (Alarm Interrupt Enable 1) – When set to a logic 1, this bit permits the interrupt 1 request flag
(IRQF1) bit in the status register to assert INT1 (when INTCN = 1) or to assert INT0 (when INTCN = 0).
When the AIE1 bit is set to logic 0, the IRQF1 bit does not initiate an interrupt signal.
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.
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. This flag can be used to generate an interrupt on either INT0 or
INT1 depending on the status of the INTCN bit in the control register. If the INTCN bit is set to a logic 1
and IRQF1 is at a logic 1 (and AIE1 bit is also a logic 1), the INT1 pin goes low. If the INTCN bit is set
to a logic 0 and IRQF1 is at a logic 1 (and AIE1 bit is also a logic 1), the INT0 pin goes low. IRQF1 is
cleared when the address pointer goes to any of the Alarm 1 registers during a read or write.
TRICKLE CHARGE REGISTER (READ 11H, WRITE 91H)
This register controls the trickle charge characteristics of the DS1305. 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. To prevent accidental enabling, only a pattern of 1010 enables
the trickle charger. All other patterns disable the trickle charger. On the initial application of power, the
DS1305 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 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
DS1305
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
The user determines diode and resistor selection 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 1 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 DS1305 being backed up by a nonrechargeable
energy source such as a lithium battery. In this configuration, the system power supply is connected to
V
CC1
and V
CC2
is grounded. The DS1305 is write-protected if V
CC1
is less than V
BAT
. The DS1305 is fully
accessible when V
CC1
is greater than V
BAT
+ 0.2V.
Configuration 2 illustrates the DS1305 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 DS1305 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 DS1305. When V
CC1
is less than
V
CC2
, V
CC2
powers the DS1305. The DS1305 does not write-protect itself in this configuration.
Configuration 3 shows the DS1305 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.

DS1305EN

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