DS1305
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-DA Y ALARM MASK BITS
ALARM REGISTER MASK BITS (B IT 7)
FUNCTION
Alarm when minutes and seconds match
Alarm hours, minutes, and seco nds match
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 8 Fh)
WP 0 0 0 INTCN AIE1 AIEO
(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 standb y mode with a current
drain of less than 100nA when power is supplied by VBAT or VCC2. 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 (In terrup t Con trol) – This bit controls the rel ationship between the two time-of-da y 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
pin (provided that the alarm is enabled) and a
match between the timekeeping registers and the Alarm 1 registers activate the
pin (provided that
the alarm is enab led). W hen the INTCN bit is set to a lo gic 0, a m atch bet ween the timekeep ing re gisters
and eith er Alarm 0 or Alarm 1 activate the
pin (provided that the alarms are enabled).
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
. When the AIE0 bit is set to logic 0, the IRQF0 bit does
not initiate the
signal.
7 of 22