Fujitsu FR81S User Manual
CHAPTER 28: REAL-TIME CLOCK(RTC)
4. Registers
FUJITSU SEMICONDUCTOR LIMITED
CHAPTER
: REAL-TIME CLOCK(RTC)
FUJITSU SEMICONDUCTOR CONFIDENTIAL
14
WTSR
bit7
bit6
bit5
bit4
bit3
bit2
bit1
bit0
-
-
S5
S4
S3
S2
S1
S0
Initial value
-
-
0
0
0
0
0
0
Attribute R1,WX
R1,WX
R,W
R,W
R,W
R,W
R,W
R,W
This register will be initialized by power-on reset source.
⋅
The Second/ Minute/ Hour/ Day registers contain day and time information. Binary-coded notation is used
for second, minute, hour, and day.
⋅
When the register is read out, the counter value will be read out. The written data will be loaded to the
counter after the UPDT bit is set to "1".
⋅
As word access is not available, perform access for the respective registers.
⋅
Word access is not available for the number of days register either. In addition, be sure to perform halfword
access for the number of days register as the number of days is counted using a 16-bit counter. As byte
access may cause carry during read, having the possibility of getting an inappropriate read value, byte
access and word access are prohibited.
⋅
Set the Hour/Minute/Second registers within the following ranges:
Hour (WTHR) :
0 to 17
H
(0 hour to 23 hours)
Minute (WTMR) :
0 to 3B
H
(0 minute to 59 minutes)
Second (WTSR) :
0 to 3B
H
(0 second to 59 seconds)
⋅
Confirm that there are no contradictions among the values output from the four registers:
Day/Hour/Minute/Second registers. The following example may occur.
[Ex.] Output value "1 day, 23 hours, 59 minutes, 59 seconds", "0 day, 23 hours, 59 minutes, 59 seconds".
"1 day, 0 hour, 0 minute, 0 second", "1 day, 22 hours, 59 minutes, 59 seconds", 1 day, 23 hours, 0 minute,
0 second, "2 days, 0 hour, 0 minute, 0 second"
Figure 4-1 Diagram of Day, Hour, Minute and Second Register Transitions
⋅
When the operation clock frequency is obtained by dividing the frequency of the main clock by 2 (while
PLL is stopped), the wrong values may be read out from the Hour/Minute/Second registers. This is caused
due to synchronization adjustment between reading operations and count operations. Therefore, it is
recommended to use second interrupts in the trigger for reading instructions.
⋅
To restart operations with the duration the counter has stopped as the initial value, read the
Day/Hour/Minute/Second registers prior to restart and write these values to the Day/Hour/Minute/Second
registers to start.
⋅
As this series does not provide the RTC detection reset function, the Day/Hour/Minute/Second registers
are cleared only in case of power-on reset. Therefore, when the microcomputer internal low voltage
detection flag is set, the Day/Hour/Minute/Second registers are recommended to be cleared.
0 minute
59 minutes
……
……
59 minutes
0 minute
……
……
……
59 minutes 0 minute
……
Day register
0 day
2 days
1 day
If 1 day, 23 hours, 59 minutes is output, the current hour depends on the reading order of the registers.
23 hours
0 hour
Hour register
…… 22 hours
23 hours
0 hour
Minute register
……
1 day, 0 hour, 0 minute
0 day, 23 hours,
59 minutes
1 day, 23 hours, 0 minute
1 day, 22 hours, 59 minutes
2 days, 0 hour, 0 minute
1 day, 23 hours, 59 minutes
MB91520 Series
MN705-00010-1v0-E
1053