Page 1
Re- nesas Electronics Corporation without notice. Please review the latest information published by Renesas Electronics Corporation through various means, including the Renesas Electronics Corporation website (http://www.renesas.com).
Page 2
Renesas Electronics. Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for an applica- tion categorized as “Specific”...
Page 3
RSK. Renesas expressly disclaims all such warranties. Renesas or its affiliates shall in no event be liable for any loss of profit, loss of data, loss of contract,...
Page 4
The following documents apply to the RL78G13 Group. Make sure to refer to the latest versions of these docu- ments. The newest versions of the documents listed may be obtained from the Renesas Electronics Web site.
Page 5
List of Abbreviations and Acronyms Abbreviation Full Form Analogue to Digital Converter DMAC Direct Memory Access Controller Inter Integrated Circuit Liquid Crystal Display Light Emitting Diode Local Interconnect Network Low Voltage Detection Microcontroller Unit Personal Computer Renesas Starter Kit Real Time Clock Watchdog Timer...
1. Overview Purpose This RSK is an evaluation tool for Renesas microcontrollers. This manual explains the operation of the sample code provided, and its interaction with the APIs used which were generated using Applilet3 for Renesas RL78G13. Ap- plilet is a separate tool used for generating code for configuring the on-board device peripherals and modules de- pending on user setting selections.
RL78G13 2. Introduction 2. Introduction This document explains by text the functionality of the sample code and the steps required to observe the correct operation of each sample. R20UT0746EG-0100 Rev. 1.00 Page 9 of 26 Jun 21, 2011...
RL78G13 3. RSK Sample Code Concept 3. RSK Sample Code Concept Sample Code Structure The basic structure of all RSK sample code is shown in Figure 2-1 below. The first two functions, ‘__low_level_init’ and ‘R_Systeminit’, configure the MCU before the main program code executes.
RL78G13 3. RSK Sample Code Concept List of Sample Code Table 2-2 below lists the sample code supplied with the RSKRL78G13T, and describes their function. Sample Code Description ADC_Oneshot Demonstrates usage of the 10bit and 8bit ADC module, in one shot mode.
All peripherals and modules are configured prior to the program calling the main function. The tutorial code initialises the LCD module, and displays ‘Renesas’ on the first line of the LCD, and the name of the MCU on the second line.
RL78G13 4. Tutorial Sample Application 4.2.1 Description The application sample is intended as a starting platform for the user to write his/her own code. The sample in- cludes all the necessary initialisation code and configuration settings from previous samples. The main( ) function contains no sample code, and performs no additional functionality.
RL78G13 5. Peripheral Samples 5. Peripheral Samples The sample code in this section provides examples of initialisation and usage of some of the MCU’s peripheral modules. The sample code also provides examples of how to debug MCU peripherals. ADC_OneShot 5.1.1...
RL78G13 5. Peripheral Samples 5.2.2 Operation All peripherals and modules are configured prior to the program calling the main function. The A/D channel connected to the potentiometer is initially configured for 10-bit precision operations. The sample first initialises the debug LCD, and displays the name of the sample.
RL78G13 5. Peripheral Samples Async_Serial 5.4.1 Description This sample code demonstrates usage of serial array unit (SAU), configured in asynchronous mode. The SAU module is setup to communicate to a PC running a terminal emulator program, via an RS-232 cable.
RL78G13 5. Peripheral Samples 5.6.1 Description In this sample, the LVD (Low Voltage Detection) circuit is configured to generate an interrupt when the power sup- ply equals or falls below the detection level. The detection level is approximately 4.06Volts. 5.6.2 Operation 1.
RL78G13 5. Peripheral Samples Inside the Master_EEPROM function, the second buffer array location is set to 0x30 which represents the ASCII character ‘0’. The sample enters and infinite while loop with the program never returning to the main function. Data transfer is handled using interrupts with transmission or reception selected by SW1 and SW3 switch presses, respec- tively.
RL78G13 5. Peripheral Samples Note: Use a 4.7KΩ pull-up resistor on the data and clock line. 5.8.3 Operation All peripherals and modules are configured prior to the program calling the main function. The sample initialises the LCD module, and displays “IIC Slav” on the first line.
All user LEDs are turned off once the transfer ends. The second line of the LCD module will display “END”. The sample then enters an infinite while loop. Stop the program execution and observe the memory contents. Memory locations 0xFFA00 – 0xFFBFF should be filled up with the string “Renesas RL78G13”. 5.11 5.11.1 Description This sample demonstrates usage of the WDT (Watch Dog Timer).
RL78G13 5. Peripheral Samples 5.11.2 Operation 1. All peripherals and modules are configured prior to the program calling the main function. 2. The sample initialises the LCD module, and displays “WDT” on the first line and “Running.” on the second.
Page 23
REVISION HISTORY RSKRL78G13 Tutorial Manual Rev. Date Description Page Summary ⎯ 1.00 Jun 21, 2011 First Edition issued...
Page 24
Renesas Starter Kit Software Help Manual Publication Date: Rev.1.00 Jun 21, 2011 Published by: Renesas Electronics Corporation...
Page 25
SALES OFFICES Refer to "http://www.renesas.com/" for the latest and detailed information. Renesas Electronics America Inc. 2880 Scott Boulevard Santa Clara, CA 95050-2554, U.S.A. Tel: +1-408-588-6000, Fax: +1-408-588-6130 Renesas Electronics Canada Limited 1101 Nicholson Road, Newmarket, Ontario L3Y 9C3, Canada...
Need help?
Do you have a question about the RL78G13 and is the answer not in the manual?
Questions and answers