How to use PIC18 with MCP USB Chip to do HID?


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    May 2016
    Posts
    33


    Did you find this post helpful? Yes | No

    Default Re: How to use PIC18 with MCP USB Chip to do HID?

    That's not what I wanted to hear but at least I won't spend more time on it. My goal is to avoid the legal issues as this is an open source project and I can't legally tell people use our vendor id according to USB dot org.So in order to create a USB open source product I want to use a hardware chip to replace the software part so users can use the vendor id in the USB chip as in that case I am not releasing the VID or PID.

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,680


    Did you find this post helpful? Yes | No

    Default Re: How to use PIC18 with MCP USB Chip to do HID?

    I must admit the pic usb I/f is not an area I have studied or even used but I would have thought that if you want your "device" to appear to the usb host as a mouse then the descripter to use would be that of a generic mouse device.doing otherwise would entail the need to provide host driver code as well.
    have a look at the Arduino mouse library and maybe copy its functionality and hid descripter .

    then again I might be completely wrong
    Warning I'm not a teacher

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: How to use PIC18 with MCP USB Chip to do HID?

    @Richard There are perfectly good examples of various HID devices in both samples and possibly the Wiki.

    I'm sure (well fairly) that as you are using a MicroChip device , you can use their VID. Just make sure that you don't use a PID that they are using.

    @picmilan If you are trying to do USB to serial wouldn't you be better off looking at CDC. I'm pretty sure that standard mouse drivers will not allow you to write to the mouse.


    Perhaps the following may help - HID is used because it does not require drivers to be written and installed on the PC. HID comes in may variants with the most commonly used for general projects to be vendor. In vendor mode (also called generic) the significance of the data read and written must be know by both PIC and PC. This is both flexible and powerful. Reports are fairly meningless in this mode.
    CDC is the USB Serial protocol and does require a driver on the PC. Microchip provide one for use with their devices which you can edit to suit the PID you select.

    I suggest you try the USB samples provided, making minor changes and hopefully get a feel for the joys of USB.
    Last edited by towlerg; - 16th June 2016 at 04:02.
    George

Similar Threads

  1. Olimex PIC-MCP-USB
    By Tawcafts in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 1st March 2012, 17:54
  2. PIC18 connect to USB thumb drive
    By Pic2008 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 27th April 2011, 18:15
  3. Usb hid
    By yatyas72 in forum USB
    Replies: 5
    Last Post: - 3rd December 2010, 15:45
  4. PIC18 USB Programmer
    By r0nd0m in forum Off Topic
    Replies: 1
    Last Post: - 23rd February 2009, 15:59
  5. PIC18 USB simple example needed
    By harryweb in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 29th September 2005, 22:20

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts