Datasheet

V850ES/JG3-H, V850ES/JH3-H CHAPTER 12 REAL-TIME COUNTER
R01UH0042EJ0500 Rev.5.00 Page 655 of 1513
Aug 12, 2011
12.4 Operation
12.4.1 Initial settings
The initial settings are set when operating the watch function and performing a fixed-cycle interrupt operation.
Figure 12-2. Initial Setting Procedure
Setting AMPM and CT2 to CT0
RC1CC0.RC1PWR bit = 0
Start
INTRTC = 1?
Stops counter operation.
Selects 12-hour system or 24-hour system and interrupt (INTRTC0).
RC1CC0.RC1PWR bit = 1 Enables real-time counter (RTC) internal clock operation.
Sets each count register.
Setting RC1SUBU
Sets watch error correction.
Setting RC1CKS
Selects real-time counter (RTC) operation clock.
No
Yes
Clearing interrupt IF flag Clears interrupt request flag (RTC0IF)
Clearing interrupt MK flag Clears interrupt mask flag (RTC0MK)
RC1CC1.RTCE bit = 1 Starts counter operation.
Reading counter
Setting RC1SEC
(Clearing RC1SUBC)
Setting RC1MIN
Setting RC1HOUR
Setting RC1WEEK
Setting RC1DAY
Setting RC1MONTH
Setting RC1YEAR