RX8010
SJ
Page
−
20
ETM37E-06
13.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 /IRQ1 pin goes to low level to indicate that
an event has occurred. AF bit and IRQ output change after 1.46ms from alarm agreement at the maximum.
∗
/IRQ1=”L” output when occurs alarm interruption event is not cancelled automatically unless giving
intentional cancellation and /IRQ1=”L” is maintained.
13.3.1. Related registers for Alarm interrupt functions.
Address
[h]
Function
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
18
MIN Alarm
AE
40
20
10
8
4
2
1
19
HOUR Alarm
AE
•
20
10
8
4
2
1
1A
WEEK Alarm
AE
6
5
4
3
2
1
0
DAY Alarm
•
20
10
8
4
2
1
1D
Extension Register
FSEL1
FSEL0 USEL
TE
WADA TSEL2 TSEL1 TSEL0
1E
Flag Register
UF
TF
AF
VLF
1F
Control Register
TEST
STOP
UIE
TIE
AIE
TSTP
-
-
∗
Before entering settings for operations, we recommend writing a "0" to the AIE bit to prevent hardware interrupts
from occurring inadvertently while entering settings.
∗
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 can be used as a RAM register. In such
cases, be sure to write "0" to the AIE bit.
∗
Even if use alarm register
as RAM register, inside of RTC is processed as alarm setting, therefore it is able to
prevent unintentional alarm occurrence (/IRQ1=”L” occurrence) due to unexpected agreement with writing data
and timer condition by means of setting to AIE=”0”.
1) Alarm registers
(
Reg
−
18[h]
to
1A[h]
)
In the WEEK alarm /Day alarm register (Reg - 1A), 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).
∗
1) The register that "1" was set to "AE" bit, doesn't compare alarm.
(Example) Write 80h (AE = "1") to the WEEK Alarm /DAY Alarm register (Reg - 1A):
Only the hour and minute settings are used as alarm comparison targets. The week and date settings
are not used as alarm comparison targets.
As a result, alarm occurs if only an hour and minute accords with alarm data.
∗
2) If all three AE bit values are "1" the week/date settings are ignored and an alarm interrupt event will
occur once per minute.
∗
3) Even if the current date/time is used as the setting, the alarm will not occur until the counter counts up
to the current date/time (i.e., an alarm will occur next time, not immediately).
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.
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.
AF
Data
Description
Write
0
Clearing this bit to zero enables /IRQ1 low output to be canceled
(/IRQ1 remains Hi-z) when an alarm interrupt event has occurred.
1
This bit is invalid after a "1" has been written to it.
Read
0
−
1
Alarm interrupt events are detected.
(Result is retained until this bit is cleared to zero.)