Microchip Technology DV164139 Data Sheet
Low Pin Count USB Development Kit User’s Guide
DS41356B-page 24
© 2009 Microchip Technology Inc.
2.6.2
Procedure
This application will require a few changes to the usb_descriptor.c file to configure the
PIC18F14K50 as a HID keyboard. Note: the changes made to the report descriptor
were done using the HID Descriptor Tool downloaded from
PIC18F14K50 as a HID keyboard. Note: the changes made to the report descriptor
were done using the HID Descriptor Tool downloaded from
http://www.usb.org/devel-
opers/hidpage/
. The user is encouraged to spend some time reviewing the contents of
this page and the resources available for developing HID applications.
1.
Create a new project “Project Lab 3” as was done in the previous labs. The
source files for Lab 3 can be found in:
C:\LPCUSBDK_Labs\Lab3_files
source files for Lab 3 can be found in:
C:\LPCUSBDK_Labs\Lab3_files
2.
Ensure that the Project Build Options are configured as was done in Lab 1 steps
11 through 15.
11 through 15.
3.
Open the usb_descriptor.c file and scroll down to the interface descriptor.
Uncomment the Protocol Code definition //HID_PROTOCOL_KEYBOARD,
Uncomment the Protocol Code definition //HID_PROTOCOL_KEYBOARD,
4.
Scroll down to the HID class specific descriptor and uncomment the size of the
HID report macro //DESC_CONFIG_WORD(63),
The report descriptor has changed from the previous lab and will contain 63
components that the Host PC will need to identify this device’s keyboard
attributes.
HID report macro //DESC_CONFIG_WORD(63),
The report descriptor has changed from the previous lab and will contain 63
components that the Host PC will need to identify this device’s keyboard
attributes.
5.
Scroll down to the report descriptor and add the code in Example 2-8 in the
section labeled:
section labeled:
//ADD REPORT DESCRIPTOR HERE