
CHAPTER 9 REAL-TIME COUNTER
User’s Manual U19780EJ2V0UD
304
9.4.3 Setting alarm of real-time counter
Set time of alarm after setting 0 to WALE first.
Figure 9-21. Alarm Setting Procedure
WALE = 0
Setting ALARMWM
Start
INTRTC = 1?
Match operation of alarm is invalid.
Sets alarm minute register.
Alarm processing
Yes
WALIE = 1
Interrupt is generated when alarm matches.
Setting ALARMWH
Sets alarm hour register.
Setting ALARMWW
Sets alarm week register.
WALE = 1
Match operation of alarm is valid.
WAFG = 1?
No
Yes
Constant-period interrupt servicing
Match detection of alarm
No
Remarks 1.
ALARMWM, ALARMWH, and ALARMWW may be written in any sequence.
2.
Fixed-cycle interrupts and alarm match interrupts use the same interrupt source (INTRTC). When
using these two types of interrupts at the same time, which interrupt occurred can be judged by
checking the fixed-cycle interrupt status flag (RIFG) and the alarm detection status flag (WAFG) upon
INTRTC occurrence.