

Now you can test this project using mikroC HID Terminal as demonstrated in previous post, but in the following video shows the project demo using HID Terminal developed by Embedded Laboratory, to download the Embedded Laboratory HID Terminal Software click here. USB HID Project in MPLAB Using CCS PIC-C Compiler We have been working very hard in the past couple of months to bring you a powerful new library for our compilers - USB Device Library. Build this project and program the micro-controller with the hex files and configuration files. Printf("\r\n\nUSB Test Program->Written in CCS PIC-C") Printf("\r\n\nUSB unenumerated by PC/HOST, waiting for enumeration.") Printf("\r\n\nUSB enumerated by PC/HOST") Printf("\r\n\nUSB disconnected, waiting for connection.") Printf("\r\n\nUSB connected, waiting for enumaration.") #define USB_CONFIG_VID 4660 //So that they will work with my Application #define USB_CONFIG_PID 1 //Chnage Vendor Id and Product Id You can launch it from the drop-down menu Tools HID. When device is recognized by your OS the gray USB icon will turn red, indicating that USB link is succesfully. *******VENDOR ID AND PRODUCT ID********/ HID Terminal The mikroC PRO for PIC includes the HID communication terminal for USB communication. The MCP2221 also has four GP pins providing miscellaneous functionalities (GPIO.

The device reduces external components by integrating the USB termination resistors and the oscillator needed for USB operation. #fuses HSPLL,NOWDT,NOPROTECT,NOLVP,NODEBUG,USBDIV,PLL5,CPUDIV1,VREGEN The MCP2221 is a USB-to-UART/I2C serial converter which enables USB connectivity in applications that have a UART and I2C interfaces. The code is self explanatory with the help of the comments written. Create a project in MPLAB IDE and copy the code given below and paste it in new file.
