Microchip Technology DV164139 Data Sheet

Page of 54
© 2009 Microchip Technology Inc.
DS41356B-page 27
Note that the HID keyboard transmits in 8-byte packets along the USB. The format of 
this packet is as follows:
• The first byte is used for a modifier such as a shift or ctrl character. (i.e., a 
simultaneous shift and character press on the typical keyboard.)
• The second byte is reserved.
• The remaining bytes are used to carry numeric values that contain the desired 
keyboard characters pressed.
Compile the project. There should be no errors.
Testing the Application
7.
Connect the PICkit 2 Programmer and open the PICkit 2 programming software
8.
Navigate to the .hex file for this lab and download to the PIC18F14K50.
9.
Disconnect the PICkit 2. Open a new notepad, word document or other text editor 
program and click inside the document to place the cursor.
10. Connect the Low Pin Count USB Demo Board to the Host PC port. The device 
should enumerate as “Keyboard Demo”.
11. Within the selected text editor, a series of character entries should appear. 
12. Turn the potentiometer on the Low Pin Count USB Demo Board to change the 
character on the screen.
The user is encouraged to experiment with this application by referring to the Keyboard 
Usage Page and changing the keyboard packet transmitted in the state machine.