14. Functions
RX8130CE
Jump to
ETM50E-07
Seiko Epson Corporation
32
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” are maintained.
14.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
17
MIN Alarm
AE
40
20
10
8
4
2
1
18
HOUR Alarm
AE
20
10
8
4
2
1
19
WEEK Alarm
AE
6
5
4
3
2
1
0
DAY Alarm
20
10
8
4
2
1
1C
Extension Register
FSEL1 FSEL0
USEL
TE
WADA
TSEL2 TSEL1 TSEL0
1D
Flag Register
VBLF
0
UF
TF
AF
RSF
VLF
VBFF
1E
Control Register0
TEST
STOP
UIE
TIE
AIE
TSTP TBKON TBKE
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) AE bit
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.