RenesasメーカーH8SX1664の使用説明書/サービス説明書
ページ先へ移動 of 21
REG10J0134-0100 Renesas Starter Kit for H8SX1664 USB Sample Code User's Manual RENESAS SINGLE-CHIP MICROCOMPUTER H8SX F AMIL Y Rev .1.00 Renesas T echnology Europe Ltd.
T able of Content s T able of Content s ............................................................................................................................... ................... ii Chapter 1. Preface .........................................
Chapter 1. Preface Cautions This document may be, wholly or partially, subject to change without notice. All rights reserved. No one is permitted to reproduce or duplicate, in any form, a part or this entire document without the wri tten permission of Renesas Technology Europe Limited.
Chapter 2.Introduction The RSK USB sample code provides a basis for a developer to add USB device functionalit y to a system. It includes sample appli cations for the three most common USB Device clas.
Chapter 3.Development Environment 3.1.Sample Code Configuration The Sample code is provided as a project generator with the RSK. To create the sample code project follow the instructions in t he RSK Quick Start Guide.
Chapter 4.USB S tack (T arget) The USB software is implemented in the form of a USB stack comprising of three layers. At the top of the stack are the USB Device Classes c onsisting of HID, CDC and MSC which are all described later. In the middle is a core layer (USBCore) that handles standard device requests.
4.2.USBCore The USBCore layer handles standard USB requests common to all USB devices d uring the enumeration stage. This means that a devel oper can concentrate on any class or vendor specific implementation. The USBCore requires initialising with the descriptor s specific to the device being implemented.
4.3.Human Interface Device Class The HID class as the name suggests is commonly used for things like keyboards, mice and joysticks where a human’s action is causing the need for communication.
4.4.Communication Device Class The CDC ACM allows a host to see a device as a standard serial (C OM) port. This is particularly us eful when working with legacy applications that use serial communications. Bulk IN and Bu lk OUT t r ansfers are used for all non-setup data.
4.5.Mass Storage Class The MSC class has become a very popular way for devices, such as cameras an d USB Pens, to share data with PCs. The reason for t he success is that when the device is plugged in.
Chapter 5.Applications 5.1.Introduction to Applications The following sections introduce the sample applications that c an be used to demonstrate each of the USB solutions. The HID and LibUSB projects require specially written host appl ications that are supplied as both exec utables and as source.
Input Report: Byte 1 Bit 0 = LED status. Bit 1 = ADC value valid indicator. Bit 2 = Switch pressed indicator. Byte 2-5 = 32 bit, little endian ADC Value. Output Report: Byte 1 Bit 0 = LED toggle request. Bit 1 = ADC read request. Bit 2 = LCD set request.
5.3.Communications Devi ce Class Application The CDC sample application demonstrates communication with a Windows PC using a standar d terminal program. Windows provide a suitable application called Hyper Terminal. Any other serial terminal program will be able to be used if available.
Either type or browse to the location of the CDC project you have generated and built. Press next to install the CDC support. During the installation process a warning may be displayed as shown. Please choose “Continue Anyway” to install the driver.
Pressing SW1 on the RSK will stop this repeating message and will bring up the m ain menu as shown below. To demonstrate two way communication press SW2 to put the RSK into echo mode. In this mode anything typed on the Terminal will be read by the RSK and then echoed back to the terminal.
5.4.Mass Storage Class Demonstration The MSC sample demonstrates how a host can view a MSC device as an external drive. There is no additional ap plication for this as the MSC support is inherent in Windows XP. Start the MSC sample application running on the RSK t hen connect the RSK to a Windows PC via a USB cable.
5.5.LibUSB The LibUSB sample application is functionally similar to the prev ious HID application. The difference is that th is sample inclu des software for a Windows host PC called RSK_LibUSB.
3. The “Set LCD” button allows the text of the LCD on the RSK to be changed. To demonstrate that the RSK can also instigate communications y ou can press a switch on the RSK and this will be indicated back to the host resulting in a message being displayed on the dialog.
Chapter 6.Additional Information For details on how to use High-performance Embedded Workshop (HEW), refer to the HEW manual available on the CD or installed in the Manual Navigator.
Renesas S tarter Kit for H8SX1664 USB Sample Code User's Manual Publication Date Rev .1.00 08.Jan.2008 Published by: Renesas T echnology Europe Ltd. Dukes Meadow, Millboard Road, Bourne End Buckinghamshire SL8 5FH, United Kingdom ©2008 Renesas T echnolog y Europe an d Renesas Solu tions Corp.
Renesas S tarter Kit for H8SX1664 USB Sample Code User's Manual Renesas T echnology Europe Ltd. Dukes Meadow , Millboard Road, Bourne End Buckingham shi r e SL8 5FH, United Kingdom.
デバイスRenesas H8SX1664の購入後に(又は購入する前であっても)重要なポイントは、説明書をよく読むことです。その単純な理由はいくつかあります:
Renesas H8SX1664をまだ購入していないなら、この製品の基本情報を理解する良い機会です。まずは上にある説明書の最初のページをご覧ください。そこにはRenesas H8SX1664の技術情報の概要が記載されているはずです。デバイスがあなたのニーズを満たすかどうかは、ここで確認しましょう。Renesas H8SX1664の取扱説明書の次のページをよく読むことにより、製品の全機能やその取り扱いに関する情報を知ることができます。Renesas H8SX1664で得られた情報は、きっとあなたの購入の決断を手助けしてくれることでしょう。
Renesas H8SX1664を既にお持ちだが、まだ読んでいない場合は、上記の理由によりそれを行うべきです。そうすることにより機能を適切に使用しているか、又はRenesas H8SX1664の不適切な取り扱いによりその寿命を短くする危険を犯していないかどうかを知ることができます。
ですが、ユーザガイドが果たす重要な役割の一つは、Renesas H8SX1664に関する問題の解決を支援することです。そこにはほとんどの場合、トラブルシューティング、すなわちRenesas H8SX1664デバイスで最もよく起こりうる故障・不良とそれらの対処法についてのアドバイスを見つけることができるはずです。たとえ問題を解決できなかった場合でも、説明書にはカスタマー・サービスセンター又は最寄りのサービスセンターへの問い合わせ先等、次の対処法についての指示があるはずです。