manuals.online logo
Brands
  1. Home
  2. •
  3. Brands
  4. •
  5. Renesas
  6. •
  7. Microcontroller
  8. •
  9. Renesas RL78/G23 User manual

Renesas RL78/G23 User manual

Other manuals for RL78/G23

3

Other Renesas Microcontroller manuals

Renesas V850ES/JF3-L User manual

Renesas

Renesas V850ES/JF3-L User manual

Renesas RX65N Series User manual

Renesas

Renesas RX65N Series User manual

Renesas RX Series User manual

Renesas

Renesas RX Series User manual

Renesas RH850 Series User manual

Renesas

Renesas RH850 Series User manual

Renesas RL78/I1A User manual

Renesas

Renesas RL78/I1A User manual

Renesas RL78/I1C User manual

Renesas

Renesas RL78/I1C User manual

Renesas EK-RA2E2 User manual

Renesas

Renesas EK-RA2E2 User manual

Renesas YCONNECT-IT-TPS-1L User manual

Renesas

Renesas YCONNECT-IT-TPS-1L User manual

Renesas RL78/G1F User manual

Renesas

Renesas RL78/G1F User manual

Renesas V850ES/Fx3 Series User manual

Renesas

Renesas V850ES/Fx3 Series User manual

Renesas CK-RX65N User manual

Renesas

Renesas CK-RX65N User manual

Renesas EK-RE01 256KB Installation and operating instructions

Renesas

Renesas EK-RE01 256KB Installation and operating instructions

Renesas RL78G14 Installation and operating instructions

Renesas

Renesas RL78G14 Installation and operating instructions

Renesas RX100 Series User manual

Renesas

Renesas RX100 Series User manual

Renesas QB-78K0FX1 User manual

Renesas

Renesas QB-78K0FX1 User manual

Renesas RL78 Series User manual

Renesas

Renesas RL78 Series User manual

Renesas RL78/G11 User manual

Renesas

Renesas RL78/G11 User manual

Renesas RX600 Series User manual

Renesas

Renesas RX600 Series User manual

Renesas RH850/E2 Series User manual

Renesas

Renesas RH850/E2 Series User manual

Renesas RZ/T1 Series User manual

Renesas

Renesas RZ/T1 Series User manual

Renesas RL78G14 Installation and operating instructions

Renesas

Renesas RL78G14 Installation and operating instructions

Renesas RH850/E1L Installation and operating instructions

Renesas

Renesas RH850/E1L Installation and operating instructions

Renesas RL78/G13 User manual

Renesas

Renesas RL78/G13 User manual

Renesas V850ES/JE3-L User manual

Renesas

Renesas V850ES/JE3-L User manual

Popular Microcontroller manuals by other brands

Microsemi IGLOO nano Starter Kit user guide

Microsemi

Microsemi IGLOO nano Starter Kit user guide

GOWIN DK START GW1NSR-LV4CQN48PC7I6 V 1.1 user guide

GOWIN

GOWIN DK START GW1NSR-LV4CQN48PC7I6 V 1.1 user guide

HETRONIC ERGO-S Service manual

HETRONIC

HETRONIC ERGO-S Service manual

Laird BL654PA user guide

Laird

Laird BL654PA user guide

Novatek NT6861 manual

Novatek

Novatek NT6861 manual

Lantronix Intrinsyc Open-Q 865XR SOM user guide

Lantronix

Lantronix Intrinsyc Open-Q 865XR SOM user guide

Nuvoton ISD61S00 ChipCorder Design guide

Nuvoton

Nuvoton ISD61S00 ChipCorder Design guide

STMicrolectronics ST7 Assembler Linker user manual

STMicrolectronics

STMicrolectronics ST7 Assembler Linker user manual

Texas Instruments Chipcon CC2420DK user manual

Texas Instruments

Texas Instruments Chipcon CC2420DK user manual

