You can set the VID and PID (vendor id and product id) to anything you like. Look in the descriptor file.
BTW the MCP 2200 id just a pre-programmed 18F14K50. See this article http://hackaday.com/2011/01/18/mcp22...-your-bidding/
You can set the VID and PID (vendor id and product id) to anything you like. Look in the descriptor file.
BTW the MCP 2200 id just a pre-programmed 18F14K50. See this article http://hackaday.com/2011/01/18/mcp22...-your-bidding/
Last edited by towlerg; - 10th June 2016 at 14:13. Reason: old and stupid
George
I am trying to change more than VID and PID in the MCP2200 descriptor but there is no way to do it using the methods described.There is no HID mouse report descriptor in the descriptor. Basically I want to add hid mouse report descriptor to the MCP2200 descriptor and send data packets using PIC18 through UART OR I2C. In other word: A mouse using PIC and a USB Bridge.I don't want to use the onboard USB as it doesn't have a vendor id and I want to release the final code as an open source project. Am I missing anything?
Simple answer, yes.Am I missing anything?
The MCP2200 is a preprogrammed PIC, which appears to the world as a USB to Serial convertor. Ading a mouse descriptor and the necesary software to service the descriptor is essentially impossible (no flames please). You would be much better of starting with a 18F14K50, modifying a HID sample.
The data sheet gives details of how to change it's PID (among other things). From the data sheet -
The configuration utility provided by Microchip allows the user to configure the MCP2200 to custom defaults. The configuration utility (shown in Figure 2-1) connects
to the device’s HID interface, where all of the configurable features can be set.
Incorrect. The VID and PID are changed in the descriptor file which will be part of the compiled project..I don't want to use the onboard USB as it doesn't have a vendor id
eg The portion of gen_desc.bas which defines the VID (among other things), in this case 04D8 hex.
I don't understand your references to mice?Code:DeviceDescriptor retlw (EndDeviceDescriptor-DeviceDescriptor)/2 ; Size of this descriptor in bytes retlw USB_DESCRIPTOR_DEVICE ; DEVICE descriptor type retlw 0x10 ; USB Spec Release Number in BCD format - 1.10 (low byte) retlw 0x01 ; (high byte) retlw 0x00 ; Class Code retlw 0x00 ; Subclass code retlw 0x00 ; Protocol code retlw USB_EP0_BUFF_SIZE ; Max packet size for EP0 retlw 0xD8 ; Vendor ID - 0x04D8 is Microchip Vendor ID (low byte) retlw 0x04 ; (high byte) retlw 0x0C ; Product ID: PICDEM FS USB (DEMO Mode) (low byte) retlw 0x00 ; (high byte) retlw 0x00 ; Device release number in BCD format (low byte) retlw 0x00 ; (high byte) retlw 0x01 ; Manufacturer string index retlw 0x02 ; Product string index retlw 0x00 ; Device serial number string index retlw NUM_CONFIGURATIONS ; Number of possible configurations EndDeviceDescriptor
Last edited by towlerg; - 15th June 2016 at 13:56.
George
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.
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
@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
Bookmarks