APPLICATION NOTE
R01AN1051EJ0100 Rev.1.00 Page 1 of 38
Mar 21, 2012
R8C/3MK Group
USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
Introduction
This document is an instruction manual for the R0K5R8C3MDU30BR that enables USB-to-Serial communication
conversion using the USB Peripheral function and serial communication function in R8C/3MK Group MCUs.
Target Device
R8C/3MK Group
Contents
1. Preface .............................................................................................................................................. 2
2. Important ........................................................................................................................................... 3
3. Precautions for Safety....................................................................................................................... 5
4. Demo Board Functions ..................................................................................................................... 8
5. Related Documents........................................................................................................................... 8
6. Demo Board Description ................................................................................................................... 9
7. Setting up the Demo Board............................................................................................................. 12
8. Operating Instructions ..................................................................................................................... 15
9. I2C demo communication protocol .................................................................................................. 23
10. SSU demo communication protocol................................................................................................ 28
11. Circuit Diagram................................................................................................................................ 34
12. Parts Layout Diagram ..................................................................................................................... 34
13. Parts List ......................................................................................................................................... 34
R01AN1051EJ0100
Rev.1.00
Mar 21, 2012
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 2 of 38
Mar 21, 2012
1. Preface
This document provides hardware setting instructions, operating instructions and usage notes for the
R0K5R8C3MDU30BR to enable USB-to-Serial communication conversion using the USB Peripheral function and
serial communication function in R8C/3MK Group MCUs.
Before using the demo board, please refer to ”7.1 Bundled Accessories Confirmation” to confirm you have all
accessories bundled with the demo board package. If you have any questions concerning the demo board, please contact
the closest Renesas Electronics Corp., Renesas Solutions Corp., or Renesas Electronics Sales Corp. office.
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 3 of 38
Mar 21, 2012
2. Important
Before using this product, be sure to read this instruction manual carefully. Keep this manual, and refer to it when you
have questions about this product.
Product:
"Product" in this document collectively refers to the following products manufactured by Renesas Electronics
Corporation
(1) R8C/3MK Group USB - to - Serial Communication Conversion Demo Board R0K5R8C3MDU30BR
"Product" herein encompasses neither the customer's user system nor the host machine.
Purpose of use of the product:
This product is a demonstration board to use USB - to -Serial Communication function with R8C/3MK Group MCU.
Be sure to use this product correctly according to said purpose of use. Please avoid using this product other than for
its intended purpose of use.
For those who use this product:
This product can only be used by those who have carefully read this instruction manual and know how to use it.
Use of this product requires basic knowledge of electric circuits, logical circuits, and MCUs.
When using this product:
(1) In no event shall Renesas Electronics Corporation be liable for any consequence arising from the use of this
product.
(2) Renesas Electronics Corporation strives to provide workarounds for and correct trouble with products
malfunctions, with some free and some incurring charges. However, this does not necessarily mean that Renesas
Electronics Corporation guarantees the provision of a workaround or correction under any circumstances.
(3) This product covered by this document has been developed on the assumption that it will be used for evaluation in
laboratories. Therefore, it does not fall within the scope of applicability of the Electrical Appliance and Material
Safety Law and protection against electromagnetic interference when used in Japan.
(4) Renesas Electronics Corporation cannot predict all possible situations and possible cases of misuse that carry a
potential for danger. Therefore, the warnings in this instruction manual and the warning labels attached to this
product do not necessarily cover all such possible situations and cases. The customer is responsible for correctly
and safely using this product.
(5) The product covered by this document has not been through the process of checking conformance with UL or other
safety standards and IEC or other industry standards. This fact must be taken into account when the product is
taken from Japan to some other country.
(6) This product is a product used for development and an evaluation stage. It cannot include in a user's product and
cannot mass-produce.
(7) Even if it is the case where fault is in the device carried in this product, it does not exchange for the fault repair
article of a device.
(8) Operation with all USB host devices cannot be guaranteed. And Connection to all serial communication devices
cannot be guaranteed.
(9) The Application Notes of this product are all references, and no one to guarantee the operation.
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 4 of 38
Mar 21, 2012
Usage restrictions:
This product has been developed as a means of supporting system development by users. Therefore, do not use it as
an embedded device in other equipment. Also, do not use it to develop systems or equipment for use in the
following fields.
(1) Transportation and vehicular
(2) Medical (equipment that has an involvement in human life)
(3) Aerospace
(4) Nuclear power control
(5) Undersea repeaters
If you are considering the use of this product for one of the above purposes, please be sure to consult your local
distributor.
About product changes:
We are constantly making efforts to improve the design and performance of our product. Therefore, the
specification or design of the product, or this user's manual, may be changed without prior notice.
About rights:
(1) We assume no responsibility for any damage or infringement on patent rights or any other rights arising from the
use of any information, products or circuits presented in this user’s manual.
(2) The information or data in this user’s manual does not implicitly or otherwise grant a license to patent rights or any
other rights belonging to Renesas or to a third party.
(3) This user’s manual and this product are copyrighted, with all rights reserved by Renesas. This user’s manual may
not be copied, duplicated or reproduced, in whole or part, without prior written consent from Renesas.
About diagrams:
Some diagrams in this user’s manual may differ from the objects they represent.
Warranty:
Renesas will exchange this board free of charge only due to manufacturing defects.
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 5 of 38
Mar 21, 2012
3. Precautions for Safety
3.1 Definitions of Signal Words
This chapter describes the precautions which should be taken in order to use this product safely and properly. Be sure to
read and understand this chapter before using this product.
Contact us if you have any questions about the precautions described here.
This chapter describes the precautions which should be taken in order to use this product safely and properly. Be sure to
read this chapter before using this product.
WARNING
WARNING indicates a potentially dangerous situation that will cause death or heavy
wound unless it is avoided.
CAUTION
CAUTION indicates a potentially dangerous situation that will cause a slight injury or
a medium-degree injury or property damage unless it is avoided.
In addition to the two above, the following are also used as appropriate to indicate additional precautions.
[Notice] Point out the attention for the malfunction by wrong setting.
means WARNING or CAUTION.
Example:
CAUTION AGAINST AN ELECTRIC SHOCK
means PROHIBITION.
Example:
DISASSEMBLY PROHIBITED
means A FORCIBLE ACTION.
Example:
UNPLUG THE POWER CABLE FROM THE RECEPTACLE.
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 6 of 38
Mar 21, 2012
3.2 Warning
WARNING
Warnings for Power Supply:
This product CAN NOT use external power supply from header pins. The demo board may incur
damage.
Do not touch the plug of the power cable when your hands are wet. This may cause electric
shock.
Power and Ground terminals are also on the rear surface of this product. They should Not be in
contact with a conductive material directly.
When installing this equipment, insure that a reliable ground connection is maintained.
If you smell a strange odor, hear an unusual sound, or see smoke coming from this product, then
disconnect power immediately Do not use this as it is because of the danger of electric shock
and/or fire. In this case, contact your local distributor.
Before setting up this product and connecting it to other devices, turn off power or remove a
power cable to prevent injury or product damage.
Warnings to Be Taken for Handling:
Do not break down this product. Breaking down the product will void your warranty.
Warning for Installation:
Do not set this product in water or areas of high humidity. Make sure that the product does not
get wet. Spilling water or some other liquid into the product may cause un-repairable damage.
Warning for Use temperature:
This equipment is to be used in an environment with a maximum ambient temperature of 35°C.
Care should be taken that this temperature is not exceeded.
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 7 of 38
Mar 21, 2012
3.3 Caution
CAUTION
Cautions to Be Taken for Handling This Product:
Use caution when handling the product. Be careful not to apply a mechanical shock.
Do not touch the connector pins of this product directly. Static electricity may damage the
internal circuits.
When attaching and removing the cable, hold the plug of the cable and do not pull on the cable.
Do not pull this product by the communications interface cable. Excessive flexing or force may
break conductors.
When you connect an external board to this product through test pins, be careful not to short
signal lines or between power line and ground. If this product is revised by the user, operation
cannot be guaranteed.
Note on Transporting the Product:
When sending your product, use the packing box and cushioning material supplied with the
product when it was delivered to you and specify caution in handling (handling as precision
equipment). If packing of your product is not complete, it may be damaged during transportation.
When you pack your product in a bag, make sure to use the conductive plastic bag supplied with
the product. If you use a different bag, it may lead to further trouble with your product due to
static electricity.
Caution to Be Taken for Disposal:
Penalties may be applicable for incorrect disposal of this waste, in accordance with your national
legislation.
European Union regulatory notices:
The WEEE (Waste Electrical and Electronic Equipment) regulations put responsibilities on
producers for the collection and recycling or disposal of electrical and electronic waste. Return of
WEEE under these regulations is applicable in the European Union only. This equipment
(including all accessories) is not intended for household use. After use the equipment cannot be
disposed of as household waste, and the WEEE must be treated, recycled and disposed of in an
environmentally sound manner.
Renesas Electronics Europe GmbH can take back end of life equipment, register for this service
at “http://www.renesas.eu/weee”.
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 8 of 38
Mar 21, 2012
4. Demo Board Functions
With the MCU and the board circuits, this demo board can be used for the following.
USB-to-UART communication conversion function (program already written to MCU)
USB-to-UART/USB-to-I2C/USB-SSU communication conversion function (provided via downloading module)
Rewrite internal program ROM via USB (downloader program already written to MCU)
Supports bus-powered (regulator from 5V to 3.3V) system power supply
5. Related Documents
Please refer to the following manuals and application note as needed when using the demo board.
R8C/3MU Group, R8C/MK Group Users Manual Hardware Version
Download from here:
http://www.renesas.com/products/mpumcu/r8c/Documentation.jsp
R8C/USB Group USB Downloader (r01an0703ej_r8cusbfdl.pdf)
Please contact your Renesas sales or representative office to obtain this document.
Renesas USB Device USB Peripheral Communications Devices Class Driver (PCDC)
(r01an0555ej_r8cusbpcdc.pdf)
Please contact your Renesas sales or representative office to obtain this document.
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 9 of 38
Mar 21, 2012
6. Demo Board Description
6.1 Demo Board Specification
Figure 1 and Figure 2 show external views of the front and back of the demo board.
Figure 1 R0K5R8C3MDU30BR Board (Top View)
Figure 2 R0K5R8C3MDU30BR External View (back)
LED (Green)
R8C/3MK
MCU
USB receptacle
(mini B)
USB Downloader
function switch pin
External connection
pins (J3)
Ceramic
oscillator
Regulator
(from VBUS)
External connection
pins (J3)
External connection
pins (J1, J2)
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 10 of 38
Mar 21, 2012
Table 1 shows the key components embedded on the demo board. Please refer to “Appendix 3. Component
List” for a detailed description of all components. Table 2 shows the operating environment, power
specifications and dimensions of the demo board.
Table 1 R0K5R8C3MDU30BR Key Components Specifications
Item Specification
MCU R5F213MCKNNP (R8C/3MK Group)
Program ROM: 128KB Data Flash ROM: 4KB RAM: 10KB
External clock Ceramic oscillator(12MHz): CSTCE12M0GH5L-**R0 (Murata Mfg. )
USB Functions Peripheral function supporting MCU built-in USB 2.0-compliant Full-speed
Receptacle Mini B: UX60SC-MB-5ST (Hirose)
Power supply regulator MIC5353-3.3YMT (Micrel)
Table 2 R0K5R8C3MDU30BR Power Supply, Dimensions, Environment Specifications
Item Specification
Usage Environment
Conditions
Temperature: 5 to 35
Humidity level: no condensation
Surrounding gas: no corrosive gas
Operating Voltage and
Supply Source
Power supply voltage: 3.3V
Power supply source: USB VBUS (3.3V conversion via the regulator)
Power and Ground terminals are also on the rear surface of this product.
They should Not be in contact with a conductive material directly.
This product CAN NOT use external power supply from J1, J2 and J3.
Because of collision between the external power supply and the power
from USB VBUS, possibly causing damage to the external
serial device, the USB Host device, and the demo board.
External Dimensions 34mm X 12mm (excluding protrusions, cords, etc.)
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 11 of 38
Mar 21, 2012
6.2 Function Overview
Figure 3shows the functional block diagram for the demo board, followed by a brief description of each
function.
Figure 3 R0K5R8C3MDU30BR Functional Block Diagram
6.2.1 USB Peripheral
The demo board mounts a mini-B receptacle so that the MCU’s built-in USB module can be used as a
Peripheral device. The board also mounts a ceramic oscillator as the built-in USB’s external oscillating
device.
6.2.2 External Serial Communication Device Connector
The demo board has connectors (J1, J2, J3) on the front left edge and back surface for connection to
external serial communication devices with header pins. Pins drawn out to J1, J2, and J3 are UART (TxD0,
RxD0), SSU/I2C (SCS, SSI, SSO/SDA, SSCK/SCL), and power supply/GND, as shown in Figure 3. For
detailed instructions on how to attach the header pin to J3, see “7.2 Header Pin Attachment”; for details
concerning connection with the external serial communication device, see “7.3 External Serial Device
Connection.”
6.2.3 Power Supply
The demo board can be powered from USB VBUS (bus-powered).The board includes a power regulator
for converting the VBUS power (5V) to 3.3V.
Do not supply power from an external serial communications device. Doing so may cause damage due to a
collision with the VBUS power supply.
6.2.4 USB Downloader
The demo board includes a USB downloader function as a method of rewriting the user program in the
MCU built-in flash ROM area. When power is supplied to the demo board, this function automatically will
be started while the function switch pin (TP1) is connected to GND. For more details on how to use this
function, please refer to “8.2 USB Downloader Function.”
5V->3.3V
regulator
VBUS
USB MiniB
USB_VCC
VCC
R8C/3MK
40Pin QFN
D+
D-
TxD0
RxD0
VCC
Oscillator
SSCK/SCL
SSO/SDA
SSI
SCS
12MHz
External connectors
J1,J2,J3
USB downloader
Function switch pin
TP1
MODE
RESET
External connector
J2
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 12 of 38
Mar 21, 2012
7. Setting up the Demo Board
7.1 Bundled Accessories Confirmation
Please confirm that you have all bundled accessories before using this demo board. Figure 4 shows a picture of
the board and the header pin; Table 3 lists all accessories and corresponding quantities that come with the
demo board package. The header pin is for use with J3; please mount on the board as needed. The system
definition (Inf) file and the upgrade application software (mot) are provided as electronic data, and can be
downloaded from Renesas web site (for more details, please see Release Note). Please refer to “8.Operating
Instructions” to check the usage of these files.
Table 3 Bundled Accessories & Quantity
Figure 4 Circuit Board and Header Pin (for J3)
Do not supply power from an external serial communications device. Doing so may cause damage due to a
collision with the VBUS power supply.
Component Name QTY
Circuit Board (R0K5R8C3MDU30BR) 1
2.54-mm pitch, 2-row right angle
Header pin (J3)
1
Release Note (English/Japanese) 1
System definitions file (CDC_demo.inf) 1
Upgrade application software
(pcdcfw.mot)
1
Instruction Manual (this document) 1
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 13 of 38
Mar 21, 2012
7.2 Header Pin Attachment
Attach the right angle section of the bundled header pin (FFC-8LBMEP1B, Honda Tsushin Kogyo) to the
holes (J3) on the left edge of the board as shown in Figure 5. Figure 6shows an attachment example. A user-
provided header pin can also be attached to J3; the required dimensions are 2.54-mm pitch, 2-row, 8-pin
header pin.
Figure 5 J3 Header Pin Attachment Position
Figure 6 Example of Bundled Header Pin Attached to J3
7.3 External Serial Communications Device Connection
The demo board uses J1, J2, and J3 as connectors for external serial communications devices. Figure 7 and
Figure 8 show the positioning of the signal lines and power supply/GND connected through for J1, J2 and J3.
Table 4 shows the relation of the connector pin No. and the MCU functions. Refer to “Appendix 1 Circuit
Diagram” for more details about the MCU wiring.
Power and Ground terminals are also on the rear surface of this product.
They should Not be in contact with a conductive material directly.
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 14 of 38
Mar 21, 2012
Figure 7 Positioning of Signal Lines and Power Supply/GND Connected to J1/J2
Figure 8 Positioning of Signal Lines and Power Supply/GND Connected to J3
Table 4 Relation of connector pin No. and MCU functions
Terminal name J1 pin J2 pin J3 pin UART I2C SSU
GND - 1 1 GND GND GND
RxD0 - 2 2 RxD0 -
TxD0 - 3 3 TxD0 -
SSO/SDA 1 - 4 - SDA SSO
SCS 5 - 5 - - SCS
SSI 4 - 6 - - SSI
SSCK/SCL 3 - 7 - SCL SSCK
VCC 2 - 8 VCC VCC VCC
RESET - 4 - - - -
MODE - 5 - - - -
SSO/SDA VCC SSCK/SCL SSI SCS
GND
RxD0
SSO/SDA VCC
SSCK/SCL
SSI
SCS
TxD0
GND RxD0 TxD0 RESET MODE
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 15 of 38
Mar 21, 2012
8. Operating Instructions
Application software for USB-to-Serial communication conversion has been installed in the MCU flash ROM
mounted on this demo board. The serial driver at shipping is UART function. You can use USB-to-UART
conversion.
This product also implements the downloader function via USB to update application software. If the user
updates the upgrade USB-to-serial communication conversion application software released individually
(Refer to 8.3), it is possible to communicate not only the UART device but also the I2C devices or the 4-wire
bus communication device (hereinafter called SSU device) to SSU in the R8C/3MK MCU.
As shown in Figure 9, if TP1 of this product is open when power is turned on, the application runs as the USB-
to-serial communication conversion function. When TP1 is short to “GND”, the USB download function is
enabled. Refer to ”7.3 External Serial Device Connection” for the detail about the connection with the external
serial communication device.
Figure 9 Close-up of TP1 on Circuit Board
8.1 USB-to-UART Communication Conversion Function (pre-installed version)
. Application software for USB–to-UART communication conversion has been installed at shipping. Figure 10
shows the switching sequence between the USB-to-UART communication conversion function and USB
downloader function
Figure 10 USB-to-UART Communication Function / USB Downloader Function Switching Sequence
Turn on power
Confirm
TP1state
USB
downloader
f
u
n
ct
i
o
n
USB–to-UART
communication
conversion function
TP1 = GND TP1 = Open
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 16 of 38
Mar 21, 2012
The following outlines the process until communication is achieved using the terminal software on the PC. For
more details, refer to the application note titled “Renesas USB Device USB Peripheral Communications
Devices Class Driver (PDCD).”
1) Connection to USB Host (PC)
(1) Connect the demo board to the USB Host (PC) using the USB cable (A-miniB).
(System definition file (CDC_Demo.inf) is required for the initial connection.)
(2) Confirm the COM number (Windows: device manager)
2) Start up Terminal Software
(1) Enter the confirmed COM number in the terminal software.
(2) Set the communication speed
Set baud rate from 4800bps to57600bps.
(3) Set all other parameters for serial port
Set the following setting
Data length: 8 bits; parity: none; stop bit: 1 bit; flow control: none
The example of data communication with a RS232C transceiver as an external UART device is shown in
Figure 11. Figure 12 shows the example of the setting parameters for serial port on the terminal software.
UART
communication
Terminal software
Text screen
1."ABCDefg
2."12345678"
RS232C
Seriial
PORT
Terminal software
Text screen
Text Data
1. "ABCDefg
2. "12345678"
Text Data
UART0
USB
USB
1. "ABCDefg
2."12345678"
USB
communication
USB CDC
Host Device
UART
communication
This Product
Text Data
1. "ABCDefg
2. "12345678"
Text Data
RS232C
RS232C
communication PC with
RS232C serial
port
RS232C
Transceiver
UART
Text Data
1. "ABCDefg
2. "12345678"
Text Data
Figure 11 Example of Data Communication using USB-to-UART Communication Conversion
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 17 of 38
Mar 21, 2012
RXD
PC with
RS232C Serial
Port
Control Transfer
Class Request
USB
USB
USB
Communication
USB CDC
Host
RS232C
Communication
RS232C
Seriial
PORT
The serial port parameters on the
terminal software reflect UART0.
UART
Device with
UART serial
port
TXD
RS232C
Transceiver
RS232C
This Product
UART0
UART
This product does not use control
signals of CTS/RTS/DSR/DTR etc.
Figure 12 Example of setting the serial port parameters on the terminal software
8.2 USB Downloader Function
When the demo board is turned on while the USB downloader function switch pin (TP1) is grounded (GND),
the USB downloader program is started up. In this function, the user can write a Motorola S Format (mot) file
to the MCU internal flash ROM. The following outlines the sequence until the internal program has been
updated. For more details, refer to the application note titled “R8C/USB Group USB Downloader.”
1) Connection to USB Host (PC)
Connect this demo board to the USB Host (PC) using the USB cable (A-miniB).
(System definition file (CDC_Demo.inf) is required for the initial connection.)
(2) Confirm the COM number (Windows: device manager)
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 18 of 38
Mar 21, 2012
2) Start up Terminal Software
(1) Enter the confirmed COM number in the terminal software. As this function enables serial communication,
you do not need to set the communication speed, data length, etc.
(2) Nothing can be displayed immediately after startup, so you will need to display the operating menu with the
M[CR] command.
If communications are running properly, the information in Figure 13 will be displayed on the screen.
Figure 13 Terminal Software Display using M[CR] Command
3) Erase flash ROM data on the MCU
(1) Enter E[CR] command to start the flash ROM erase.
The “Erase complete” display shown in Figure 14 indicates the erase has been completed.
Figure 14 Terminal Software Display when MCU Flash ROM Data Erase is Complete
4) Write program
(1) Enter W[CR] command to send the target Motorola S Format file from the Terminal software. When the
display shown in Figure 15 appears on screen, the Write process has been completed.
Figure 15 Terminal Software Display after Program Write Completion
5) Restart program
After the program has been rewritten, the following two methods can be used to restart the program.
1) Enter the G[CR] Command
2) Remove the USB cable and power up the demo board with TP1 left open.
.
The program writing will be failure if this demo board is unplugged from PC when the program
writing is executing. Please execute the program writing processing described in
“8.2 USB Downloader Function” again, if the program writing is failure."
Renesas USB Flash Sample
Press Command
M[CR] - Menu Display(these)
E [CR] - Erase Flash ROM
W[CR] - Write User Program
G[CR] - Go User Program
Erase Flash ROM start…
Erase complete
Please send a mot file
Write complete
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 19 of 38
Mar 21, 2012
8.3 USB-to-Serial Communication Conversion Function (the upgrade version)
After this upgrade application software is installed by using the USB downloader, it is possible to connect not
only the UART device but also the I2C devices or the SSU device.
Figure 16shows the switching sequence between the USB-to-Serial communication conversion function and
USB downloader function.
Figure 16 USB–to-Serial Communication Function/USB Downloader Function Switching Sequence USB
The following outlines the process until communication is achieved using the terminal software on the PC.
1) Connection to USB Host (PC)
(1) Connect the demo board to the USB Host (PC) using the USB cable (A-miniB).
(System definition file (CDC_Demo.inf) is required for the initial connection.)
(2) Confirm the COM number (Windows: device manager)
2) Start up Terminal Software
(1) Enter the confirmed COM number in the terminal software. For the first step is selecting serial function
(UART ,SSU or I2C) , you do not need to set the communication speed, data length, etc.
(2) The text shown in Figure 17 will be displayed in terminal software.
Figure 17 Display of Selecting the Serial Device on the Terminal Software
The display shown in Figure 17 means the following.
URT Demo : USB-to-UART communication conversion
IIC Demo : USB-to-I2C communication conversion (Refer to Chapter 9 )
SSU Demo : USB-to-SSU communication conversion (Refer to Chapter 10)
3) Selecting the serial function
Do you select URT Demo ?
Do you select IIC Demo ?
Do you select SSU Demo ?
Select “UART”
USB-to-UART
communication
conversion function
Select “I2C”
Turn on Power
Confirm TP1
State
USB downloader
function
USB–to-Serial
communication
conversion function
TP1 = “GND TP1 =“Open”
USB–to-I2C
communication
conversion function
Select “SSU”
USB–to-SSU
communication
conversion function
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 20 of 38
Mar 21, 2012
(1)You input the following command from the terminal software, and select the serial function.
“U” Command : USB-to-UART communication conversion
“I” Command : USB-to-I2C communication conversion
“S” Command : USB-to-SSU communication conversion
When the display shows “OK You select XXX Demo!”, the demo selection is done.
Figure 18 shows selecting the UART demo, Figure 19 shows selecting the I2C demo and Figure 20 shows
selecting the SSU demo.
Figure 18 Display of Selecting USB-to-UART Communication Conversion
Figure 19 Display of Selecting USB-to-I2C Communication Conversion
Figure 20 Display of Selecting USB-to-SSU Communication Conversion
4) Outline of USB-to-UART communication conversion
(1) Enter the COM number in the terminal software.
(2) Set the communication speed
Set baud rate from 600bps to115200bps
(3) Set all other parameters for serial port
Set the following for the program in the demo board.
Data length: 8 bits; parity: none; stop bit: 1 bit; flow control: none
In the case of sending large-volume data from USB Host at low communication speed, it is possible to
overflow the USB receive block in this product. Avoiding this issue, you may set the flow control in the
application software of USB Host side to pause and restart USB communication. When sending large-volume
data at the following speed, you enable the flow control and set the transmit delay parameter in the application
software of USB Host side.
2400bps, 1200bps Flow Control: “Hardware”, Transmit delay parameter: more than 1ms/char
600bps Flow Control: “Hardware”, Transmit delay parameters: more than 20ms/char and
more than 20ms/line
The example of data communication is shown Figure 11. Figure 12shows the example of the setting
parameters for serial port on the terminal software.
OK You select URT Demo !
OK You select IIC Demo !
OK You select SSU Demo !
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 21 of 38
Mar 21, 2012
5) Outline of USB-to-I2C communication conversion
(1) Enter the confirmed COM number in the terminal software. As this function does not control UART
function, you do not need to set the communication speed, data length, etc.
(2) This demo board can communicate the external I2C devices at 400kHz clock,
(3)The parameters in the I2C communication are the following.
This product can operate only as I2C master device (You can communicate with I2C slave devices)
Data length: 9bit (including acknowledge bit)
Wait insertion: No wait states (Data and the acknowledge bit are transferred consecutively).
(4)This product can communicate with the external I2C devices according the I2C demo communication
protocol.
Figure 21 shows the example of the data communication with the LCD module and the temperature sensor as
the external I2C devices.
1. Write Command
"Renesas
2. Read Command
"30C"
I2C Communication
Terminal software
Text screen I2C Write Command
Binary data
1. "Renesas
2. "30C"
I2C Read
Command
Binary data
I2C
USB
USB
USB Communication
USB CDC
Host
I2C Commnication
This Product
I2C
I2C protocol
1. "Renesas
2. "30C"
I2C protocol
Renesas
Figure 21 Example of Data Communication using USB-to-I2C Communication Conversion
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 22 of 38
Mar 21, 2012
6) Outline of USB-to-SSU communication conversion
(1) Enter the confirmed COM number in the terminal software. As this function does not control UART
function, you do not need to set the communication speed, data length, etc.
(2) This demo board can communicate the external SSU device at 250kHz clock.
(3)The parameters in the SSU communication are the following.
This product can operate only as SSU master device (You can communicate with SSU slave device)
Data length: 8bit
Data transfer direction: MSB-first
SSCK clock phase: Change data at odd edge (Download data at even edge)
(4)This product can communicate with the external SSU device according the SSU demo communication
protocol.
Figure 22shows the example of the data communication with the EEPROM as the external SSU devices.
1. Write Command
"Renesas
2. Read Cpmmand
"12345"
SSU
Communication
Terminal software
Text screen
SSU Write
Command
Binary data
1. "Renesas
2. "12345"
SSU Read
Command
Binary data
SSU
USB
USB
USB
Communication
CDC Host
SSU
Communication
This Product
SSU
SSU protocol
1. "Renesas
2. "12345"
SSU protocol
EEPROM
Figure 22 Example of Data Communication using USB-to-SSU Communication Conversion
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 23 of 38
Mar 21, 2012
9. I2C demo communication protocol
9.1 USB Packet Specification
9.1.1 Structure of Command Packet
The command packet for controlling I2C device consists of five bytes. Figure 23 shows the structure of
command packet.
Control
0x01
DevAdr
0x02
RegAdr
0x03
Len(Lower)
0x64
Len(Upper)
0x00
O
U
T
A
C
K
The structure of Command Packet
Figure 23 Structure of Command Packet
Each field
1) Control : operation type (1 byte in binary format)
0x00: Write Access
0x01: Read Access
For the value other than the above, this product responses the error code (0xFFyy : yy is control field
in the error condition) as a command error.
2) DevAdr: Device address of I2C devices (1 byte in binary format)
0x00-0x7F
This field consists of 7bits in binary format, this product does Not perform an error judgment.
3) RegAdr: Register / Control / Memory Address of I2C devices (1bytes in binary format)
0x00-0xFF
This field consists of 7bits in binary format, and this product does not perform an error judgment.
The meaning of this field depends on the connected I2C device.
4) Len : Length of Data Packet (2bytes in binary format)
0x0000-0xFFFF
This field consists of 2 bytes in binary format. And this product does not perform an error judgment.
The byte order of this field is little endian (the first is lower byte, and the second is upper byte)
When you enter 0x0000 to this field, you can access 65536 bytes continuously.
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 24 of 38
Mar 21, 2012
9.1.2 Structure of Data Packet
The data length is n bytes according to the connected I2C device. The maximum of the data length is the
value of the Len field of the command packet. When the data length is more than 64bytes, the data is divided
into multiple data packets. Figure 24 shows the structure of the data packet.
Data(D001)
0x01 ・・・・・・・・
A
C
K
IN
The structure of Data Packet
Data(D002)
0x02
Data(D003)
0x03
Data(D001)
0x01 ・・・・・・・・
A
C
K
O
U
T
Data(D002)
0x02
Data(D003)
0x03
or
Data(D064)
0x40
Figure 24 Structure of Data Packet
Data : Data body ( n bytes in binary format)
The range of n is from 1 to 65536 bytes
The field consists of n bytes in binary format, and this product does not perform an error judgment
In the case of Write Access:
This product can continue receiving data from USB host until the USB data length is equal to Len
field of packet command or USB short packet is received.
If the total length of command packet and data packet is less or equal 64bytes, you can send a
combined packet. (The detail is refer to 9.1.3)
In the case of Read Access:
This product keeps on sending data to USB Host until the USB data length is equal to Len field of
packet command.
9.1.3 Structure of Combined Packet
If the data length is less or equal 59bytes, you can combine command packet and data packet. Figure 25
shows the structure of combined packet.
Control
0x01
DevAdr
0x02
RegAdr
0x03
Len(lower)
0x2
Len(upper)
0x00
O
U
T
A
C
K
Data(D001)
0x01
The Structure of Combined Packet
Data(D002)
0x02
Command part
Data part
Figure 25 Structure of Combined Packet
9.1.4 Other rules
1) Error : Response of error condition
0xFEFFCommand Packet Error
0xFFyy : Command Error (yy is the control field in error condition )
2) Bus mastership during the data writing
The I2C bus holds low level between each packet. This product does not release the mastership by the
end of writing all data.
3) The length of the command packet
When the length of command packet is less than 5bytes, this product judges an error packet and sends
an error reply.
When the length of command packet is more than 5bytes, this product judges a combined packet.
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 25 of 38
Mar 21, 2012
9.2 Specification of USB -to - I2C Protocol Conversion
9.2.1 Protocol conversion of Read Access
When you read data from I2C devices, you enter the “Read Access” command to the virtual COM port,
and receive data packet from the virtual COM port. Figure 26 shows the protocol conversion of the Read
Access.
USB Packet
Command
0x02
DevAdr
0x02
RegAdr
0x03
Len(lower)
0x02
Len(upper)
0x00
Data(D001)
0x01
I2CPacket
Register
Address
0x03
Data(D001)
0x01
S
P
Protocol Conversion of Read Access (Receiving 100 bytes data )
(ST=Start/SP=Stop/W=Write/R=Read)
First Packet:
Send Command
Packet
Second Packet:
Receive Data Packet
(64bytes)
First Packet:
Send Command
Packet
Second Packet:
Receive Data Packet
S
T
Device Address
b0000010 W
S
T
Device Address
b0000010 R・・・・・・・・ Data(D064)
0x40
・・・・・・・・ Data(D064)
0x40
Data(D065)
0x41
Data(D100)
0x64
・・・・・・・・
S
P
Data(D065)
0x41
Data(D100)
0x64
・・・・・・・・
Third Packet:
Receive Data Packet
(36bytes)
Figure 26 Protocol Conversion of Read Access
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 26 of 38
Mar 21, 2012
9.2.2 Protocol Conversion of Write Access
When you write data to the I2C devices, you send the “Write Access” command packet to the virtual
COM port, and send data packet continuously. Figure 27 shows the protocol conversion of Write Access.
If the data packet length is short (less than 59bytes), you can combined command packet and data packet
to “combined packet”.
USB Packet
Register Address
0x03
S
T
Data(D001)
0x01
S
P
Protocol Conversion of Write Access (Writing 100 Bytes data)
First Packet:
Send Command
Packet
Second Packet:
Send Data Packet (64 bytes)
Device Address
b0000010 W・・・・・・・・ Data(D064)
0x40
Data(D065)
0x41
Data(D100)
0x64
・・・・・・・・
Third Packet:
Send Data Packet (36
bytes)
Control
0x00
DevAdr
0x02
RegAdr
0x03
Len(lower)
0x64
Len(upper)
0x00
Data(D001)
0x01 ・・・・・・・・ Data(D064)
0x40
Data(D065)
0x41
Data(D100)
0x64
・・・・・・・・
O
U
T
A
C
K
A
C
K
A
C
K
O
U
T
O
U
T
USB Packet
I2C Packet
Register Address
0x03
S
T
Data (D001)
0x01
S
P
Protocol Conversion of Write Access (Using Combined Packet)
(ST=Start/SP=Stop/W=Write)
First Packet:
Send Combined
Packet
First Packet:
Device Address +
Register Address
+
Write Data
Device Address
b0000010 WData (D002)
0x40
Control
0x00
DevAdr
0x02
RegAdr
0x03
Len(lower)
0x02
Len(upper)
0x00
Data(D001)
0x01
Data(D002)
0x40
O
U
T
A
C
K
I2C Packet
First Packet:
Device Address +
Register Address +
Write Data (100bytes)
(Including I2C Bus
Hold)
Figure 27 Protocol Conversion of Write Access
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 27 of 38
Mar 21, 2012
9.3 Example of Command Script
Figure 28 shows the example of memory read and write access between this product and the EEPROM
made by Renesas Electronics
Examples of Read Access / Write Access (I2C Device :R1EX24008ASAS0A)
; Select I2C Demo
send ‘I
pause 1
; Write Access (USB Command Packet and USB Data Packet separately)
; Write '1234567890abcdef' to Register Address “0x00”.
send $00 $50 $00 $10 $00
send $31 $32 $33 $34 $35 $36 $37 $38 $39 $30 'abcdef'
; Write Access (Combined Packet)
; Write 'ghijklmnopqrstuv' to Register Address “0x10”.
send $00 $50 $10 $10 $00 'ghijklmnopqrstuv'
; Read Access
; Read 16 bytes data from Register Address “0x00”
send $01 $50 $00 $10 $00
pause 1
; Read Access
; Read 16 bytes data from Register Address “0x10”.
send $01 $50 $10 $10 $00
pause 1
;End
beep
Figure 28 Example of Read / Write Command
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 28 of 38
Mar 21, 2012
10. SSU demo communication protocol
10.1 USB Packet Specification
10.1.1 Structure of Command Packet
The structure of Command Packet for SSU demo has the following two types.
1) Control Command consisted of 5 bytes
2) Memory Read/Write Command consisted of 7bytes
Figure 29 shows the Control Command consisted of 5 bytes
Control
0x00
Dummy
0x00
Instruction
0x03
Len(Lower)
0x64
Len(Upper)
0x00
The Command Packet of 5-byte composition
A
C
K
O
U
T
Figure 29 the Control Command consisted of 5bytes
Figure 30 shows the Memory Read/Write Command consisted of 7 bytes
Control
0x20
Dummy
0x00
Instruction
0x03
Address(Lower)
0x64
Address(Upper)
0x00
Memory Read/Write Command consisted of 7 bytes
Len(Lower)
0x64
Len(Upper)
0x00
O
U
T
A
C
K
Figure 30 Memory Read/Write Command consisted of 7 bytes
The following shows the content of each field in the command packet.
1) Controloperation type (1byte in binary format)
0x00: Write Access (Control command consisted of 5 bytes)
0x01: Read Access (Control command consisted of 5 bytes)
0x20: Memory Write (Memory Write command consisted of 7 bytes)
0x21: Memory Read (Memory Read command consisted of 7 bytes)
0x30: Instruction Write (Control command consisted of 5 bytes)
For the value other than the above, this product responses the error code (0xFFyy : yy is control field
in the error condition) as a command error.
2) DummyReserved (1byte in binary format)
Set to 0x00 for Reservation
3) InstructionInstruction of SSU device (1byte in binary format)
0x00-0x7F
This field consists of 1 byte in binary format. And this product does not perform an error judgment.
4) AddressMemory Read/Write Address (2bytes in binary format)
0x0000-0xFFFF
This field consists of 2 bytes in binary format. And this product does not perform an error judgment.
The byte order of this field is little endian (the first is lower byte, and the second is upper byte)
This field only exists in the Memory Read/Write command consisted of 7 bytes.
5) LenLength of Data Packet (2bytes in binary format)
0x0000-0xFFFF
This field consists of 2 bytes in binary format. And this product does not perform an error judgment.
The byte order of this field is little endian (the first is lower byte, and the second is upper byte)
When you enter 0x0000 to this field, you can access 65536 bytes continuously.
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 29 of 38
Mar 21, 2012
10.1.2 The Structure of Data Packet
The data length is n bytes according to the connected SSU device. The maximum of the data length is the
value of the Len field of the command packet. When the data length is more than 64bytes, the data is divided
into multiple data packets. Figure 31 shows the structure of Data packet.
Data(D001)
0x01 ・・・・・・・・
The structure of Data Packet
Data(D002)
0x02
Data(D003)
0x03
Data(D001)
0x01 ・・・・・・・・
Data(D002)
0x02
Data(D003)
0x03
or
Data(D064)
0x40
O
U
T
I
N
A
C
K
A
C
K
Figure 31 The structure of Data Packet
DataData body ( n bytes in binary format)
The range of n is from 1 to 65536 bytes.
The field consists of n bytes in binary format, and this product does not perform an error judgment.
In the case of Write Access:
This product can continue receiving data from USB host until the USB data length is equal to Len
field of packet command or USB short packet is received.
If the total length of command packet and data packet is less or equal 64bytes, you can send a
combined packet. (The detail is refer to 10.1.3)
In the case of Read Access:
This product keeps on sending data to USB Host until the USB data length is equal to Len field of
packet command.
10.1.3 Structure of Combined Packet
If the data length is less or equal 59bytes, you can combine command packet and data packet.
Figure 32shows the structure of combined packet.
Control
0x00
Dummy
0x00
Instruction
0x03
Len(Lower)
0x2
Len(Upper)
0x00
Data(D001)
0x01
The structure of Combined Packet
Data(D002)
0x02
Command part
Data part
O
U
T
A
C
K
Figure 32 The structure of Combined Packet
10.1.4 Other rules
1) Error : Response of error condition
0xFEFFCommand Packet Error
0xFFyy : Command Error (yy is the control field in error condition )
2) Bus mastership during the data writing
The SCS signal holds low level between each packet. This product does not release the mastership by
the end of writing all data.
3) The length of the command packet
When the length of control command packet is less than 5bytes, this product judges an error packet
and sends an error reply.
When the length of Write Access command packet is more than 5bytes, this product judges the packet
as a combined packet.
When the length of Memory Read/Write command packet is other than 7 bytes, this product judges an
error packet and sends an error reply.
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 30 of 38
Mar 21, 2012
10.2 Specification of USB-to-SSU Protocol Conversion
10.2.1 Protocol conversion of Read Access
When you read data from SSU device, you enter the “Read Access” command to the virtual COM port, and
receive data packet from the virtual COM port. Figure 26shows the protocol conversion of the Read Access.
USB packet
Control
0x01
Dummy
0x00
Instruction
0x??
Len(Lower)
0x64
Len(Upper)
0x00
Data(D001)
0x01
SSU packet
Instruction
0x??
Data(D001)
0x01
Protocol conversion of Read Access(Receiving 100 bytes data)
First Packet:
Send Command
Packet
Second Packet:
Receive Data Packet
(64bytes)
Command +
Data Packet ・・・・・・・・ Data(D064)
0x40
・・・・・・・・ Data(D064)
0x40
Data(D065)
0x41
Data(D100)
0x64
・・・・・・・・
Data(D065)
0x41
Data(D100)
0x64
・・・・・・・・
Third Packet:
Receive Data Packet
(36bytes)
SSU Transmission
SSU reception
A
C
K
A
C
K
A
C
K
O
U
T
I
N
I
N
Figure 33 Protocol Conversion of Read Access
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 31 of 38
Mar 21, 2012
10.2.2 Protocol Conversion of Write Access
When you write data to the SSU device, you send the “Write Access” command packet to the virtual COM
port, and send data packet continuously. Figure 34 shows the protocol conversion of Write Access. If the
data packet length is short (less than 59bytes), you can combined command packet and data packet to
“combined packet”.
USB Packet
Control
0x00
Dummy
0x00
Instruction
0x??
Len(Lower)
0x64
Len(Upper)
0x00
Data(D001)
0x01
SSU Packet Instruction
0x??
Data(D001)
0x01
Protocol Conversion of Write Access (Transmit 100 Bytes Data)
First Packet:
Send Command Packet
Second Packet:
Send Data Packet
(64 bytes)
First Packet:
Send Command + Data
・・・・・・・・ Data(D064)
0x40
・・・・・・・・ Data(D064)
0x40
Data(D065)
0x41
Data(D100)
0x64
・・・・・・・・
Data(D065)
0x41
Data(D100)
0x64
・・・・・・・・
Third Packet:
Send Data Packet
(36bytes)
SSU transmission
SSU Reception
USB Packet
SSU Packet
Data(D001)
0x01
Protocol Conversion of Write Access( Using Combined Packet)
First Packet:
Send Combined Packet
First Packet:
Send Command + Data
Data(D002)
0x40
Control
0x00
Dummy
0x00
Instruction
0x??
Len(Lower)
0x02
Len(Upper)
0x00
Data(D001)
0x01
Data(D002)
0x40
O
U
T
A
C
K
Instruction
0x??
O
U
T
O
U
T
O
U
T
A
C
K
A
C
K
A
C
K
Figure 34 Protocol Conversion of Write Access
10.2.3 Protocol Conversion of Memory Read
When you indicate address and read data from SSU device, you enter the “Memory Read” command to the
virtual COM port, and receive data packet from the virtual COM port. Figure 35 shows the protocol
conversion of the Memory Read.
USB Packet
Control
0x21
Dummy
0x00
Instruction
0x03
Len(Lower)
0x02
Len(Upper)
0x00
Data(D001)
0x01
SSU Packet
Instruction
0x03
Data(D001)
0x01
Protocol Conversion of Memory Read(Receive 2 bytes Data)
First Packet:
Send Command
Packet
Second Packet:
Receive Data Packet
First Packet:
Send Command +
Receive Data
Data(D002)
0x02
Data(D002)
0x02
SSU Transimssion
SSU Reception
Address(Lower)
0x00
Address(Upper)
0x00
Address(Lower)
0x00
Address(Upper)
0x00
O
U
T
I
N
A
C
K
A
C
K
Figure 35 Protocol Conversion of Memory Read Memory
10.2.4 Protocol Conversion of memory Write
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 32 of 38
Mar 21, 2012
When you indicate address and write data to the SSU device, you send the “Write Access” command
packet to the virtual COM port, and send data packet continuously. Figure 36 shows the protocol
conversion of Write Access. If the data packet length is short (less than 59bytes), you can combined
command packet and data packet to “combined packet”.
USB Packet
Control
0x20
Dummy
0x00
Instruction
0x02
Len(Lower)
0x02
Len(Upper)
0x00
Data(D001)
0x01
SSU Packet
Instruction
0x02
Data(D001)
0x01
Protocol Conversion of Memory Write(Send 2 Bytes Data)
First Packet:
Send Command Packet
Second Packet:
Send Data Packet (2bytes)
First Packet:
Send Command and Data
Data(D002)
0x40
Data(D002)
0x40
SSU Transmission
SSU Reception
Address(Lower)
0x00
Address(Upper)
0x00
Address(Lower)
0x00
Address(Upper)
0x00
A
C
K
A
C
K
O
U
T
O
U
T
Figure 36 Protocol Conversion of Memory Write
10.2.5 Protocol Conversion of Instruction Write
When you write 1 byte data (Instruction) to the SSU device, you send the “Instruction Write” command
packet to the virtual COM port. Figure 37 shows the protocol conversion of Instruction Write
USB Packet
Control
0x30
Dummy
0x00
Instruction
0x??
Len(Lower)
0x00
Len(Upper)
0x00
SSU Packet
Instruction
0x??
Protocol Conversion of Instruction Write
First Packet:
Send Command Packet
Send Command (1byte) SSU Tranmission
O
U
T
A
C
K
Figure 37 Protocol Conversion of Instruction Write
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 33 of 38
Mar 21, 2012
10.3 The Example of Command Script
Figure 38 shows the example of memory read and Memory write between this product and the 8Kbit
EEPROM made by Renesas Electronics
Example of Memory Read / Memory Write (SSU Device: R1EX25008ASA00A)
; Select SSU Demo
send ‘S’
pause 1
; Write Enable(Instruction Write command)
send $30 $00 $06 $00 $00
; Memory Write
; Write '1234567890abcdef' to Memory Address 0x00.
send $20 $00 $02 $10 $00 $00 $00
send '1234567890abcdef'
; Write Enable(Instruction Write Command)
send $30 $00 $06 $00 $00
; Memory Write
; Write 'ghijklmnopqrstuv' to Memory Address 0x10.
send $20 $00 $02 $10 $00 $10 $00
send 'ghijklmnopqrstuv'
; Memory Read
; Read 16 bytes data from Memory Address 0x00.
send $21 $00 $03 $10 $00 $00 $00
pause 1
; Memory Read
; Read 16 bytes data from Memory Address.
send $21 $00 $03 $10 $00 $10 $00
pause 1
;End
beep
Figure 38 Example of Command Script
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 34 of 38
Mar 21, 2012
11. Circuit Diagram
See attached document. (Appendix 1)
12. Parts Layout Diagram
See attached document. (Appendix 2)
13. Parts List
See attached document. (Appendix 3)
R8C/3MK Group USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00 Page 35 of 38
Mar 21, 2012
Website and Support
Renesas Electronics Website
http://www.renesas.com/
USB Device Page
http://www.renesas.com/en/usb
Inquiries
http://www.renesas.com/contact/
All trademarks and registered trademarks are the property of their respective owners.
© 2012 Renesas Electronics Corporation and Renesas Solutions Corp. All rights reserved.
5
5
4
4
3
3
2
2
1
1
D D
C C
B B
A A
USB_DP
SSO_SDA
SSCK_SCL
SCS
SSI
RESET
MODE
RXD
TXD
USB_VBUS
TXD
RXD
mode_sel
USB_DM
RXDTXD
TXDRXD
SCSSSISSCKSSO
TXD
RXD
SSO SSCK
SSI
SCS
VCC
VCC
VCC
VCC
VCC
VCC VBUS
VBUS
VCC
VCC
Title
Size Document Number Rev
Date: Sheet of
R0K5R8C3MDU30BR
11
D-R0K5R8C3MDK3UBR_C
Title
Size Document Number Rev
Date: Sheet of
R0K5R8C3MDU30BR
11
D-R0K5R8C3MDK3UBR_C
Title
Size Document Number Rev
Date: Sheet of
R0K5R8C3MDU30BR
11
D-R0K5R8C3MDK3UBR_C
S
S
O
/
S
D
AS
C
S
S
S
C
K
/
S
C
LS
S
I
R
E
S
E
T
M
O
D
E
V
C
C
G
N
DT
X
D
R
X
D
Appendix 1 Circuit Diagram
CN1
Mini-B
CN1
Mini-B
Vbus
1D-
2D+
3
GND
5FRAME1
6
ID
4
FRAME2
7FRAME3
8FRAME4
9
R3
330
R3
330
12
J2 CON5
J2 CON5
1
2
3
4
5
R6 27R6 27
R14
4.7k
R14
4.7k
C31.0u C31.0u
12
R5 27R5 27
J3
2.54mm 2x4Header
J3
2.54mm 2x4Header
1 5
2 6
3 7
4 8
R8
100k
R8
100k
C4
1.0u
C4
1.0u
12
LED1
SML-310MT(GREEN)
LED1
SML-310MT(GREEN)
R12
4.7k
R12
4.7k
J1
CON5
J1
CON5
1
2
3
4
5
C60.1u
C60.1u
12
R4
1.5K
R4
1.5K
R9
0
R9
0
C70.1u
C70.1u
12
X1
CERAMIC
X1
CERAMIC
1 3
2
R13
4.7k
R13
4.7k R10 100k
R10 100k
C20.1u
C20.1u
12
U2 MIC5353-3.3YMTU2 MIC5353-3.3YMT
VOUT
4
NC
5
BYP
6EN 1
GND 2
VIN 3
PAD
7
TP1TP1
1
C1
1.0u
C1
1.0u
12
C5
0.1u
C5
0.1u
12
R7 100
R7 100
R11
4.7k
R11
4.7k
U1
R8C/ 3 MK Grou p MCU
U1
R8C/ 3 MK Grou p MCU
P07/AN0/TRCIOC
33
P04/AN3/TRCIOB
34
P03/AN4/CLK1/TRCIOB
35
P02/AN5/RXD1/TRCIOA/TRCTRG
36
P01/AN6/TXD1/TRCIOA/TRCTRG
37
P00/AN7/TRCIOA/TRCTRG
38
P30/TRAO
2
VREF
3
MODE
4
RESET
5
P47/XOUT
6
VSS
7
P35/SCL/SSCK/TRCIOD 11
P34/TRCIOC/SSI/IVREF3 12
P33/TRCCLK/SCS/CTS2/RTS2/IVCMP3 13
P77/USB_VBUSEN 14
P76/USB_OVRCURA 15
USB_VBUS 16
USB_DM 17
USB_DP 18
USB_VCC 19
USB_DPUPE 20
P67/INT3/TRCIOD 21
P66/INT2/TXD2/SDA2 22
P65/INT4/CLK2/CLK1 23
P45/INT0/RXD2/SCL2/ADTRG 24
P17/INT1/TRAIO/IVCMP1 25
P16/CLK0/IVREF1 26
P15/RXD0/TRAIO/INT1 27
P14/TXD0/TRCCLK 28
P13/KI3/AN11/TRBO/TRCIOC 29
P12/KI2/AN10/TRCIOB 30
P11/KI1/AN9/TRCIOA/TRCTRG
31
P83/RXD3
39
P82/TXD3
40
P81/CLK3
1
VCC
9
P46/XIN
8
P37/SSO/TRAO/SDA
10
P10/KI0/AN8/TRCIOD
32
PAD
41
Appendix2: Parts Layout Diagram
1. Front Surface
2. Rear Surface
Appendix3: Parts List
Title R0K5R8C3MDU30BR Parts List
Component Name Component Specification
No.
Type Symbol on Board Product Number
(specification) Manufacture Mount/
unmount
Qty/set Notes
1 CPU U1 R5F213MCKNNP Renesas Electronics 1 6x6mm 40pin QFN
2 Regulator U2 MIC5353-3.3YMT MICREL 1 3.3V 500mA
3 USB Mini B Socket CN1 UX60SC-MB-5ST Hirose 1
4 LED LED1 SML-310MT ROHM 1 Green
5 Oscillator X1 CSTCE12M0GH5L-**R0 Murata 1 12MHz
6 Header Pin J1,J2 HQS-2-8-5P Mac8 unmount 0
7 Header Pin J3 FFC-8LBMEP1B HONDA unmount 0
8 Chip Monolithic Ceramic Capacitor C1,C3,C4 C1005X5R1C105K TDK 3 1.0uF 16V
9 Chip Monolithic Ceramic Capacitor C2,C5,C6 GRM155B11A104KA01D Murata 3 0.1uF 16V
10 Chip Monolithic Ceramic Capacitor C7 GRM155B11A104KA01D Murata unmount 0 0.1uF 16V
11 Thick Film Resistor R3 MCR01MZPJ331 ROHM 1 330
12 Thick Film Resistor R4 MCR01MZPJ152 ROHM 1 1.5k
13 Thick Film Resistor R5,R6 MCR01MZPJ270 ROHM 2 27
14 Thick Film Resistor R7 MCR01MZPF1000 ROHM 1 100
15 Thick Film Resistor R8,R10 MCR01MZPF1003 ROHM 2 100k
16 Thick Film Resistor R9 MCR03EZPJ000 ROHM 1 0
17 Thick Film Resistor R11,R12,R13,R14 MCR01MZPJ472 ROHM 4 4.7k
18 PCB - R0K5R8C3MDU30BR SANYO KOGYO
1
*
A-1
Revision Record
Description
Rev.
Date Page Summary
1.00 Mar 21.12 - First edition issued
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 manual, refer to the relevant sections of the manual. If the descriptions under General
Precautions in the Handling of MPU/MCU Products and in the body of the manual differ from each other, the
description in the body of the manual takes precedence.
1. Handling of Unused Pins
Handle unused pins in accord with the directions given under Handling of Unused Pins in the manual.
The input pins of CMOS products are generally in the high-impedance state. In operation with an
unused pin in the open-circuit state, extra electromagnetic noise is induced in the vicinity of LSI, an
associated shoot-through current flows internally, and malfunctions occur due to the false
recognition of the pin state as an input signal become possible. Unused pins should be handled as
described under Handling of Unused Pins in the manual.
2. Processing at Power-on
The state of the product is undefined at the moment when power is supplied.
The states of internal circuits in the LSI are indeterminate and the states of register settings and
pins are undefined at the moment when power is supplied.
In a finished product where the reset signal is applied to the external reset pin, the states of pins
are not guaranteed from the moment when power is supplied until the reset process is completed.
In a similar way, the states of pins in a product that is reset by an on-chip power-on reset function
are not guaranteed from the moment when power is supplied until the power reaches the level at
which resetting has been specified.
3. Prohibition of Access to Reserved Addresses
Access to reserved addresses is prohibited.
The reserved addresses are provided for the possible future expansion of functions. Do not access
these addresses; the correct operation of LSI is not guaranteed if they are accessed.
4. Clock Signals
After applying a reset, only release the reset line after the operating clock signal has become stable.
When switching the clock signal during program execution, wait until the target clock signal has
stabilized.
When the clock signal is generated with an external resonator (or from an external oscillator)
during a reset, ensure that the reset line is only released after full stabilization of the clock signal.
Moreover, when switching to a clock signal produced with an external resonator (or by an external
oscillator) while program execution is in progress, wait until the target clock signal is stable.
5. Differences between Products
Before changing from one product to another, i.e. to one with a different type number, confirm that the
change will not lead to problems.
The characteristics of MPU/MCU in the same group but having different type numbers may differ
because of the differences in internal memory capacity and layout pattern. When changing to
products of different type numbers, implement a system-evaluation test for each of the products.
Notice
1. All information included in this document is current as of the date this document is issued. Such information, however, is subject to change without any prior notice. Before purchasing or using any Renesas
Electronics products listed herein, please confirm the latest product information with a Renesas Electronics sales office. Also, please pay regular and careful attention to additional and different information to
be disclosed by Renesas Electronics such as that disclosed through our website.
2. Renesas Electronics does not assume any liability for infringement of patents, copyrights, or other intellectual property rights of third parties by or arising from the use of Renesas Electronics products or
technical information described in this document. No license, express, implied or otherwise, is granted hereby under any patents, copyrights or other intellectual property rights of Renesas Electronics or
others.
3. You should not alter, modify, copy, or otherwise misappropriate any Renesas Electronics product, whether in whole or in part.
4. Descriptions of circuits, software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples. You are fully responsible for
the incorporation of these circuits, software, and information in the design of your equipment. Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from the
use of these circuits, software, or information.
5. When exporting the products or technology described in this document, you should comply with the applicable export control laws and regulations and follow the procedures required by such laws and
regulations. You should not use Renesas Electronics products or the technology described in this document for any purpose relating to military applications or use by the military, including but not limited to
the development of weapons of mass destruction. Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose manufacture, use, or sale is
prohibited under any applicable domestic or foreign laws or regulations.
6. Renesas Electronics has used reasonable care in preparing the information included in this document, but Renesas Electronics does not warrant that such information is error free. Renesas Electronics
assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein.
7. Renesas Electronics products are classified according to the following three quality grades: "Standard", "High Quality", and "Specific". The recommended applications for each Renesas Electronics product
depends on the product's quality grade, as indicated below. You must check the quality grade of each Renesas Electronics product before using it in a particular application. You may not use any Renesas
Electronics product for any application categorized as "Specific" without the prior written consent of Renesas Electronics. Further, you may not use any Renesas Electronics product for any application for
which it is not intended without the prior written consent of 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 application categorized as "Specific" or for which the product is not intended where you have failed to obtain the prior written consent of Renesas Electronics.
The quality grade of each Renesas Electronics product is "Standard" unless otherwise expressly specified in a Renesas Electronics data sheets or data books, etc.
"Standard": Computers; office equipment; communications equipment; test and measurement equipment; audio and visual equipment; home electronic appliances; machine tools;
personal electronic equipment; and industrial robots.
"High Quality": Transportation equipment (automobiles, trains, ships, etc.); traffic control systems; anti-disaster systems; anti-crime systems; safety equipment; and medical equipment not specifically
designed for life support.
"Specific": Aircraft; aerospace equipment; submersible repeaters; nuclear reactor control systems; medical equipment or systems for life support (e.g. artificial life support devices or systems), surgical
implantations, or healthcare intervention (e.g. excision, etc.), and any other applications or purposes that pose a direct threat to human life.
8. You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics, especially with respect to the maximum rating, operating supply voltage
range, movement power voltage range, heat radiation characteristics, installation and other product characteristics. Renesas Electronics shall have no liability for malfunctions or damages arising out of the
use of Renesas Electronics products beyond such specified ranges.
9. Although Renesas Electronics endeavors to improve the quality and reliability of its products, semiconductor products have specific characteristics such as the occurrence of failure at a certain rate and
malfunctions under certain use conditions. Further, Renesas Electronics products are not subject to radiation resistance design. Please be sure to implement safety measures to guard them against the
possibility of physical injury, and injury or damage caused by fire in the event of the failure of a Renesas Electronics product, such as safety design for hardware and software including but not limited to
redundancy, fire control and malfunction prevention, appropriate treatment for aging degradation or any other appropriate measures. Because the evaluation of microcomputer software alone is very difficult,
please evaluate the safety of the final products or system manufactured by you.
10. Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product. Please use Renesas Electronics
products in compliance with all applicable laws and regulations that regulate the inclusion or use of controlled substances, including without limitation, the EU RoHS Directive. Renesas Electronics assumes
no liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations.
11. This document may not be reproduced or duplicated, in any form, in whole or in part, without prior written consent of Renesas Electronics.
12. Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas Electronics products, or if you have any other inquiries.
(Note 1) "Renesas Electronics" as used in this document means Renesas Electronics Corporation and also includes its majority-owned subsidiaries.
(Note 2) "Renesas Electronics product(s)" means any product developed or manufactured by or for Renesas Electronics.
http://www.renesas.com
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
Tel: +1-905-898-5441, Fax: +1-905-898-3220
Renesas Electronics Europe Limited
Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, U.K
Tel: +44-1628-585-100, Fax: +44-1628-585-900
Renesas Electronics Europe GmbH
Arcadiastrasse 10, 40472 Düsseldorf, Germany
Tel: +49-211-6503-0, Fax: +49-211-6503-1327
Renesas Electronics (China) Co., Ltd.
7th Floor, Quantum Plaza, No.27 ZhiChunLu Haidian District, Beijing 100083, P.R.China
Tel: +86-10-8235-1155, Fax: +86-10-8235-7679
Renesas Electronics (Shanghai) Co., Ltd.
Unit 204, 205, AZIA Center, No.1233 Lujiazui Ring Rd., Pudong District, Shanghai 200120, China
Tel: +86-21-5877-1818, Fax: +86-21-6887-7858 / -7898
Renesas Electronics Hong Kong Limited
Unit 1601-1613, 16/F., Tower 2, Grand Century Place, 193 Prince Edward Road West, Mongkok, Kowloon, Hong Kong
Tel: +852-2886-9318, Fax: +852 2886-9022/9044
Renesas Electronics Taiwan Co., Ltd.
7F, No. 363 Fu Shing North Road Taipei, Taiwan, R.O.C.
Tel: +886-2-8175-9600, Fax: +886 2-8175-9670
Renesas Electronics Singapore Pte. Ltd.
1 harbourFront Avenue, #06-10, keppel Bay Tower, Singapore 098632
Tel: +65-6213-0200, Fax: +65-6278-8001
Renesas Electronics Malaysia Sdn.Bhd.
Unit 906, Block B, Menara Amcorp, Amcorp Trade Centre, No. 18, Jln Persiaran Barat, 46050 Petaling Jaya, Selangor Darul Ehsan, Malaysia
Tel: +60-3-7955-9390, Fax: +60-3-7955-9510
Renesas Electronics Korea Co., Ltd.
11F., Samik Lavied' or Bldg., 720-2 Yeoksam-Dong, Kangnam-Ku, Seoul 135-080, Korea
Tel: +82-2-558-3737, Fax: +82-2-558-5141
SALES OFFICES
© 2012 Renesas Electronics Corporation and Renesas Solutions Corp. All rights reserved.
Colophon 1.0