Datasheet

2014 Microchip Technology Inc. DS20005292A-page 23
MCP2221
3.0 USB HID COMMUNICATION
Except for the USB CDC and UART modules, all the
other modules in the MCP2221 use USB HID protocol
for communication.
The USB HID protocol uses 64-byte reports.
A typical command exchange starts with a 64-byte
packet that is written by the USB Host (i.e., the PC).
Afterward, the USB Host reads the response from the
device as a 64-byte packet.
3.1 USB HID Commands/Responses
3.1.1 STATUS/SET PARAMETERS
This command offers many options for this device. It is
used to poll for the status of the device. It is also used
to establish certain I
2
C bus parameters/conditions.
TABLE 3-1: COMMAND STRUCTURE
Byte
Index
Function Description Value Effect
0 0x10 Status/Set Parameters – command code
1 Don’t care Any value
2 Cancel current I
2
C/SMBus
transfer (sub-command).
0x10 When this value is put in this field, the device will cancel the
current I
2
C/SMBus transfer and it will attempt to free the I
2
C
bus.
This command is very useful since it can cancel a transfer and
free the bus. An example would be when trying to communicate
with a device using a wrong address. This will cause a timeout
to occur. This timeout situations can be read using the “Sta-
tus/Set Parameter” and the cancellation of the I
2
C/SMBus
transfer can be achieved by this sub-command.
Any other
value
No effect.
3Set I
2
C/SMBus communication
speed (sub-command)
0x20 When this value is put in this field, the device will take the next
command field and interpret it as the system clock divider that
will give the I
2
C/SMBus communication clock.
Any other
value
No effect.
4The I
2
C/SMBus system clock
divider that will be used for
establishing the communication
speed
The value in this field is being taken into consideration only
when the Byte Index 3 contains the code for establishing a new
communication speed. In all the other cases, this field’s value
won’t matter.
5-63 Don’t care Any value