• AVR Freaks

Hot!How change VID and PID of MCP2200 programmatically? STILL NOT SOLVED!

Author
hanzibal
Starting Member
  • Total Posts : 47
  • Reward points : 0
  • Joined: 2012/06/11 00:40:35
  • Location: Sweden
  • Status: offline
2012/10/08 14:16:35 (permalink)
0

How change VID and PID of MCP2200 programmatically? STILL NOT SOLVED!

Hi all!
We've developed a product containing an MCP2200 and we're currently working on a automated test and programming utility for these.
 
Does anybody know how we can programatically change the VID and PID of the MCP2200?
 
This cannot be done using the Simple-IO.DLL assembly and neither can we use the "production utility" from MCP since we wan't to perform some other diagnostic tests as well as programming the devices. Since the configuration tool from MCP can do the programming, there must be way to do this using HID commands, but where's the docs? We can always hack into the commands sent by the configuration tool using the "HID class.DLL" assembly but there must be a better way.
 
While the HID-interface of the MCP2210 is very well documented indeed, I can't really find anything useful on the MCP2200 other the most basic stuff described in the HID Interface Command Description
 
post edited by hanzibal - 2012/10/25 10:28:15
#1

9 Replies Related Threads

    osmanyurdakul
    New Member
    • Total Posts : 3
    • Reward points : 0
    • Joined: 2012/10/17 06:17:18
    • Location: 0
    • Status: offline
    Re:How change VID and PID of MCP2200 programmatically? 2012/10/19 03:37:29 (permalink)
    0
    Hi everybody,
     
    I have the same issue? I cannot update vid and pid to another values. When i change those values, an error like write failed occurs and the status turns to 'not connected'. How can i change vid and pid. Help me please..
    #2
    hanzibal
    Starting Member
    • Total Posts : 47
    • Reward points : 0
    • Joined: 2012/06/11 00:40:35
    • Location: Sweden
    • Status: offline
    Re:How change VID and PID of MCP2200 programmatically? 2012/10/19 03:52:25 (permalink)
    0
    I assume you get this error using the MCP2200 Config tool. I think this problem occurs precisely because you just set a new pair of vid/pid and if I remember correctly, the trick is to enter the new pair but before pressing "configure" you issue "File->Save as..." to store the profile containing the new vid/pid. After that, you click "configure" and it should work fine. The next time you run the config, the config tool will first state "NOT Connected" but then you load the profile previously saved and it should connect.
     
    My problem is that I can't find a way to do this programatically.However, I've written to tech support and they're currently looking into why the official HID feature set of the MP2200 lacks this functionality while it is readily available for the MCP2210 (similar chip but with SPI instead on regular serial).
     
    Since the config tool can do it, then obviously the MCP2200 HID interface supports writing vid/pid and description but according to tech support this part is not "open to user" and I really can't see why that is has to be so (that being my second question to tech support).
     
    In the meantime, I will probably run a USB sniffer to see what commands the config tool is sending to the device in order to change vid/pid.
    post edited by hanzibal - 2012/10/19 04:05:16
    #3
    osmanyurdakul
    New Member
    • Total Posts : 3
    • Reward points : 0
    • Joined: 2012/10/17 06:17:18
    • Location: 0
    • Status: offline
    Re:How change VID and PID of MCP2200 programmatically? 2012/10/19 04:33:13 (permalink)
    0
    So thanks for your reply.
     
    I tried what you said. Now i entered for example; pid:0x0001 vid:0x00A1 and before pressing update and configure button i saved this configs. after that i pressed update and it turned to 2not connected'. I opened file that i saved and after that i pressed configure button but it did not changed. error occured. The thing i want to do is to install my own .inf file. When i show the folder path which includes .inf file, it cannot find that file. But when i show the folder includes MCP2200.inf that i downloaded from MC website, it can install the driver. How can i make the recognize it my .inf. So, i want to see name that i defined for usb device when i plug the mcp2200 in PC. i want to see that name in the device manager for instance, MotorController. Please help me out with that
    #4
    osmanyurdakul
    New Member
    • Total Posts : 3
    • Reward points : 0
    • Joined: 2012/10/17 06:17:18
    • Location: 0
    • Status: offline
    Re:How change VID and PID of MCP2200 programmatically? 2012/10/19 04:50:27 (permalink)
    0
     Ok i solved it i could install driver in 32-bit system. After that i connected to my PC now i can see my own name in device manager. Thanks for your effort.
    #5
    hanzibal
    Starting Member
    • Total Posts : 47
    • Reward points : 0
    • Joined: 2012/06/11 00:40:35
    • Location: Sweden
    • Status: offline
    Re:How change VID and PID of MCP2200 programmatically? 2012/10/19 09:49:37 (permalink)
    0
    It works for me when I do exactly as I described earlier, but I do not use the "Update vid/pid" button, only the "Configue" button. Also, there's no point in trying to configure the device when it is not connected. The config util only reads the device during start-up OR when you load previously stored settings. The config util seems assuming factory defaults at start-up (i.e. original vid/pid) so you must load your own settings immediately after start-up every time you run the config util.
     
    About your .inf-file problem, I simply edited the file supplied by MCP and changed to my own vid/pid. After connecting the updated MCP2200 (with respect to vid/pid), Windows asks for driver and I point to the location where my edited .inf file resides. Windows accepts my .inf file and everything is fine after that. Make sure you haven't made any mistakes editing the original .inf file - might be a good idea to start over with a fresh copy and edit that.
     
    Btw, if you find my answers helpful - please mark the post as helpful, this will probably earn me some points eventually :-)
     
    Good luck!
     
    EDIT: Sorry, my bad: After loading your config - first hit the "Update vid/pid" button, this should connect to your device using the new vid/pid set.
    post edited by hanzibal - 2012/10/19 18:32:38
    #6
    ikram
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2013/01/26 08:10:20
    • Location: 0
    • Status: offline
    Re:How change VID and PID of MCP2200 programmatically? 2013/04/18 17:57:08 (permalink)
    0
    Hai....friends im using MCP2210( USB to SPI converter) with matlab. i can able to control the GPIO,SET and GET GPIO values,bit rate etc.
     
    After bus release,  im running this below code to get data from my ADC. it not showing any error,But the received SPI data from my ADC should be in C variable. The data is not loaded into C variable. I am striving  with this past one month, i have tried lot.
    its my final year project, i need help. 
     
    b=uint8(zeros(1,27));
    c=uint8(zeros(1,27));
    khan.Functions.TxferSpiData(b,c);---->the data not loaded into variable 'c', but no  error message
    how to get data with this TxferSpiData function, what i need to do please Request any one tell me the solution.
     
    Thanks 
    Ikram Khan.S.I
    #7
    hanzibal
    Starting Member
    • Total Posts : 47
    • Reward points : 0
    • Joined: 2012/06/11 00:40:35
    • Location: Sweden
    • Status: offline
    Re:How change VID and PID of MCP2200 programmatically? 2013/04/19 00:51:49 (permalink)
    0
    First of all, I think you should create a separate post since your issue deals with the MCP2210 and this thread is about descriptor programming for the MCP2200, or else your post will probably not get the intended attention from other forum members.
     
    Anyway, the response totally depends on what device sits in the other end. What specific SPI slave chip/device/module are you talking to? Please supply a link to the datasheet.
     
    Typically, you send some kind of command to the device which then responds accordingly. Such a command could be, for example, requesting that the device reads and returns the value of register or performing some other task.
     
    SPI is full duplex so for each data word (normally 8 bits, e.g. a byte) clocked out on MOSI line, the device writes back one data word on the MISO wire. Normally the device cannot (and does not) begin responding before it has received the command in full. This means that the response data words will be displaced forward in the response byte array and begins after the last data word of the command has been clocked out. This also means you must make both arrays long enough to hold the sum of the size of the command and response data. Make sure you have configured and wired CS (chip select) correctly or else the slave device will not take any notice of your request.
     
    Double check your wiring and also check the device datasheet to make sure you're not exceeding the maximum SPI transfer speed that it can handle.
     
    It looks to me as if you create two empty byte arrays. I don't know what outcome you expect from this but my guess is that the command is meaningless to the slave device and that is the reason for not receiving any data. Also, I think you should uses zero-based indexing on the byte arrays (you seem to use 1-based indexing), but I don't know for sure since I don't know how these things work in Matlab.
     
    Hope this helps!
    post edited by hanzibal - 2013/04/19 01:04:57
    #8
    pavanbabut
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2012/09/12 14:34:55
    • Location: 0
    • Status: offline
    Re:How change VID and PID of MCP2200 programmatically? 2019/09/13 16:40:50 (permalink)
    0
    Hello,
     
    I am trying to update the USB descriptor for this IC and would like to know the proper procedure with our breaking anything? Is there a document or something like that for this?
     
    thanks
    #9
    ric
    Super Member
    • Total Posts : 23819
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re:How change VID and PID of MCP2200 programmatically? 2019/09/13 18:51:34 (permalink)
    +2 (2)
    This is a seven year old topic. Please don't resurrect ancient posts, start your own topic for a new question.
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #10
    Jump to:
    © 2019 APG vNext Commercial Version 4.5