Renesas H8SX1664 User Manual page 18

Starter kit usb sample code
Table of Contents

Advertisement

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 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 data can be sent successfully between the RSK and the PC. A fixed sized format of data has been chosen for all
messages, one for OUT and one for IN:
IN Message: (RSK to PC)
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.
OUT Message: (PC to RSK)
Byte 1
Bit 0 = LED toggle request.
Bit 1 = ADC read request.
Bit 2 = LCD set request.
Byte 2-17 = 16 ASCII Characters for LCD.
An IN message is sent whenever a switch on the RSK is pressed.
An OUT message is sent whenever a user clicks on one of the dialog buttons.
The LibUSB application consists of the following files:-
libusb_app.c
libusb_app.h
usbdescriptors.c
\PC\RSK_LibUSB\*
18

Advertisement

Table of Contents
loading

Table of Contents