Shop OBEX P1 Docs P2 Docs Learn Events
(old, please remove)Prop Plug (software) popup — Parallax Forums

(old, please remove)Prop Plug (software) popup

computer guycomputer guy Posts: 1,113
edited 2009-10-09 08:20 in Propeller 1
Hello Everyone,

I have been prototyping a lot of projects that use the prop plug for serial communication and have been getting sick of having to constantly select the com port that the prop plug is connected to (and it varies).

So I contacted FTDI and got my own USB PID and reprogrammed the FTDI chip on my prop plug.
This now allows me to automatically identify which port the prop plug has been assigned using a class in VB.NET and the VID and PID.

Here is a screenshot of how the prop plug is identified in Device Manager after the changes:

attachment.php?attachmentid=64291

attachment.php?attachmentid=64293

If anyone is interested in doing this than please post a reply below.

It is now so much easier to write software that can directly identify the prop plug.

I would now like to be able to get windows to identify it as a HID device, this is way past my knowledge though.
Maybe I will just have to write some software that reads the serial data and get the software to emulate a HID device.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Building Blocks To The Propeller Chip A web site designed to help people who are new to the propeller chip.

Guitar Hero controller using the prop (WIP) --> HERE

Post Edited (computer guy) : 10/12/2009 5:41:20 AM GMT
796 x 580 - 21K
796 x 581 - 23K

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-10-09 02:26
    I don't (and won't) use any .NET stuff, but this is intriguing. Can you provide more details as to how this helps? My usual recourse is to invoke Propellent to ID a connected Prop and use the COM port that it returns for further communication. The main advantage is that it's native-comm vs. FTDI agnostic.

    -Phil
  • computer guycomputer guy Posts: 1,113
    edited 2009-10-09 02:32
    By using a custom and unique PID you can then write a class (in the programming language of your choice) to search for this PID and identify which com port number has been assigned to it.

    For example, any application I write that needs to use the prop plug can now call
    comPort = USBPortEnumerator.GetCOMPortNumberForUSBDevice("0403", "95A8")
    
    



    This will get the com port number that the prop plug has been assigned.
    If my prop plug isn't plugged in then it will return null.

    95A8 is the unique PID that my prop plug has. No other USB device in the world has VID: 0403 and PID 95A8.

    I hope this has helped.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Building Blocks To The Propeller Chip A web site designed to help people who are new to the propeller chip.

    Guitar Hero controller using the prop (WIP) --> HERE
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-10-09 02:35
    Can you then connect to the Prop without resetting it?

    -Phil
  • computer guycomputer guy Posts: 1,113
    edited 2009-10-09 02:42
    The propeller resets when the prop plug is connected so that it can be programmed.
    This modification will not stop the propeller resetting. If you want to stop the propeller reseting when the prop plug is connected then I would suggest puting a switch between the RES pin on the prop plug and the propeller chips reset pin.

    This modification is used to identify the prop plug in software without having to manualy identify the com port number that has been assigned.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Building Blocks To The Propeller Chip A web site designed to help people who are new to the propeller chip.

    Guitar Hero controller using the prop (WIP) --> HERE
  • BradCBradC Posts: 2,601
    edited 2009-10-09 03:52
    computer guy said...
    The propeller resets when the prop plug is connected so that it can be programmed.
    This modification will not stop the propeller resetting. If you want to stop the propeller reseting when the prop plug is connected then I would suggest puting a switch between the RES pin on the prop plug and the propeller chips reset pin.

    Or just open the port without touching the DTR pin.

    You can't do that on MacOS though [noparse]:([/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    lt's not particularly silly, is it?
  • computer guycomputer guy Posts: 1,113
    edited 2009-10-09 04:07
    BradC said...
    computer guy said...
    The propeller resets when the prop plug is connected so that it can be programmed.
    This modification will not stop the propeller resetting. If you want to stop the propeller reseting when the prop plug is connected then I would suggest puting a switch between the RES pin on the prop plug and the propeller chips reset pin.

    Or just open the port without touching the DTR pin.

    You can't do that on MacOS though [noparse]:([/noparse]

    What kind of stupid software developer within apple came up with that idea.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Building Blocks To The Propeller Chip A web site designed to help people who are new to the propeller chip.

    Guitar Hero controller using the prop (WIP) --> HERE
  • computer guycomputer guy Posts: 1,113
    edited 2009-10-09 08:20
    I just finished writing a small application in VB.NET that runs in the background and when I connect my prop plug it notifies me and tells me what com port it is connected to.
    When my prop plug is disconnected it also tells me. (This is usefull if you have little kids that like pulling on leads tongue.gif )

    attachment.php?attachmentid=64298

    The popup takes about 3 seconds to fade.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Building Blocks To The Propeller Chip A web site designed to help people who are new to the propeller chip.

    Guitar Hero controller using the prop (WIP) --> HERE
    535 x 308 - 20K
Sign In or Register to comment.