Specifications
• Responds to
SETUP packet
according to the parsing structure
Figure 2. USB Standard Request Parsing Structure
Figure 2. USB HID Class Request Parsing Structure
Data Acquisition/Transfer
The firmware periodically writes scan patterns to the scan matrix columns, and reads the row result to determine which keys
are pressed. The scan codes of the keys pressed are sent to the host using endpoint 1 (see Figure 15). When the host
issues IN packets to retrieve data from the device, the device returns eight bytes of data. These eight bytes hold the
keyboard control data (see Figure 16). Usage codes for each key can be found in Appendix A.3 of the Device Class Defini-
tion for Human Interface Devices (HID). When one of the LED buttons (i.e. Num Lock, Caps Lock, Scroll Lock) are pressed
or released, the host issues a SETUP packet with a Set_Report request through the control pipe to End Point 0, followed by
an OUT packet with 1 Data byte indicating which LED should be on or off (see Figure 17.)
Figure 2. Endpoint 1 Interrupt Service Routine
Byte 7 - Key 6
Byte 6 - Key 5
Byte 5 - Key 4
Byte 4 - Key 3
Byte 3 - Key 2
Byte 2 - Key 1
Byte 1 - Reserved