Renesas RL78 Application Note
Hide thumbs Also See for RL78:

Advertisement

Quick Links

RL78, RX Family
TM
Pmod
Application Board
Battery Charging, Sensor and Pmod Sample Code
Introduction
TM
The Pmod
Application board is an auxiliary PCB designed to connect to Renesas Starter Kit (RSK) boards using their
application headers. It provides additional features not necessarily found on the RSK board, such as 4 Pmod™ interfaces,
battery-charge control for USB applications, a temperature sensor, LEDs, buzzer and some extra switches. Further
functionality can be provided from sensor peripherals which are not fitted as standard. These are a digital accelerometer
and both an analogue and digital gyroscope.
This application note describes the technical details of the sample code designed to demonstrate how to use the Pmod
Application Board peripherals with the RSK. Each sample has been targeted at a specific RSK to which the Pmod
Application Board connects. The target device for each sample is shown in the table below.
Sample Code
Battery Charging
Accelerometer Sensor
Analogue Gyroscope Sensor
Digital Gyroscope Sensor
Temperature Sensor
Pmod™ Display
TM
Please refer to the Pmod
The following documents apply to the Pmod
documents. The newest versions of the documents listed are available from the Renesas Electronics Web site.
Document Type
Description
User's Manual
Describes the technical details of the RSK
hardware.
Quick Start Guide
Provides simple instructions to setup the
RSK and run the first sample.
Schematics
Full detail circuit schematics of the RSK.
Pmod™ Application Board – Sensors,
Application Note
Pmod™ and Battery charging Application
Note
R01AN2669EG0100 Rev.1.00
Mar 20, 2015
Target Platform
RSKRL78G1C
RSKRX111
RSKRX111
RSKRX111
RSKRX111
RSKRX111
Application Board User's Manual for compatibility with other RSK's.
TM
Application board. Make sure to refer to the latest versions of these
APPLICATION NOTE
R01AN2669EG0100
Document Title
Document No.
R20UT3112EG0100
Pmod™
Application Board
User's Manual
R20UT3113EG0100
Pmod™
Application Board
Quick Start Guide
R20UT3111EG0100
Pmod™
Application Board
Schematics
R01AN2669EG0100
Pmod™
Application Board
Application Note
Rev.1.00
Mar 20, 2015
TM
TM
Page 1 of 24

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Renesas RL78

  • Page 1 Introduction The Pmod Application board is an auxiliary PCB designed to connect to Renesas Starter Kit (RSK) boards using their application headers. It provides additional features not necessarily found on the RSK board, such as 4 Pmod™ interfaces, battery-charge control for USB applications, a temperature sensor, LEDs, buzzer and some extra switches. Further functionality can be provided from sensor peripherals which are not fitted as standard.
  • Page 2: Table Of Contents

    Contents Overview ......................... 4 Equipment Required ........................4 Application Leading Tool (Applilet) ................5 Hardware Setup ......................6 RSKRL78G1C Configuration ...................... 6 RSKRX111 Configuration ......................7 Pmod Application Board ......................8 Battery Charging Sample ....................9 Host Mode ............................ 9 4.1.2 Configuration ...........................
  • Page 3 Temperature Sensor ......................... 18 5.4.1 Connections .......................... 18 5.4.2 RSKRX111 Interface ......................18 5.4.3 Operation ..........................18 Pmod Display sample ....................19 6.1.1 Connections .......................... 19 6.1.2 RSKRX111 Interface ......................20 6.1.3 Operation ..........................20 R01AN2669EG0100 Rev.1.00 Page 3 of 24 Mar 20, 2015...
  • Page 4: Overview

    This applications note aims to provide the user with information that describes each embedded firmware sample for the Pmod Application Board. Its aim is to describe the operation of the sample code for the various peripherals, to aid in the understanding of how to operate such peripherals with the Renesas microcontrollers on the RSK boards. Equipment Required Listed below is the equipment required to run all the sample code.
  • Page 5: Application Leading Tool (Applilet)

    RL78, RX Family Pmod Application Board Battery Charging, Sensor and Pmod Sample Code Application Leading Tool (Applilet) Applilet for RSKL78G1C & RSKRX111 has been used to generate part of the sample code discussed in this document. Applilet is a Windows GUI tool for generating template ‘C’ source code and project settings for the RSKRRL78G1C & RSKRX111. When using Applilet, the engineer is able to configure various MCU features and operating parameters using intuitive GUI controls, thereby bypassing the need in most cases to refer to sections of the Hardware Manual.
  • Page 6: Hardware Setup

    RL78, RX Family Pmod Application Board Battery Charging, Sensor and Pmod Sample Code Hardware Setup RSKRL78G1C Configuration The jumper settings and option links needed for the ‘Battery Charging’ sample are shown in Figure 3-1. Jumper Setting USB1_H POWER LED0 LED1...
  • Page 7: Rskrx111 Configuration

    RL78, RX Family Pmod Application Board Battery Charging, Sensor and Pmod Sample Code RSKRX111 Configuration The jumper settings and option links needed for the Pmod Display and Sensor samples are shown in Figure 3-2. Jumper Setting Pin2-3 Pin1-2 Pin1-2 Pin1-2...
  • Page 8: Pmod Tm Application Board

    Jumper Setting Pin1-2 Pin2-3 Pin1-2 Figure 3-3: Illustration of jumper settings needed for the Pmod™ Application Board. * This board will be sold or is sold to publics as Renesas brand R01AN2669EG0100 Rev.1.00 Page 8 of 24 Mar 20, 2015...
  • Page 9: Battery Charging Sample

    RL78, RX Family Pmod Application Board Battery Charging, Sensor and Pmod Sample Code Battery Charging Sample The ‘Battery Charging’ sample has been developed with the RSKRL78G1C platform together with the Pmod Application Board. It aims to demonstrate the use of the RSK and Pmod...
  • Page 10: Peripheral Mode

    RL78, RX Family Pmod Application Board Battery Charging, Sensor and Pmod Sample Code Peripheral Mode In Peripheral Mode, the Pmod™ Application Board provides the means to charge a connected lithium-ion battery from a USB host via the Peripheral USB connection on the RSK. The RSK microcontroller will detect the Host charger status, either SDP, CDP or DCP, and then communicate with the battery charge controller R2A20056BM IC10 via I2C to control the charging current of the battery accordingly.
  • Page 11: User Interface

    RL78, RX Family Pmod Application Board Battery Charging, Sensor and Pmod Sample Code User Interface In either mode, there will be certain features upon the Pmod™ LCD Screen available for the user. After the user- pressing switch 1 denoted SW1 upon the RSKRX111, the user will enter the menu. Using the variable resistor denoted RV1 the user will be able to highlight an option in the menu.
  • Page 12: Battery Status

    RL78, RX Family Pmod Application Board Battery Charging, Sensor and Pmod Sample Code 4.4.1 Battery Status In Battery Status, the battery charge controller R2A20056BM IC10 is interrogated and the battery state summarised on the Pmod™ display. The possibilities are "Battery Not Detected", "Weak Battery", "Full Battery", "Battery Detected" or "Good Battery".
  • Page 13: Sample Code Information

    RL78, RX Family Pmod Application Board Battery Charging, Sensor and Pmod Sample Code Sample Code Information 4.5.1 RSKRL78G1C Interface Task Module MCU Pins Used Application Header Function Pins Used JA1 – 25 Interfacing with IC10 MCU - IIC SCLA0-P60 Communicating with JA1 –...
  • Page 14: Sensor Samples

    RL78, RX Family Pmod Application Board Battery Charging, Sensor and Pmod Sample Code Sensor Samples The sensor samples have been developed on the RSKRX111 platform connected to the Pmod Application Board. Accelerometer Sensor The aim of this sample is to use the accelerometer to display acceleration in the 3 X, Y and Z planes.
  • Page 15: Analogue Gyroscope Sensor

    RL78, RX Family Pmod Application Board Battery Charging, Sensor and Pmod Sample Code Analogue Gyroscope Sensor The aim for this sample is to use the analogue gyroscope to display the z-axis (yaw) angular rate of the Pmod Application Board. The Pmod Application Board is not fitted with an Analogue Gyroscope or an associated Operational Amplifier by default.
  • Page 16: Operation

    RL78, RX Family Pmod Application Board Battery Charging, Sensor and Pmod Sample Code 5.2.3 Operation The sample first initialises the display on Pmod1. In initiating the display, the IIC MCU peripheral is configured in I2C Mode (Master) to drive port expander IC14 that controls the RST and PIN10 lines of the interface.
  • Page 17: Digital Gyroscope Sensor

    RL78, RX Family Pmod Application Board Battery Charging, Sensor and Pmod Sample Code Digital Gyroscope Sensor The aim for this sample is to use the digital gyroscope to display the z-axis (yaw) angular rate of the Pmod Application Board. As supplied the Pmod Application Board is not fitted with a digital gyroscope.
  • Page 18: Temperature Sensor

    RL78, RX Family Pmod Application Board Battery Charging, Sensor and Pmod Sample Code Temperature Sensor The aim for this sample is to use the temperature sensor to display the temperature on a display connected to Pmod1. The Pmod™ Application Board is fitted with a Microchip MCP9700AT Temperature Sensor by default.
  • Page 19: Pmod Display Sample

    Pmod™ Application Board Battery Charging, Sensor and Pmod Sample Code RL78, RX Family Pmod Display sample The aim of this sample is to demonstrate the display of text and pictures on a display connected to any of the Pmod connectors Pmod1 – Pmod4.
  • Page 20: Rskrx111 Interface

    Pmod™ Application Board Battery Charging, Sensor and Pmod Sample Code RL78, RX Family 6.1.2 RSKRX111 Interface Task Module MCU Pins Used Application Header Function Pins Used MCU – SCI1 TXD1 – P16 JA2 – 6 Interfacing with Data Transfer on Pmod SCK1 –...
  • Page 21 Pmod™ Application Board Battery Charging, Sensor and Pmod Sample Code RL78, RX Family Website and Support Renesas Electronics Website http://www.renesas.com/ Inquiries http://www.renesas.com/contact/ R01AN2669EG0100 Rev.1.00 Page 21 of 24 Mar 20, 2015...
  • Page 22 Revision History Description Rev. Date Page Summary 1.00 Mar 20 2015 Created. All trademarks and registered trademarks are the property of their respective owners.
  • Page 23 General Precautions in the Handling of MPU/MCU Products The following usage notes are applicable to all MPU/MCU 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 24 10. It is the responsibility of the buyer or distributor of Renesas Electronics products, who distributes, disposes of, or otherwise places the product with a third party, to notify such third party in advance of the contents and conditions set forth in this document, Renesas Electronics assumes no responsibility for any losses incurred by you or third parties as a result of unauthorized use of Renesas Electronics products.

Table of Contents