RX8010
SJ
Page
−
15
ETM37E-06
13.
How to use
13.1. Clock calendar explanation
At the time of a communication start, the Clock & Calendar data are fixed (hold the carry operation), and it is
automatically revised at the time of the communication end. Therefore it recommends that the access to a clock
calendar has continuous access by the auto increment function.
Setting example: Sun, 29-Feb-88 17:39:45 (leap year)
Address
[h]
Function
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
10
SEC
0
1
0
0
0
1
0
1
11
MIN
0
0
1
1
1
0
0
1
12
HOUR
0
0
0
1
0
1
1
1
13
WEEK
0
0
0
0
0
0
0
1
14
DAY
0
0
1
0
1
0
0
1
15
MONTH
0
0
0
0
0
0
1
0
16
YEAR
1
0
0
0
1
0
0
0
∗
Note with caution that writing non-existent time data may interfere with normal operation of the clock counter.
13.1.1. Clock counter
1) [
SEC
]
[
MIN
]
register
These registers are 60-base BCD counters. These registers are incremented at the timing when carry is
generated from a lower register. At the timing when the lower register changes from 59 to 00, carry
is generated to the higher register and thus incremented.
When writing is performed to [SEC] register, Internal-count-down-chain less than one second
(
512Hz
∼
1
Hz
)
is cleared to 0.
2) [
HOUR
]
register
This register is a 24-base BCD counter (24 hour format).These registers are incremented at the timing
when carry is generated from a lower register.
13.1.2. Week counter
The day (of the week) is indicated by 7 bits, bit 0 to bit 6.
The day data values are counted as: Day 01h
→
Day 02h
→
Day 04h
→
Day 08h
→
Day 10h
→
Day 20h
→
Day
40h
→
Day 01h
→
Day 02h, etc.
It is incremented when carry is generated from the HOUR register. This register does not generate carry to
a higher register. Since this register is not connected with the YEAR, MONTH and DAY registers, it needs to be
set again with the matching day of the week if any of the YEAR, MONTH or DAY registers have been changed.
The setting example of the week register value.
Day
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
Data [h]
Sunday
0
0
0
0
0
0
0
1
01 h
Monday
0
0
0
0
0
0
1
0
02 h
Tuesday
0
0
0
0
0
1
0
0
04 h
Wednesday
0
0
0
0
1
0
0
0
08 h
Thursday
0
0
0
1
0
0
0
0
10 h
Friday
0
0
1
0
0
0
0
0
20 h
Saturday
0
1
0
0
0
0
0
0
40 h
∗
Do not set "1" to more than one day at the same time.
13.1.3. Calendar counter
1) [
DAY
],
[
MONTH
]
resister
The DAY register is a variable (between 28-base and 31-base) BCD counter that is influenced by the month and the
leap year. The MONTH register is 12-base BCD counter. when carry is generated from a lower register.
Jan.
Feb.
Mar
Apr.
May
June
July
Aug.
Sep.
Oct.
Nov.
Dec.
Days
Normal year
31
28
31
30
31
30
31
31
30
31
30
31
Leap year
29
2) [
YEAR
]
register
This register is a BCD counter for years 00 to 99.
The leap year is automatically determined, which reflects in the DAY register.
13.2. Fixed-cycle Timer Interrupt Function
The fixed-cycle timer interrupt function generates an interrupt event periodically at any fixed cycle set between