Renesas H8SX1664 Computer Hardware User Manual


 
Chapter 5.Applications
5.1.Introduction to Applications
The following sections introduce the sample applications that can be used to demonstrate each of the USB solutions. The HID and LibUSB
projects require specially written host applications that are supplied as both executables and as source. The CDC and MSC projects make
use of standard Windows applications.
All the applications require that the RSK has been programmed with the appropriate sample code for the application. Details of how to
program the RSK have been provided as part of the tutorial with the product. To obtain a digital copy of the manual please visit the Renesas
web site at
www.renesas.com/renesas_starter_kits and select your RSK from the list.
5.2.Human Interface Device Application
The HID host sample application is written for a Windows host PC and is called RSK_HID.
The pre-built executable has been provided with the project generator. Navigate to the release directory under the project and run
RSK_HID.exe. The following window will be displayed:
Figure 2 - HID host PC application
Program the RSK with the HID application and run the code. Connect a USB cable between the PC and the RSK. The first time the device is
connected to a specific USB port windows will detect the new device and automatically load the intrinsic HID class driver.*
When windows has completed the enumeration process you need to make a connection from the application to the target. Click the
“Connect” button and you will be asked to confirm the VID and PID of the device you wish to connect with. If you have not altered the firmware
on the RSK to use your own VID and PID then the defaults will be correct. When a connection is successfully made information about the
device will be displayed and the rest of the buttons will be enabled.
The “Toggle LED” button enables a LED on the RSK to be toggled on and off.
The “Read ADC” button will command the RSK to read its ADC and return the value back to the host where it will be displayed.
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 you 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.
This demonstrates that Input and Output HID reports are being sent successfully between the RSK and the PC. The format of the reports is
as follows:
11