Alarm Interrupt Function - Epson RX801SJ Applications Manual

Real time clock module
Table of Contents

Advertisement

RX8010 SJ

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]
18
19
1A
1D
Extension Register
1E
1F
∗ 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
Write
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
Write
Read
Function
bit 7
MIN Alarm
AE
HOUR Alarm
AE
WEEK Alarm
AE
DAY Alarm
FSEL1
Flag Register
Control Register
TEST
Data
0
Sets WEEK as target of alarm function
1
Sets DAY as target of alarm function
Data
Clearing this bit to zero enables /IRQ1 low output to be canceled
0
(/IRQ1 remains Hi-z) when an alarm interrupt event has occurred.
1
This bit is invalid after a "1" has been written to it.
0
Alarm interrupt events are detected.
1
(Result is retained until this bit is cleared to zero.)
bit 6
bit 5
bit 4
40
20
10
20
10
6
5
4
20
10
FSEL0
USEL
TE
UF
TF
STOP
UIE
TIE
Description
Description
Page − 20
bit 3
bit 2
bit 1
8
4
2
8
4
2
3
2
1
8
4
2
WADA TSEL2 TSEL1 TSEL0
AF
VLF
AIE
TSTP
-
ETM37E-06
bit 0
1
1
0
1
-

Advertisement

Table of Contents
loading

Table of Contents