APPLICATION NOTE R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 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 Page 1 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 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. R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 2 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 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. R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 3 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 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. R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 4 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 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 indicates a potentially dangerous situation that will cause death or heavy wound unless it is avoided. WARNING CAUTION indicates a potentially dangerous situation that will cause a slight injury or CAUTION 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. R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 5 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 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 35C. Care should be taken that this temperature is not exceeded. R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 6 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 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". R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 7 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 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. R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 8 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 6. 6.1 Demo Board Description Demo Board Specification Figure 1 and Figure 2 show external views of the front and back of the demo board. USB receptacle (mini B) R8C/3MK LED (Green) External connection pins (J3) USB Downloader function switch pin MCU Ceramic oscillator Regulator (from VBUS) Figure 1 R0K5R8C3MDU30BR Board (Top View) External connection pins (J3) External connection pins (J1, J2) Figure 2 R0K5R8C3MDU30BR External View (back) R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 9 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 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.) R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 10 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 6.2 Function Overview Figure 3shows the functional block diagram for the demo board, followed by a brief description of each function. 5V->3.3V regulator VCC External connectors J1,J2,J3 TP1 VCC USB_VCC SCS SSI SSO/SDA SSCK/SCL TxD0 R8C/3MK RxD0 40Pin QFN MODE RESET VBUS USB downloader Function switch pin D+ D- USB MiniB 12MHz Oscillator External connector J2 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." R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 11 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 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 Component Name QTY Circuit Board (R0K5R8C3MDU30BR) 1 2.54-mm pitch, 2-row right angle Header pin (J3) Release Note (English/Japanese) 1 1 System definitions file (CDC_demo.inf) 1 Upgrade application software (pcdcfw.mot) 1 Instruction Manual (this document) 1 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. R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 12 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 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 userprovided 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. R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 13 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual GND RxD0 SSO/SDA TxD0 VCC RESET SSCK/SCL MODE SSI SCS Figure 7 Positioning of Signal Lines and Power Supply/GND Connected to J1/J2 GND SCS RxD0 SSI TxD0 SSCK/SCL SSO/SDA VCC Figure 8 Positioning of Signal Lines and Power Supply/GND Connected to J3 Table 4 Relation of connector pin No. and MCU functions J1 pin J2 pin J3 pin UART I2C SSU GND RxD0 - 1 2 1 2 GND RxD0 GND - GND TxD0 - 3 3 TxD0 - SSO/SDA 1 - 4 - SDA SSO SCS 5 - 5 - - SCS SSI 4 - 6 - - SSI Terminal name SSCK/SCL 3 - 7 - SCL SSCK VCC 2 - 8 VCC VCC VCC RESET - 4 - - - - MODE - 5 - - - - R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 14 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 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 USBto-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 Turn on power TP1 = GND USB downloader function Confirm TP1state TP1 = Open USB-to-UART communication conversion function Figure 10 USB-to-UART Communication Function / USB Downloader Function Switching Sequence R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 15 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 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. USB communication Terminal software Text screen USB This Product 2. "12345678" Text Data UART0 Text Data 1. "ABCDefg" USB 1. "ABCDefg" 2."12345678" UART communication Text Data 1. "ABCDefg" USB CDC Host Device UART communication RS232C Transceiver Terminal software Text screen RS232C Seriial PORT UART 2. "12345678" Text Data RS232C Text Data 1. "ABCDefg" 1."ABCDefg" 2."12345678" 2. "12345678" Text Data RS232C communication PC with RS232C serial port Figure 11 Example of Data Communication using USB-to-UART Communication Conversion R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 16 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual The serial port parameters on the terminal software reflect UART0. TXD UART RXD Device with UART serial port This product does not use control signals of CTS/RTS/DSR/DTR etc. This Product UART0 USB USB Control Transfer Class Request USB Communication RS232C Seriial PORT RS232C Transceiver RS232C UART USB CDC Host PC with RS232C Serial Port RS232C Communication 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) R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 17 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 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. 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 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. Erase Flash ROM start... Erase complete 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. Please send a mot file Write complete 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." R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 18 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 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. Turn on Power TP1 = "GND" Confirm TP1 State TP1 ="Open" USB-to-Serial communication conversion function USB downloader function Select "UART" USB-to-UART communication conversion function Select "I2C" USB-to-I2C communication conversion function Select "SSU" USB-to-SSU communication conversion 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. Do you select URT Demo ? Do you select IIC Demo ? Do you select SSU Demo ? 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 R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 19 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual (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. OK You select URT Demo ! Figure 18 Display of Selecting USB-to-UART Communication Conversion OK You select IIC Demo ! Figure 19 Display of Selecting USB-to-I2C Communication Conversion OK You select SSU Demo ! 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. R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 20 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 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. USB Communication Terminal software Text screen USB CDC Host 2 This Product 2. "30C" I2C Read Command Binary data IC I2C Commnication USB USB 1. Write Command "Renesas" 2. Read Command "30C" I2C Write Command Binary data 1. "Renesas" I2C protocol 1. "Renesas" R en e 2. "30C" I C protocol sa s 2 IC 2 I2C Communication Figure 21 Example of Data Communication using USB-to-I2C Communication Conversion R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 21 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 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. USB Communication SSU Write Command Binary data 1. "Renesas" This Product 2. "12345" SSU Read Command Binary data SSU SSU Communication USB 1. Write Command "Renesas" 2. Read Cpmmand "12345" USB Terminal software Text screen SSU protocol 1. "Renesas" CDC Host SSU SSU Communication EEPROM 2. "12345" SSU protocol Figure 22 Example of Data Communication using USB-to-SSU Communication Conversion R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 22 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 9. 9.1 9.1.1 I2C demo communication protocol USB Packet Specification Structure of Command Packet The command packet for controlling I2C device consists of five bytes. Figure 23 shows the structure of command packet. The structure of Command Packet O U T Control 0x01 DevAdr 0x02 RegAdr 0x03 Len(Lower) 0x64 Len(Upper) 0x00 A C K 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. R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 23 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 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. The structure of Data Packet IN Data(D001) 0x01 Data(D002) 0x02 Data(D003) 0x03 Data(D064) 0x40 O U T Data(D001) 0x01 Data(D002) 0x02 Data(D003) 0x03 A C K A C K or 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. The Structure of Combined Packet Command part O U T Data part Control 0x01 DevAdr 0x02 RegAdr 0x03 Len(lower) 0x2 Data(D001) 0x01 Len(upper) 0x00 Data(D002) 0x02 A C K 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. R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 24 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 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. Protocol Conversion of Rea Access (Receiving 100 bytes data ) USB Packet First Packet: Send Command Packet Command 0x02 DevAdr 0x02 RegAdr 0x03 Second Packet: Receive Data Packet (64bytes) Len(lower) 0x02 Data(D001) 0x01 Len(upper) 0x00 Third Packet: Receive Data Packet (36bytes) Data(D064) 0x40 Data(D065) 0x41 Data(D100) 0x64 I2CPacket First Packet: Send Command Packet Second Packet: Receive Data Packet S T Device Address b0000010 S T W Register Address 0x03 Device Address b0000010 S P R Data(D001) 0x01 Data(D064) 0x40 Data(D065) 0x41 Data(D100) 0x64 S P (ST=Start/SP=Stop/W=Write/R=Read) Figure 26 Protocol Conversion of Read Access R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 25 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 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". Protocol Conversion of Write Access (Writing 100 Bytes data) USB Packet First Packet: Send Command Packet O U T Control 0x00 DevAdr 0x02 RegAdr 0x03 O U T Second Packet: Send Data Packet (64 bytes) Third Packet: Send Data Packet (36 bytes) Len(lower) 0x64 Data(D001) 0x01 A C K Len(upper) 0x00 A C K Data(D064) 0x40 O U T Data(D065) 0x41 Data(D100) 0x64 A C K I2C Packet First Packet: S Device Address + Register Address + T Write Data (100bytes) (Including I2C Bus Hold) Device Address Register Address W b0000010 0x03 Data(D001) 0x01 Data(D064) 0x40 Data(D065) 0x41 Len(upper) 0x00 Data(D001) 0x01 Data(D002) 0x40 Data(D100) 0x64 S P Protocol Conversion of Write Access (Using Combined Packet) USB Packet First Packet: Send Combined Packet I2C Packet First Packet: Device Address + Register Address + Write Data O U T Control 0x00 S T DevAdr 0x02 Device Address b0000010 RegAdr 0x03 W Register Address 0x03 Len(lower) 0x02 Data (D001) 0x01 Data (D002) 0x40 S P A C K (ST=Start/SP=Stop/W=Write) Figure 27 Protocol Conversion of Write Access R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 26 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 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 (I 2C 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 R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 27 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 10. 10.1 10.1.1 SSU demo communication protocol USB Packet Specification 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 The Command Packet of 5-byte composition O U T Control 0x00 Dummy 0x00 Instruction 0x03 Len(Lower) 0x64 Len(Upper) 0x00 A C K Figure 29 the Control Command consisted of 5bytes Figure 30 shows the Memory Read/Write Command consisted of 7 bytes Memory Read/Write Command consisted of 7 bytes O U T Control 0x20 Dummy 0x00 Instruction Address(Lower) 0x03 0x64 Address(Upper) 0x00 Len(Lower) 0x64 Len(Upper) 0x00 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. R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 28 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 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. The structure of Data Packet O U T Data(D001) 0x01 Data(D002) 0x02 Data(D003) 0x03 Data(D064) 0x40 I N Data(D001) 0x01 Data(D002) 0x02 Data(D003) 0x03 A C K A C K or 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. The structure of Combined Packet Command part O U T Data part Control 0x00 Dummy 0x00 Instruction 0x03 Len(Lower) 0x2 Len(Upper) 0x00 Data(D001) 0x01 Data(D002) 0x02 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. R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 29 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 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. Protocol conversion of Rea Access(Receiving 100 bytes data) USB packet First Packet: Send Command Packet O U T Control 0x01 Dummy 0x00 Second Packet: Receive Data Packet (64bytes) Third Packet: Receive Data Packet (36bytes) Instruction 0x?? I N Data(D001) 0x01 Len(Lower) 0x64 Len(Upper) 0x00 Data(D064) 0x40 I N A C K A C K Data(D065) 0x41 Data(D100) 0x64 A C K SSU packet Command + Data Packet Instruction 0x?? Data(D001) 0x01 Data(D064) 0x40 Data(D065) 0x41 Data(D100) 0x64 SSU Transmission SSU reception Figure 33 Protocol Conversion of Read Access R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 30 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 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". Protocol Conversion of Write Access (Transmit 100 Bytes Data) USB Packet First Packet: Send Command Packet O U T Control 0x00 Instruction 0x?? Dummy 0x00 Second Packet: Send Data Packet (64 bytes) Third Packet: Send Data Packet (36bytes) O U T Len(Lower) 0x64 Data(D001) 0x01 Instruction 0x?? First Packet: Send Command + Data Data(D001) 0x01 Data(D064) 0x40 A C K Data(D064) 0x40 O U T SSU Packet A C K Len(Upper) 0x00 Data(D065) 0x41 Data(D065) 0x41 A C K Data(D100) 0x64 Data(D100) 0x64 Protocol Conversion of Write Access Using Combined Packet USB Packet First Packet: Send Combined Packet O U T Control 0x00 Instruction 0x?? Dummy 0x00 Len(Lower) 0x02 Len(Upper) 0x00 Data(D001) 0x01 SSU Packet Instruction 0x?? First Packet: Send Command + Data Data(D001) 0x01 A C K Data(D002) 0x40 SSU transmission Data(D002) 0x40 SSU Reception 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. Protocol Conversion of Memory Read(Receive 2 bytes Data) USB Packet First Packet: Send Command Packet O U T Control 0x21 Dummy 0x00 Instruction 0x03 Len(Lower) 0x02 Len(Upper) 0x00 Second Packet: Receive Data Packet Address(Lower) Address(Upper) 0x00 0x00 Data(D001) 0x01 I N A C K Data(D002) 0x02 A C K SSU Packet First Packet: Send Command + Receive Data Instruction 0x03 Address(Upper) 0x00 Address(Lower) 0x00 Data(D001) 0x01 Data(D002) 0x02 SSU Transimssion SSU Reception Figure 35 Protocol Conversion of Memory Read Memory 10.2.4 Protocol Conversion of memory Write R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 31 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 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". Protocol Conversion of Memory Write(Send 2 Bytes Data) USB Packet First Packet: Send Command Packet O U T Control 0x20 Dummy 0x00 Instruction 0x02 Len(Lower) 0x02 Len(Upper) 0x00 Second Packet: Send Data Packet (2bytes) O U T Address(Lower) 0x00 Data(D001) 0x01 Address(Upper) 0x00 Data(D002) 0x40 A C K A C K SSU Packet Instruction 0x02 First Packet: Send Command and Data Address(Upper) 0x00 Address(Lower) 0x00 Data(D001) 0x01 Data(D002) 0x40 SSU Transmission SSU Reception 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 Protocol Conversion of Instruction Write USB Packet First Packet: Send Command Packet O U T Control 0x30 Dummy 0x00 Instruction 0x?? Len(Lower) 0x00 Len(Upper) 0x00 A C K SSU Packet Send Command (1byte) Instruction 0x?? SSU Tranmission Figure 37 Protocol Conversion of Instruction Write R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 32 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 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 R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 33 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 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) R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 34 of 38 R8C/3MK Group USB-to-Serial Communication Conversion Demo Board R0K5R8C3MDU30BR Instruction Manual 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/ (c) 2012 Renesas Electronics Corporation and Renesas Solutions Corp. All rights reserved. All trademarks and registered trademarks are the property of their respective owners. R01AN1051EJ0100 Rev.1.00 Mar 21, 2012 Page 35 of 38 5 4 3 2 1 Appendix 1 Circuit Diagram TXD RXD 21 23 22 24 25 26 28 27 VCC 34 USB_DPUPE USB_VCC P04/AN3/TRCIOB USB_DP R8C/3MK Group MCU P03/AN4/CLK1/TRCIOB USB_VBUS P76/USB_OVRCURA 36 P02/AN5/RXD1/TRCIOA/TRCTRG P77/USB_VBUSEN P33/TRCCLK/SCS/CTS2/RTS2/IVCMP3 2 CN1 20 9 8 7 6 19 1.5K 18 R5 27 USB_DP 17 R6 27 USB_DM 5 4 3 2 1 16 FRAME4 FRAME3 FRAME2 FRAME1 GND ID D+ DVbus Mini-B 15 14 13 SCS 12 SSI 11 SSCK_SCL VBUS 2 1 R7 C USB_VBUS 100 C1 R8 1.0u 100k 10 P46/XIN VCC 9 8 VSS 7 P47/XOUT 6 MODE VREF P30/TRAO RESET 5 4 3 P82/TXD3 P81/CLK3 P83/RXD3 41 40 P35/SCL/SSCK/TRCIOD P00/AN7/TRCIOA/TRCTRG 2 39 PAD 38 P01/AN6/TXD1/TRCIOA/TRCTRG 1 37 P37/SSO/TRAO/SDA P34/TRCIOC/SSI/IVREF3 C C6 0.1u R4 USB_DM 35 1 P67/INT3/TRCIOD P66/INT2/TXD2/SDA2 P65/INT4/CLK2/CLK1 P17/INT1/TRAIO/IVCMP1 P07/AN0/TRCIOC P45/INT0/RXD2/SCL2/ADTRG 33 P10/KI0/AN8/TRCIOD P16/CLK0/IVREF1 32 330 P11/KI1/AN9/TRCIOA/TRCTRG P15/RXD0/TRAIO/INT1 31 P14/TXD0/TRCCLK U1 1 P12/KI2/AN10/TRCIOB SML-310MT(GREEN) 29 30 R3 2 P13/KI3/AN11/TRBO/TRCIOC LED1 RXD D TXD D SSO_SDA TP1 VCC m ode_s el 1 VCC VCC VBUS 4 0 VOUT 2 1.0u C3 NC GND 3 C5 1 X1 1 6 BYP EN R10 1.0u 1 MODE 0.1u 100k C4 7 CERAMIC 2 2 4.7k 2 R12 4.7k RESET 5 R11 MIC5353-3.3YMT 3 VIN 1 4.7k U2 2 4.7k R9 1 C7 0.1u R13 PAD 2 1 C2 0.1u VCC R14 2 1 VCC VCC RXD TXD J3 B B 5 6 7 8 SCS SSI SSCK RXD TXD RXD TXD SSO 1 2 3 4 SSO SSCK SSI SCS VCC 1 2 3 4 5 1 2 3 4 5 2.54m m 2x4Header J1 J2 CON5 DDDTE D NXXE G R T SE O RM CON5 I A CL S S D C CS C S VS S / / O K S S SC S A A Title R0K5R8C3MDU30BR Size Docum ent Num ber 5 4 3 2 Rev D-R0K5R8C3MDK3UBR_C Date: Sheet 1 1 of 1 Appendix2: Parts Layout Diagram 1. Front Surface 2. Rear Surface Appendix3: Parts List Title Component Name No. Type Symbol on Board R0K5R8C3MDU30BR Parts List Component Specification 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 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 * unmount Revision Record Rev. 1.00 Date Mar 21.12 Description Page Summary First edition issued A-1 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 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 assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein. 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) (Note 2) "Renesas Electronics" as used in this document means Renesas Electronics Corporation and also includes its majority-owned subsidiaries. "Renesas Electronics product(s)" means any product developed or manufactured by or for Renesas Electronics. http://www.renesas.com 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 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 Dusseldorf, 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 (c) 2012 Renesas Electronics Corporation and Renesas Solutions Corp. All rights reserved. Colophon 1.0