Alarm Interrupt Function - Epson RX8130 CE Applications Manual

Real time clock module
Table of Contents

Advertisement

RX8130CE

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 /IRQ pin goes to low level to indicate that an
event has occurred. AF bit and /IRQ output show a maximum delay of 1.46ms from the alarm event.
 /IRQ="L" output when occurs alarm interruption event is not cancelled automatically unless giving
intentional cancellation and /IRQ="L" is maintained.
14.3.1. Related registers for Alarm interrupt functions.
Address[h]
17
18
19
1C
Extension Register
1D
1E
Control Register0
 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 (Reg – 17h to 19h) 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 (Reg – 17h to 19h) is being used as a RAM register, /IRQ
may be changed to low level unintentionally.
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).
When the settings made in the alarm registers and the WADA bit match the current time, the AF bit value is
changed to "1". At that time, if the AIE bit value has already been set to "1", the /IRQ pin goes low.
Note: AE-bit is low active, so in order to enable 1 interrupt every hour once the actual minutes match the
alarm setting, it is necessary to set the AE of register 17h to 0 and the AE of 18h and 19h to 1.
In order to generate an alarm interrupt only once a week, all 3 AE-bits have to be set "0
1) The alarm function is not a HW feature but software function inside the RTC!
*2) In case "AE" bit of register 19h is set to "1", the day will be ignored and an interrupt occurs ones the
actual time matches the minutes and/or hour setting of the alarm register.
(Example) Write 80h (AE = "1") to the WEEK Alarm /DAY Alarm register (Reg - 19h):
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 the hour and minute values match the alarm data.
3) If all three AE bit values are "1" the week/date and time settings are ignored and an alarm interrupt
event will occur once per minute.
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
Function
bit 7
MIN Alarm
AE
HOUR Alarm
AE
WEEK Alarm
AE
DAY Alarm
FSEL1 FSEL0
Flag Register
VBLF
TEST
Data
0
Sets WEEK as target of alarm function
1
Sets DAY as target of alarm function
bit 6
bit 5
bit 4
40
20
10
20
10
6
5
4
20
10
USEL
TE
UF
TF
STOP
UIE
TIE
Description
Page23
bit 3
bit 2
bit 1
8
4
2
8
4
2
3
2
1
8
4
2
WADA TSEL2 TSEL1 TSEL0
AF
RSF
VLF
TSTP
TBKON TBKE
AIE
ETM50E-05
bit 0
1
1
0
1
VBFF

Advertisement

Table of Contents
loading

Table of Contents