RTC - 9701 JE
MQ - 362 - 03
Page-9
11.3. Alarm functions (/AIRQ)
From the conditions of the event flags (AF, EXF, VLF and VLF2), you can know the conditions when the clock matches,
when the voltage decreases and when the oscillation stops. The data of these bits are kept until cleared with “0”. Also, since
output to /AIRQ is possible when each event (except VLF2) is generated, interrupt can be requested to the host.
11.3.1. Time alarm (addresses between 8 and A)
11.3.1.1. Explanation of Time alarm (1).
When the registers corresponding to the minute, the hour, and the day of the week matches with the clock (comparing it
right after carry is generated 7.8125 ms later), the alarm matching flag (AF) becomes “1”. At this moment, if the AIE (Alarm
Interrupt Enable) is enabled (“1”), the /AIRQ pin outputs Active Low.
With the AE bit (bit 7: the Alarm Enable Don’t care bit) of each alarm registers, the HOUR alarm and the DAY alarm can
be set. For the day of the WEEK alarm, multiple days can be set (i.e. Saturdays and Sundays). The WADA bit specifies the
alarm to use between the WEEK alarm and the DAY alarm.
Address
Function
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
R/W
Comments
8 MIN
alarm AE MA40
MA20
MA10
MA8 MA4 MA2 MA1
R/W
BCD
notation
9 HOUR
alarm
AE
¡
HA20
HA10
HA8 HA4 HA2 HA1
R/W
BCD
notation
WEEK
alarm
WA6 WA5 WA4 WA3 WA2 WA1 WA0
WADA=0
A
DAY alarm
AE
¡
DA20
DA10
DA8 DA4 DA2 DA1
R/W
WADA=1
D
Extension
reg.
WADA
R/W
E
Flag
reg. AF
R/W
F
Control
reg.
AIE
R/W
Bit name
Bit data
Function
Comments
0
Compares the corresponding register
AE
1
Does not compare the corresponding register
(don't care)
This is in negative logic, so be careful.
0
/AIRQ output is prohibited
AIE
1
/AIRQ output (alarm interrupt is valid)
0 Alarm
unmatched
-
AF
1
Alarm matched
This bit is kept until overwriting with “0”.
0
WEEK alarm is set
WADA
1
DAY alarm is set
To avoid malfunction, the compare operation is halted while writing to the alarm registers. If write to the alarm register
during this time (period of 7.58ms from carry occurrence), the alarm will not function.
The compare operation is performed during the carry operation (the interval of the lowest carry digit of the AE enabled
register). If the AF bit is cleared exactly when the time matches the alarm data, the alarm will not function. Even if the current
time is set to the alarm, the alarm will not function.
/AIRQ output
AF
01s
00s
59s
SEC
AF bit clear
AIE
Compare
Disable
* This is an example of /AIRQ w aveform w hen connected to the pull-up resistor.