Download Print this page
Renesas RL78/G23 Series User Manual

Renesas RL78/G23 Series User Manual

Inductive proximity sensor shield, inductive proximity sensing solution
Hide thumbs Also See for RL78/G23 Series:

Advertisement

Quick Links

RL78/G23 Group
Renesas
RL78 Family
G23 Series
Inductive Proximity Sensing Solution
All information contained in these materials, including products and product specifications, represents
information on the product at the time of publication and is subject to change by Renesas Electronics
Corp. without notice. Please review the latest information published by Renesas Electronics Corp.
through various means, including the Renesas Electronics Corp. website (http://www.renesas.com).
www.renesas.com
RL78/G23 Microcontroller Group
Inductive Proximity Sensor Shield
User's Manual
Rev. 1.00 June 2022

Advertisement

loading
Need help?

Need help?

Do you have a question about the RL78/G23 Series and is the answer not in the manual?

Questions and answers

Summary of Contents for Renesas RL78/G23 Series

  • Page 1 All information contained in these materials, including products and product specifications, represents information on the product at the time of publication and is subject to change by Renesas Electronics Corp. without notice. Please review the latest information published by Renesas Electronics Corp.
  • Page 2: Corporate Headquarters

    Renesas Electronics disclaims any and all liability for any damages or losses incurred by you or any third parties arising from the use of any Renesas Electronics product that is inconsistent with any Renesas Electronics data sheet, user’s manual or other Renesas Electronics document.
  • Page 3: General Precautions In The Handling Of Microprocessing Unit And Microcontroller Unit Products

    Unit Products The following usage notes are applicable to all Microprocessing unit and Microcontroller unit products from Renesas. For detailed usage notes on the products covered by this document, refer to the relevant sections of the document as well as any technical updates that have been issued for the products.
  • Page 4 Renesas or its affiliates shall in no event be liable for any loss of profit, loss of data, loss of contract, loss of business, damage to reputation or goodwill, any...
  • Page 5: Table Of Contents

    User’s Manual Renesas RL78 Family Inductive Proximity Sensor Shield Contents Introduction ...........................5 Features ..............................5 Tools and Software Versions required ....................5 Resource Constraints and Usage ....................6 Memory resources ..........................6 Timing constraints & CPU load......................6 Physical Structure .........................8 Structure ..............................
  • Page 6 Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 7.4.6 Port 5 setup ............................26 7.4.7 Port 6 setup ............................26 7.4.8 Port 7 setup ............................27 7.4.9 Port 12 setup ............................. 27 7.4.10 Port 13 setup ............................. 27 7.4.11 Port 14 setup .............................
  • Page 7 Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual Figures Figure 1. Complete scan sequence ........................7 Figure 2. Hardware block diagram........................8 Figure 3. Software layer model ......................... 9 Figure 4. Application layer diagram ........................9 Figure 5. Hardware Layer Diagram ........................ 10 Figure 6.
  • Page 8 Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual Tables Table 1. CPU Load as a function of scan time ....................7 Table 2. Interrupt table ........................... 12 Table 3. ELCL selections ..........................28 Table 4. Command Table ..........................38 Table 5.
  • Page 9: Introduction

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 1. Introduction This document provides detailed information about the RL78/G23 Inductive Sensor system and how the functionality was implemented. The entire system is composed of the Inductive Proximity Sensor shield & the RL78/G23 64p FPB.
  • Page 10: Resource Constraints And Usage

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 2. Resource Constraints and Usage 2.1 Memory resources The chosen microcontroller - R7F100GLG2D includes: • 128 KB ROM (Code flash) • 8 KB Data Flash • 16 KB RAM The LLVM toolchain, version 10.0.0.202104, has been used in the development of this project. Optimization level is -O0 (None).
  • Page 11: Figure 1. Complete Scan Sequence

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual Default Delay Default Default Total scan Sensor Type of measurement percent excitation excitation sequence groups sensor point delay of a full delay [ns] width [ns] [us] [us] scan [%] Sensor Rotation 10.85...
  • Page 12: Physical Structure

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 3. Physical Structure 3.1 Structure The Renesas inductive proximity sensing solution is composed of: • 1 x RL78/G23 64p FPB • 1 x Inductive Proximity Sensor Shield 3.2 Hardware block diagram Figure 2 shows the hardware blocks used in the RL78/G23 inductive proximity sensing solution.
  • Page 13: Software Layer

    4. Software Layer The following picture represents the software model. Figure 3. Software layer model The Application layer implements the functionality of the Renesas inductive proximity sensing solution sequencer which contains: • Application process (APP): this module is responsible to update the hardware components for the sensors group selection.
  • Page 14: Figure 5. Hardware Layer Diagram

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual Figure 5. Hardware Layer Diagram R12UZ0106EG0100 Rev 1.00 Page 10 of 51 Jun.6.2022...
  • Page 15: Context Management

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 5. Context Management 5.1 System initialization The start-up sequence after power-on reset is presented in Figure 6 below. Figure 6. Activity diagram The first step after power-on reset is the basic controller initialization. Next is the initialization of the clock tree and microcontroller hardware components used for the application algorithm.
  • Page 16: Interrupts

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 5.2 Interrupts Table 2 below presents interrupts used in the solution. Interrupt Priority Callback Description Interval R_Config_ITL000_ITL001_Callback_Shared_Interrupt() Cyclic measurement Timer Level 1 trigger interrupt r_Config_TAU0_0_interrupt() Timer overflow TAU0 interrupt used to set...
  • Page 17: Mechanism

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 6. Mechanism The following section outlines the mechanisms utilized in the RL78/G23 64p FPB Inductive Proximity Sensing solutions implementation. 6.1 Differential Synchronization The working principle is based on LC tank circuit oscillation. To detect conductive target presence over a sense coil, another coil is required as reference.
  • Page 18: Figure 8. Excitation Pulse - Phase Shift Through One-Shot Pulse Output

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual Figure 8. Excitation pulse – phase shift through one-shot pulse output Timer channel 5 of the TAU is configured in interval timer mode and is used to time the delay between the pulse trigger and the comparator measurement point i.e., when the output envelopes are compared.
  • Page 19: Figure 9. Measurement Mechanism

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual Figure 9. Measurement mechanism R12UZ0106EG0100 Rev 1.00 Page 15 of 51 Jun.6.2022...
  • Page 20: System State Model

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 6.2 System State Model The Sequence Diagram below presents the measurement logic of the RL78/G23 Inductive Sensor. A disc presence check can be added to the cyclic measurement for the third rotation sensor, for safety rotation reading, with the same measurement logic as the rest of group sensors.
  • Page 21: Low Power Mode

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 6.3 Low power mode An important requirement of the inductive proximity sensing solution is low power consumption. For this, all unused pins are configured as outputs to remove the through currents associated with input buffers.
  • Page 22 Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual R12UZ0106EG0100 Rev 1.00 Page 18 of 51 Jun.6.2022...
  • Page 23 Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual The metal disc does not cover the position coils (sensors 1 & 2). Their signals are above the reference level. After a rotation of 90 degrees, the disk covers only coil 1, its signal level is below the reference and the signal of the second coil is above the reference.
  • Page 24 Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual After a rotation of 90 degrees, the disk covers only coil 2, its signal level is below the reference and the signal of the first coil is above the reference.
  • Page 25: Peripheral Configuration

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 7. Peripheral configuration The build-in e studio configurator was used to configure the peripheral and pins state as follows: 7.1 Used stack The following stack tree structure is used: Figure 12. Stack tree R12UZ0106EG0100 Rev 1.00...
  • Page 26: Clock Tree

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 7.2 Clock tree For this configuration clock sources are used: • 32 MHz High-speed on-chip oscillator • 32.768 kHz XT1 external oscillator used for the 32-bit low power interval timer in stop mode.
  • Page 27: Bsp

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 7.3 BSP The Board Support Package configuration is presented below: Figure 14. BSP configuration R12UZ0106EG0100 Rev 1.00 Page 23 of 51 Jun.6.2022...
  • Page 28: Port Function/ Pin Assignments

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 7.4 Port function/ Pin assignments The next image provides the graphical view of pins assignment: Figure 15. Pins assignment R12UZ0106EG0100 Rev 1.00 Page 24 of 51 Jun.6.2022...
  • Page 29: Port 0 Setup

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 7.4.1 Port 0 setup Pin description/function SPI CS ELCL output 0 – excitation for rotation S1 and S2 Unused output pin I2C SDA channel 2 I2C SCL channel 2 Sensor Timer – slave output Unused output pin 7.4.2 Port 1 setup...
  • Page 30: Port 3 Setup

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 7.4.4 Port 3 setup Pin description/function Output pulse used to check with the scope the measurement point trigger (also it is configured as I2C SCL channel1 – not used) Reference Timer – slave output 7.4.5 Port 4 setup...
  • Page 31: Port 7 Setup

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 7.4.8 Port 7 setup Pin description/function SPI SCLK SPI MOSI SPI MISO Unused output pin Output enable A MUX IC 2 Output enable B MUX IC 2 Output selection 0 MUX IC 2 Unused output pin 7.4.9 Port 12 setup...
  • Page 32: Logic And Event Link Controller

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 7.5 Logic and Event link controller The logic and event link controller (ELCL) connects signals’ output through peripheral functions to other specified peripheral functions using internal logic cell blocks, allowing direct communication between peripheral functions without CPU intervention.
  • Page 33: Figure 17. Elc Output Destination Configuration

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual The ELCL output destination is available in the next image, where: • RS1 + RS2: rotation sensor 1 and sensor 2 • PS1 + PS2: planar sensor 1 and sensor 2 •...
  • Page 34: Timers

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 7.6 Timers 7.6.1 Measurement period For the measurement period the 32-bit low power interval timer is used, configured in 16-bit count mode, using the XT1 oscillator as its count source. The default period is 125ms, but this period can be changed using diagnostic services.
  • Page 35: Reference Excitation Timer

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 7.6.3 Reference excitation timer TAU02 and TAU03 are used in one-shot pulse output configuration, to generate excitation pulses for the reference LC circuits. The master channel (TAU02) controls the delay between starting the one-shot pulse timer and the pulse being asserted.
  • Page 36: Sensor Excitation Timer

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 7.6.4 Sensor excitation timer TAU04 and TAU05 are used in one-shot pulse output configuration, to generate excitation pulses for the sense LC circuits. The master channel (TAU04) controls the delay between starting the one-shot pulse timer and the pulse being asserted.
  • Page 37: Comparators

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 7.7 Comparators The on-chip comparators are used to compare the analog envelopes of the reference and sense circuits at a determined point in time. The comparator result is read directly from the COMPMDR register, without comparator interrupt.
  • Page 38: System Configuration

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 8. System configuration 8.1 External sensors groups The inductive proximity sense project is configured to detect conductive targets using three different coil groups on the inductive sense shield: • Rotation group •...
  • Page 39: Diagnostic Services

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 8.2 Diagnostic services The system has a diagnostic module implemented through a UART communications interface. Initially the RL78/G23 enters stop mode between scans. Therefore, the devices UART channel is configured to operate in snooze mode on detection of a valid edge on the Rx pin.
  • Page 40: Real Term Example

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 0x22 0xFF 0x1B  read rotation and button counter (response in ASCII format). 8.2.4 Real Term example Example write with Real Term, commands values are sent in hexadecimal. • Command: 0x2E 0xFF 0x02 0x64 0x00 Figure 23.
  • Page 41: Figure 24. Real Term Read

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual Figure 24. Real Term Read R12UZ0106EG0100 Rev 1.00 Page 37 of 51 Jun.6.2022...
  • Page 42: Command Id Table

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 8.2.5 Command ID table CMD ID Command Description Comments Default values 0xFF00 Reserved 0xFF01 Excitation period (ms) Write only 125 [ms] 0xFF02 Planar sensors pulse width (ns) Write only 125 [ns]...
  • Page 43 Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual NOTE: • Minimum delay value for sensors and references = 63 [ns] • Minimum pulse width value for sensors and references = 94 [ns] R12UZ0106EG0100 Rev 1.00 Page 39 of 51...
  • Page 44: Hardware

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 9. Hardware 9.1 Final Product Figure 25 below shows the inductive proximity sensing shield PCB annotated. This board needs to be connected to the RL78/G23 64p FPB. The inductive proximity sensing shield is comprised of two PCB’s: •...
  • Page 45 Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 1. Rotation sensors group (Rotation coils PCB) 2. Rotation circuit 3. Rotation indicating LEDs 4. Planar buttons group 5. Planar buttons circuit 6. Planar buttons indicating LEDs 7. Ferrite buttons group 8.
  • Page 46: Schematic

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 9.2 Schematic 9.2.1 Main PCB Schematic Components Figure 26. Header & Arduino connectors Figure 27. PMOD connectors Figure 28. Supply options (+3V3 coin cell & PMOD supply switch) R12UZ0106EG0100 Rev 1.00 Page 42 of 51 Jun.6.2022...
  • Page 47: Figure 29. Rotation Group (Excitation & Filters Only)

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual Figure 29. Rotation group (excitation & filters only) R12UZ0106EG0100 Rev 1.00 Page 43 of 51 Jun.6.2022...
  • Page 48: Figure 30. Planar Group

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual Figure 30. Planar group R12UZ0106EG0100 Rev 1.00 Page 44 of 51 Jun.6.2022...
  • Page 49: Figure 31. Ferrite Group

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual Figure 31. Ferrite group Figure 32. External group (filters only) R12UZ0106EG0100 Rev 1.00 Page 45 of 51 Jun.6.2022...
  • Page 50: Figure 33. Mux's

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual Figure 33. MUX's Figure 34. LEDs R12UZ0106EG0100 Rev 1.00 Page 46 of 51 Jun.6.2022...
  • Page 51: Rotation Pcb Schematic Components

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 9.2.2 Rotation PCB schematic components Figure 35. Rotation coils R12UZ0106EG0100 Rev 1.00 Page 47 of 51 Jun.6.2022...
  • Page 52: Component Interface

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual 10. Component interface The component interfaces section describes the programming interfaces of each of each of the software components that make up the inductive proximity sensing project. Interface Description R_Main_Init() Starts the initialization of the application layer Table 5.
  • Page 53: Table 9. Tau Module Interface

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual Interface Description TAU_UpdateTimerValues() Used to update the correlated values for each sensor group TAU_u16ConvertUsToCounts() Converts measurement point period from diagnosis commands to count clock required for timer register. TAU_u16ConvertMasterNsToCounts() Converts excitation delay period from diagnosis commands to count clock required for timer register.
  • Page 54: Website And Support

    RL78/G23 64p FPB Resources RL78/G23-64p Fast Prototyping Board | Renesas RL78 Product Information RL78 Low Power 8 & 16-bit MCUs | Renesas RL78 Product Support Forum RenesasRulz RL78 Videos RL78 Family Software & Tool Course | Renesas Renesas Support renesas.com/support...
  • Page 55: Revision History

    Renesas RL78 Microcontrollers Inductive Proximity Sensor Shield – User's Manual Revision History Description Rev. Date Page Summary 1.00 Jun.6.2022 — Initial release R12UZ0106EG0100 Rev 1.00 Page 51 of 51 Jun.6.2022...
  • Page 56 Inductive Proximity Sensor Shield – User’s Manual Publication Date: Jun.6.2022 Published by: Renesas Electronics Corporation...
  • Page 57 Inductive Proximity Sensor Shield - User’s Manual R12UZ0106EG0100...