NEC 78GK0S/K 1+ Series Application note

NEC

NEC 78GK0S/K 1+ Series Application note

Mikroe SEMITECH N-PLC Click Application note

Mikroe

Mikroe SEMITECH N-PLC Click Application note

Intel Agilex user guide

Intel

Intel Agilex user guide

DIGITAL-LOGIC MICROSPACE manual

DIGITAL-LOGIC

DIGITAL-LOGIC MICROSPACE manual

Texas Instruments TMS320F2837 D Series Workshop Guide and Lab Manual

Texas Instruments

Texas Instruments TMS320F2837 D Series Workshop Guide and Lab Manual

CYPRES CY14NVSRAMKIT-001 user guide

CYPRES

CYPRES CY14NVSRAMKIT-001 user guide

Espressif Systems ESP8266EX Programming guide

Espressif Systems

Espressif Systems ESP8266EX Programming guide

Abov AC33M8128L user manual

Abov

Abov AC33M8128L user manual

Silicon Laboratories C8051F800 user guide

Silicon Laboratories

Silicon Laboratories C8051F800 user guide

manuals.online logo
manuals.online logoBrands
  • About & Mission
  • Contact us
  • Privacy Policy
  • Terms and Conditions

Copyright 2025 Manuals.Online. All Rights Reserved.

