14. How to use
RX4111CE
Jump to
ETM62E-02
Seiko Epson Corporation
32
14.3. Alarm Interrupt Function
The alarm interrupt function generates interrupt events for alarm settings such as date, day, hour, minute, and second
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.
/INT= Low output when occurs alarm interruption event is not cancelled automatically unless giving
intentional cancellation and /INT = Low are maintained.
14.3.1. Related Registers for Alarm Interrupt Functions.
Table 28 Alarm Interrupt Registers
Address
[h]
Function
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
Bank2 - C
SEC Alarm
AE
40
20
10
8
4
2
1
Bank1 - 7
MIN Alarm
AE
40
20
10
8
4
2
1
8
HOUR Alarm
AE
20
10
8
4
2
1
9
WEEK Alarm
AE
6
5
4
3
2
1
0
DAY Alarm
20
10
8
4
2
1
D
Extension Register
FSEL1 FSEL0 USEL
TE
WADA
TSEL1 TSEL0
E
Flag Register
POR
z
UF
TF
AF
EVF
VLF
XST
F
Control Register
z
z
UIE
TIE
AIE
EIE
z
STOP
Before entering settings for operations, it is recommended to first set the AIE bit to 0 in order to avoid inadvertent
hardware interrupt at setting.
When the STOP bit value is 1
alarm interrupt event
s 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. When the AIE bit value is 1
and the Alarm registers is being used as a RAM register, /INT may
be changed to low level unintentionally.
1) Alarm registers
The second, 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, 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)
.
In case “AE” bit of register 9h is set to 1, the day will be ignored, and an interrupt occurs ones the actual time
matches the seconds, minutes and hour setting of the alarm register.
(Example) Write 80h (AE = 1) to the WEEK Alarm / DAY Alarm register (Reg - 9h):
Only the
hour, minute and second 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 the hour, minute and second values match the alarm data.
If all 4 AE bit values are 1 the week/date and time settings are ignored, and an alarm interrupt event will occur once
per second.
The alarm does not occur even if it is set the same as the current time. Occurs at the next time match.
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 29 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