Renesas M16C/64C User Manual page 409

Table of Contents

Advertisement

M16C/64C Group
RTCRST (Real-Time clock reset bit) (b4)
When setting this bit to 0 after setting it to 1, the following are set automatically:
The values are reset in registers RTCSEC, RTCMIN, RTCHR, RTCWK, RTCCR2, RTCCSR,
RTCCSEC, RTCCMIN, and RTCCHR.
Bits TCSTF, RTCPM, H12H24, and TSTART in the RTCCR1 register become 0.
RTCPM (a.m./p.m. bit) (b5)
Write to the RTCPM bit when bits TSTART and TCSTF in the RTCCR1 register are both 0 (count
stopped). Read this bit when the BSY bit in the RTCSEC register is 0 (not while data is updated).
The RTCPM bit is enabled when the H12H24 bit is 0 (12-hour mode) or 1 (24-hour mode). Set the
RTCPM bit as shown below to set the time while the H12H24 bit is 1:
Set the RTCPM bit to 0 when bits HR11 to HR10 and HR03 to HR00 in the RTCHR register are 00
to 11.
Set the RTCPM bit to 1 when bits HR11 to HR10 and HR03 to HR00 in the RTCHR register are 12
to 23.
The RTCPM bit changes as follows while counting:
Becomes 0 when the RTCPM bit is 1 (p.m.) while the clock increments from 11:59:59 (23:59:59 for
24-hour mode) to 00:00:00.
Becomes 1 when the RTCPM bit is 0 (a.m.) while the clock increments from 11:59:59 to 00:00:00
(12:00:00 for 24-hour mode).
Figure 20.2 shows Time Representation.
H12H24 bit = 1
Contents
(24-hour mode)
of
RTCHR
H12H24 bit = 0
Register
(12-hour mode)
Contents of RTCPM bit
Contents in RTCWK register
H12H24 bit = 1
Contents
(24-hour mode)
of
RTCHR
H12H24 bit = 0
Register
(12-hour mode)
Contents of RTCPM bit
Contents in RTCWK register
Bits RTCPM and H12H24 : Bits in the RTCCR1 register.
The above assumes the count starts from 00:00 (12 a.m.) of day 1.
Figure 20.2
Time Representation
H12H24 (Operating mode select bit) (b6)
Write to the H12H24 bit when bits TSTART and TCSTF in the RTCCR1 register are both 0 (count
stopped).
R01UH0092EJ0110 Rev.1.10
Jul 31, 2012
0
1
2
3
4
5
0
1
2
3
4
5
0 (a.m.)
Date changes
18
19
20
21
22
23
6
7
8
9
10
11
1 (p.m.)
000 (Day 1)
Noon
6
7
8
9
10
11
6
7
8
9
10
11
000 (Day 1)
0
1
2
3
0
1
2
3
0 (a.m.)
001 (Day 2)
20. Real-Time Clock
12
13
14
15
16
17
0
1
2
3
4
5
1 (p.m.)
...
...
...
...
Page 376 of 807

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/60 seriesM16c series

Table of Contents