RL78/G23
ELCL Multiple Parameter Monitoring Function
R01AN5615EJ0200 Rev.2.00
Page 8 of 42
Mar.24.22
4. Software
4.1 Overview of the sample program
In this sample code, four timer (TAU0 channel 0, TAU0 channel 1, TAU0 channel 2 and TAU0 channel 3)
are operated in interval timer mode. ELCL ORs the four timer completion interrupt (INTTM00, INTTM01,
INTTM02 and INTTM03) as input signals and outputs the result as INTELCL. When INTELCL occurs, the
output of the port (P53) is inverted and LED1 turns on or off. Since the combination of four timer outputs
changes each time SW1 is pressed, the lighting interval of LED1 changes accordingly.
shows operation overview. The operations from No. (1) to (10) are repeated by pressing SW1.
Table 4-1 Operation overview (Combination of timers)
No.
g_timer_mode
SW1
TAU0
LED1
Channel 0 Channel 1 Channel 2 Channel 3
(1)
0
‐
STOP
STOP
STOP
STOP
OFF
(2)
1
Press STOP
STOP
STOP
STOP
OFF
(3)
1
‐
Count
STOP
STOP
STOP
Blink
(About 2s
intervals)
(4)
2
Press STOP
STOP
STOP
STOP
OFF
(5)
2
‐
Count
Count
STOP
STOP
Blink
(About 1s
intervals)
(6)
3
Press STOP
STOP
STOP
STOP
OFF
(7)
3
‐
Count
Count
Count
STOP
Blink
(About 0.5s
intervals)
(8)
4
Press STOP
STOP
STOP
STOP
OFF
(9)
4
‐
Count
Count
Count
Count
Blink
(About 0.25s
intervals)
(10)
0
Press STOP
STOP
STOP
STOP
OFF
Figure 4-1 shows operation overview, Figure 4-2 shows timing chart.