RX8111CE
Page
−
29
ETM61E-01
14.3. Alarm Interrupt Function
The alarm interrupt function generates interrupt events for alarm settings such as date, 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. This RTC retains the status of /INT =
“L” until intentional resetting.
14.3.1. Related registers for Alarm interrupt functions.
Table 25 Alarm Interrupt register
Address
Function
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
2Ch
SEC Alarm
AE
40
20
10
8
4
2
1
17h
MIN Alarm
AE
40
20
10
8
4
2
1
18h
HOUR Alarm
AE
•
20
10
8
4
2
1
19h
WEEK Alarm
AE
6
5
4
3
2
1
0
DAY Alarm
•
20
10
8
4
2
1
1Dh
Extension Register
FSEL1 FSEL0
USEL
TE
WADA
ETS
TSEL1 TSEL0
1Eh
Flag Register
POR
z
UF
TF
AF
EVF
VLF
XST
1Fh
Control Register
z
z
UIE
TIE
AIE
EIE
z
STOP
Before setup of Alarm, settings, it is recommended be clears AIE bit by 0 for prevent hardware interrupts from occurring
inadvertently. When the STOP bit value is 1 alarm interrupt events do not occur.
When the alarm interrupt function is not being
used, the Alarm registers (Reg – 17h to 19h, 2Ch) can be used as a RAM register.
In such cases, be sure to write "0" to the AIE bit.
1) Alarm registers
The minute, hour, day and date when an alarm interrupt event will occur is set using this register and the WADA bit.
In the WEEK alarm /Day alarm register (Reg
– 19h), 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 (19h) = 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 bit
(
Week Alarm / Day Alarm Select)
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 26 WADA bit (Week Alarm / Day Alarm Select)
WADA
Data
Description
Write
0
Sets WEEK as target of alarm function
1
Sets DAY as target of alarm function
3) AF bit
(Alarm Flag)
When this flag bit value is already set to "0", occurrence of an alarm interrupt event changes it to "1". When this flag bit value is "1",
its value is retained until a "0" is written to it.
Table 27 AF bit (Alarm Flag)
AF
Data
Description
Write
0
Clearing this bit to zero enables /INT low output to be canceled (/INT remains
Hi-Z) when an alarm interrupt event has occurred
.
1
Invalid (writing
“1” will be ignored).
Read
0
−
1
Alarm interrupt events are detected.
(Result is retained until this bit is cleared to zero.)