Application Note
R01AN5615EJ0200 Rev.2.00 Page 1 of 42
Mar.24.22
RL78/G23
ELCL Multiple Parameter Monitoring Function
Introduction
This application note describes how to monitor multiple input signals (parameters) using the logic and event
link controller (ELCL). By using ELCL, it is possible to reduce the resources (external parts, ROM, RAM, etc.)
because the functions realized by external parts or software can be realized by hardware.
Target Device
RL78/G23
When applying the sample program covered in this application note to another microcomputer, modify the
program according to the specifications for the target microcomputer and conduct an extensive evaluation of
the modified program.
RL78/G23 ELCL Multiple Parameter Monitoring Function
R01AN5615EJ0200 Rev.2.00 Page 2 of 42
Mar.24.22
Contents
1. Specifications ..........................................................................................................................4
2. Conditions for Operation Confirmation Test.............................................................................6
3. Hardware.................................................................................................................................7
3.1 Example of Hardware Configuration .......................................................................................................7
3.2 Used Pins ................................................................................................................................................ 7
4. Software..................................................................................................................................8
4.1 Overview of the sample program ............................................................................................................8
4.2 Folder Configuration..............................................................................................................................11
4.3 Option Byte Settings..............................................................................................................................12
4.4 Constants ..............................................................................................................................................12
4.5 Variables................................................................................................................................................13
4.6 Functions...............................................................................................................................................13
4.7 Function Specifications .........................................................................................................................14
4.8 Flow Charts ...........................................................................................................................................16
4.8.1 Main Process.......................................................................................................................................16
4.8.2 Channel change process for TAU0.....................................................................................................17
4.8.3 TAU0 reset process.............................................................................................................................18
4.8.4 ELCL interrupt process........................................................................................................................19
4.8.5 ELCL flip-flop reset process................................................................................................................19
4.8.6 INTP0 interrupt process ......................................................................................................................20
4.8.7 Wait process........................................................................................................................................21
4.8.8 TAU0 channel 7 interrupt process.......................................................................................................21
5. Application example...............................................................................................................22
5.1 Setting up the ELCL components..........................................................................................................22
5.2 r01an5615_elcl_parameter.scfg............................................................................................................24
5.2.1 Clocks..................................................................................................................................................26
5.2.2 System.................................................................................................................................................26
5.2.3 r_bsp....................................................................................................................................................26
5.2.4 Config_LVD0.......................................................................................................................................26
5.2.5 Config_INTC........................................................................................................................................26
5.2.6 Config_TAU0_0、Config_TAU0_1、Config_TAU0_2、Config_TAU0_3...........................................26
5.2.7 Config_TAU0_7...................................................................................................................................26
5.2.8 Config_MultipleParameterMonitoring..................................................................................................27
5.2.9 Config_PORT......................................................................................................................................27
5.3 Component “ELCL multiple parameter monitoring”...............................................................................28
5.3.1 Setting the ELCL Register...................................................................................................................32
RL78/G23 ELCL Multiple Parameter Monitoring Function
R01AN5615EJ0200 Rev.2.00 Page 3 of 42
Mar.24.22
5.3.2 Example of using four ports with no external interrupt function as interrupts .....................................37
5.3.3 How to Make Inputs Negative Logic....................................................................................................38
6. Sample Code.........................................................................................................................39
7. Reference..............................................................................................................................39
Revision History............................................................................................................................40
RL78/G23 ELCL Multiple Parameter Monitoring Function
R01AN5615EJ0200 Rev.2.00 Page 4 of 42
Mar.24.22
1. Specifications
This application note describes an example of linking an output signal generated by ORing four input
signals using ELCL to a specific peripheral function.
Figure 1-1 shows the ELCL configuration and Figure 1-2 shows the timing chart.
Link the four input signals (INPUT A, INPUT B, INPUT C, INPUT D) to the three ORs (L1L0, L1L1, L2L0),
and link the generated signal to OUTPUT E. In addition, link the four input signals to the flip-flops (L2F0,
L2F1, L3F0, L3F1), and link the output of the flip-flops to the monitor register (ELOMONI). Thereby it is
possible to confirm the state of the input signal by reading the monitor register.
For example, link four ports (P20 to P23) that do not have an external interrupt function to INPUT A to
INPUT D, and set the link destination of OUTPUT E to event link interrupt (INTELCL). As a result, INTELCL
is generated when any one of P20 to P23 changes, and the port without external interrupt function can be
treated as an interrupt.
Figure 1-1 ELCL Configuration
L2F0
L3F1 L3F0 L2F1
L1L0
ELCL
L2L0
ELL2T
30EN
ELL3T
30EN ELL2T
31EN
ELL3T
31EN
L1L1
ELOMONI7ELOMONI6ELOMONI5ELOMONI4ELOMONI3ELOMONI2ELOMONI1ELOMONI0
INPUT A
INPUT B
INPUT C
INPUT D
OUTPUT E
ELOMONI
RL78/G23 ELCL Multiple Parameter Monitoring Function
R01AN5615EJ0200 Rev.2.00 Page 5 of 42
Mar.24.22
Figure 1-2 Timing chart
OUTPUT E
INPUT A
INPUT B
INPUT C
INPUT D
ELOMONI3
ELOMONI4
ELOMONI5
ELOMONI6
RL78/G23 ELCL Multiple Parameter Monitoring Function
R01AN5615EJ0200 Rev.2.00 Page 6 of 42
Mar.24.22
2. Conditions for Operation Confirmation Test
The sample code with this application note runs properly under the condition below.
Table 2-1 Operation Confirmation Conditions
Items
Contents
MCU
RL78/G23 (R7F100GLG)
Operating frequencies
•High-speed on-chip oscillator clock: 32 MHz
•
CPU/peripheral hardware clock: 32 MHz
Operating voltage
•3.3V
•LVD0 operations (VLVD0) : Reset mode
Rising edge TYP.1.90V
Falling edge TYP.1.86V
Integrated development environment (CS+)
CS+ for CC V8.07.00 from Renesas Electronics Corp.
C compiler (CS+)
CC-RL V1.11 from Renesas Electronics Corp.
Integrated development environment
(e
2
studio)
e2studio 2022-01 (22.01.0) from Renesas Electronics Corp.
C compiler (e2studio)
CC-RL V1.11 from Renesas Electronics Corp.
Integrated development environment (IAR)
IAR Embedded Workbench for Renesas RL78 v4.21.1 from
IAR Systems
C compiler (IAR)
Smart Configurator
V.1.2.0
Board support package (r_bsp)
V.1.13
Emulator
CS
+
, e2studio: COM port
IAR: E2 Emulator Lite
Board
RL78/G23 Fast Prototyping Board
(RTK7RLG230CLG000BJ)
RL78/G23 ELCL Multiple Parameter Monitoring Function
R01AN5615EJ0200 Rev.2.00 Page 7 of 42
Mar.24.22
3. Hardware
3.1 Example of Hardware Configuration
Figure 3-1 shows an example of the hardware configuration in this application.
Figure 3-1 Hardware Configuration
RL78/G23
EV
DD
V
DD
V
SS
EV
SS
RESET
REGC
V
DD
V
DD
P53
LED1EV
DD
P137 SW1
V
DD
P40/TOOL0
P11/TOOLRxD
P12/TOOLTxD PC(via USB)
Caution 1. This simplified circuit diagram was created to show an overview of connections only. When
actually designing your circuit, make sure the design includes sufficient pin processing and meets
electrical characteristic requirements. (Connect each input-only port to VDD or VSS through a
resistor.)
Caution 2. Connect the EVSS pin to VSS and the EVDD pin to VDD.
Caution 3. VDD must be held at not lower than the reset release voltage (VLVD0) that is specified as LVD.
3.2 Used Pins
Table 3-1 shows list of used pins and assigned functions.
Table 3-1 List of Pins and Functions
Pin Name
Input/Output
Function
P53
Output
LED1 lights (Low Active)
P137
Input
SW1 (Low Active)
Caution. In this application note, only the used pins are processed. When actually designing your circuit,
make sure the design includes sufficient pin processing and meets electrical characteristic
requirements.
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.
Table 4-1 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.
RL78/G23 ELCL Multiple Parameter Monitoring Function
R01AN5615EJ0200 Rev.2.00 Page 9 of 42
Mar.24.22
Figure 4-1 Operation overview
SW1 ON
SW1 ON
SW1 ON
SW1 ON
SW1 ON
g_timer_mode = 0
The LED1 OFF
ALL TAUmn STOP
g_timer_mode = 1
The LED1 is blinked at
INTTM00 intervals
g_timer_mode = 2
The LED1 is blinked at
INTTM00 and INTTM01
ORed intervals
g_timer_mode = 3
The LED1 is blinked at
INTTM00, INTTM01 and
INTTM02 ORed intervals
g_timer_mode = 4
The LED1 is blinked at
INTTM00, INTTM01,
INTTM02 and INTTM03
ORed intervals
Reset release
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
Figure 4-2 Timing chart of the sample code
INTTM01
INTTM00
INTTM03
INTTM02
INTELCL
SW1
LED1
g_timer_mode
= 0g_timer_mode
= 4
g_timer_mode
= 3
g_timer_mode
= 1g_timer_mode
= 2
RL78/G23 ELCL Multiple Parameter Monitoring Function
R01AN5615EJ0200 Rev.2.00 Page 10 of 42
Mar.24.22
Figure 4-3 shows the system configuration of the sample code.
Select INTTM00, INTTM01, INTTM02 and INTTM03 as the ELCL input signal and INTELCL as the ELCL
output signal.
Figure 4-3 System configuration of the sample code
L2F0L3F1 L3F0 L2F1
L1L0
ELCL
L2L0
ELL2T
30EN
ELL3T
30EN ELL2T
31EN
ELL3T
31EN
L1L1
ELOMONI7ELOMONI6ELOMONI5ELOMONI4ELOMONI3ELOMONI2ELOMONI1ELOMONI0
ELOMONI
INTTM00
INTTM01
INTTM02
INTTM03
Interrupt
Control
circuit
CPU
P53 P53 (LED1)
P137 (SW1)
TAU0
INTELCL