RA8804 CE
Page - 9
ETM60E-02
8.2.2. Calendar counter (WEEK - YEAR)
Address
Function
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
03
WEEK
6
5
4
3
2
1
0
“o” indicates write-protected bits. A zero is always read from these bits.
1) Day of the WEEK counter
The day (of the week) is indicated by 7 bits, bit 0 to bit 6.
The day data values are counted as follows: Day 01h
Day 02h
Day 04h
Day 08h
Day
10h
Day 20h
Day 40h
Day 01h
Day 02h, etc.
The correspondence between days and count values is shown below.
WEEK
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
Day
Data [h]
Write/Read
0
0
0
0
0
0
0
1
Sunday
01 h
0
0
0
0
0
0
1
0
Monday
02 h
0
0
0
0
0
1
0
0
Tuesday
04 h
0
0
0
0
1
0
0
0
Wednesday
08 h
0
0
0
1
0
0
0
0
Thursday
10 h
0
0
1
0
0
0
0
0
Friday
20 h
0
1
0
0
0
0
0
0
Saturday
40 h
Write prohibit
Do not set
“1” to more than one day at the same time.
Also, note with caution that any setting other than the
seven shown above should not be made as it may
interfere with normal operation.
Address
Function
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
04
DAY
20
10
8
4
2
1
05
MONTH
10
8
4
2
1
06
YEAR
80
40
20
10
8
4
2
1
“o” indicates write-protected bits. A zero is always read from these bits.
The auto calendar function updates all dates, months, and years from January 1, 00 to December 31, 99.
The data format is BCD format. For example, a date register value of
“0011 0001” indicates the 31st.
Note with caution that writing non-existent date data may interfere with normal operation of the calendar
counter.
2) Date counter
Address
Function
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
04
DAY
20
10
8
4
2
1
The updating of dates by the date counter varies according to the month setting.
A leap year is set whenever the year value is a multiple of four (such as 04, 08, 12, 88, 92, or 96). In
February of a leap year, the counter counts dates from
“01”, “02”, “0”3, to “28”, “29”, “01”, etc.
DAY
Month
Date update pattern
Write/Read
1, 3, 5, 7, 8, 10, or 12
01, 02, 03
30, 31, 01
4, 6, 9, or 11
01, 02, 03
30, 01, 02
February in normal year
01, 02, 03
28, 01, 02
February in leap year
01, 02, 03
28, 29, 01
3) Month counter
Address
Function
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
05
MONTH
10
8
4
2
1
The month counter counts from 01 (January), 02 (February), and up to 12 (December), then starts again
at 01 (January).
4) Year counter
Address
Function
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
06
YEAR
Y80
Y40
Y20
Y10
Y8
Y4
Y2
Y1
The year counter counts from 00, 01, 02 and up to 99, then starts again at 00.
Any year that is a multiple of four (04, 08, 12, 88, 92, 96, etc.) is handled as a leap year.