RX8804CE
Page - 21
ETM59E-05
8.5. Alarm Interrupt Function
8.5.1. Alarm Interrupt Function
The alarm interrupt function generates interrupt events at the matching time of alarm day, hour, and minute
settings.
When an interrupt event occurs, the AF bit value is set to “1”
and the /INT pin goes to low level to indicate that an
event has occurred.
Example of
/INT operation
AIE =
"
1
"
( AF
=
"
0
"
→
"
1
" )
AF
=
"
1
"
→
"
0
"
or
AIE
=
"
1
"
→
"
0
"
Figure 12 Alarm Function
8.5.2. Alarm Interrupt Function Register
Table 38 Alarm Interrupt Function Register
Address
Function
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
08
MIN Alarm
AE
40
20
10
8
4
2
1
09
HOUR Alarm
AE
•
20
10
8
4
2
1
0A
WEEK Alarm
AE
6
5
4
3
2
1
0
DAY Alarm
•
20
10
8
4
2
1
0D
Control1
TEST
WADA
USEL
TE
FSEL1
FSEL0
TSEL1
TSEL0
0E
Flag Register
UF
TF
AF
VLF
VDET
0F
Control 2
CSEL1
CSEL0
UIE
TIE
AIE
RESET
1)
o indicates write-protected bits. A zero is always read from these bits.
2)
Bits marked with
•
are RAM bits that can contain any value and are read/write-accessible.
Before entering settings for operations, it is recommended that writing “0” to the AIE bit to prevent unexpected
hardware interrupts.
When the RESET bit value is “1”
alarm interrupt events do not occur.
When the alarm interrupt function is not used, the Alarm registers (Reg – 08h to 0Ah) can be used as a RAM
re
gister. In such cases, be sure to write “0” to the AIE bit.
When the AIE bit value is “1”
and the Alarm registers (Reg
– 08h to 0Ah) is being used as a RAM register, /INT
may be changed to low level unintentionally.
1) Alarm registers
The minute, hour, day and date when an alarm interrupt event is set using this register and the WADA bit.
In the WEEK alarm /Day alarm register (Reg
– 0Ah), the setting selected via the WADA bit determines whether
WEEK alarm data or DAY alarm data will be set. If WEEK has been selected via the WADA bit, multiple days can
be set (such as Monday, Wednesday, Friday, Saturday)
.
-
Unwanted alarm term is decided by setting respective AE bit =”1”. If AE is set to “1”, this alarm term
becomes inactive.
Ex. WEEK Alarm
/
DAY
Alarm (0Ah) = 80h (AE=”1”) hour, minute, second alarm active week, day alarm
inactive
-
Setting all AE bit “1” makes every one second alarm exceptionally. The result is reflected in AF bit.
-
Alarm event does not occur even user set alarm time to current time. Coming next time matching (alarm
time = current time) can occur the event.
2) WADA (Week Alarm /Day Alarm) bit
The alarm interrupt function uses either” Day” or “Week” as its target. The WADA bit is used to specify either
WEEK or DAY as the target for alarm interrupt events.
Table 39 WADA bit
WADA
Data
Description
Write / Read
0
Sets WEEK as target of alarm function
Register 0Ah is compared with register 03h
(DAY setting is ignored)
1
Sets DAY as target of alarm function
Register 0Ah is compared with register 04h
(WEEK setting is ignored)