Dlp Nirscan Nano Usb Communications; Usb Hid Protocol - Texas Instruments DLP NIRscan User Manual

Table of Contents

Advertisement

USB Communications
The DLP NIRscan Nano communicates using USB 1.1 human interface device (HID) to exchange
commands and data with a host processor or PC. The USB commands are variable length data packets
that are sent with the least significant byte first. The maximum HID packet length is 64 bytes.
The DLP NIRscan Nano enumerates as a Texas Instruments HID device with vendor ID = 0x0451 and
product ID = 0x4200.
USB Transaction Sequence
The USB 1.1 HID protocol has the structure shown in
Byte 0
Byte 1
Report ID = 0
Command Byte Sequence Byte
7
6
5
R/W
Reply
Error
Reserved
H.0.0.1 USB Read Transaction Sequence
To issue a read command, the host must perform the following steps:
1. Host sends the Report ID byte, which is set to 0.
2. Host sends the Command ID byte, where:
Bit 6 is set to 0x1 to indicate the host wants a reply from the device.
Bit 7 is set to 0x1 to indicate a read transaction.
3. Host sends the Sequence byte. When a single command is more than 64 bytes, it is sent as multiple
USB packets and the sequence byte is used to number the packets so the device can assemble them
in the right sequence. Otherwise, this value is irrelevant and generally set to 0.
4. Host sends two bytes with the length of the data packet. This length denotes the number of data bytes
in the packet and excludes the number of bytes in steps 1 through 4. It denotes the total number of
bytes sent in steps 5 (command bytes) and 6 (data bytes).
5. Host sends two OpCode bytes: OpCode Byte 1 and OpCode Byte 2.
6. Host sends data appropriate to command.
7. After completion of this command, DLP NIRscan Nano responds with a packet that includes:
(a) Byte with the command requested by the host (the matching Sequence byte)
(b) Length of the data packet
(c) Data requested
62

DLP NIRscan Nano USB Communications

DLP NIRscan Nano USB Communications
Byte 2
Byte 3
Length LSB
Length MSB
4:0
Figure H-1. USB HID Protocol
Copyright © 2015, Texas Instruments Incorporated
DLPU030B – June 2015 – Revised July 2015
Figure
H-1:
Byte 4
Byte 5
Byte 6
OpCode 1
OpCode 2
Appendix H
Byte 7
...
Data Bytes
DLPU030B – June 2015 – Revised July 2015
Submit Documentation Feedback
Byte N
Data Bytes

Advertisement

Table of Contents
loading

Table of Contents