Related Registers For Alarm Interrupt Function - Epson RA8804 CE Applications Manual

Real time clock module
Table of Contents

Advertisement

RA8804 CE

8.7.2. Related registers for Alarm interrupt function

Address
01
02
03
04
08
MIN Alarm
09
HOUR Alarm
WEEK Alarm
0A
DAY Alarm
0D
Extension Register
0E
Flag Register
0F
Control Register
1)
o

indicates write-protected bits. A zero is always read from these bits.
2)
Bits marked with  are RAM bits that can contain any value and are read/write-accessible.
 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 RESET bit value is "1"alarm interrupt events do not occur.
 When the alarm interrupt function is not being used, the Alarm registers (Reg – 08h to 0Ah) 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 – 08h to 0Ah) is being used as a RAM register, /INT
may be changed to low level unintentionally.
1) WADA (Week Alarm /Day Alarm) bit
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/Read
2) Alarm registers
Address
08
09
0A
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 - 0Ah), 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 /INT 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 08h to "0" and the AE of 09h and 0Ah to "1".
In order to generate an alarm interrupt only once a week, all 3 AE-bits have to be clear "0"
1) The alarm function is not a HW feature but software function inside the RTC!
*2) In case AE bit of register 0Ah 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 - 0Ah):
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.
Function
bit 7
MIN
HOUR
WEEK
DAY
AE
AE
AE
TEST
CSEL1
Data
Sets WEEK as target of alarm function
0
(DAY setting is ignored)
Sets DAY as target of alarm function
1
(WEEK setting is ignored)
Function
MIN Alarm
HOUR Alarm
WEEK Alarm
DAY Alarm
bit 6
bit 5
bit 4
40
20
10
20
10
6
5
4
20
10
40
20
10
20
10
6
5
4
20
10
WADA
USEL
TE
UF
TF
CSEL0
UIE
TIE
Description
bit 7
bit 6
bit 5
AE
40
20
AE
20
6
5
AE
20
Page - 28
bit 3
bit 2
bit 1
8
4
2
8
4
2
3
2
1
8
4
2
8
4
2
8
4
2
3
2
1
8
4
2
FSEL1
FSEL0
TSEL1
AF
VLF
AIE
bit 4
bit 3
bit 2
bit 1
10
8
4
2
10
8
4
2
4
3
2
1
10
8
4
2
ETM60E-02
bit 0
1
1
0
1
1
1
0
1
TSEL0
VDET
RESET
bit 0
1
1
0
1

Advertisement

Table of Contents
loading

Table of Contents