• AVR Freaks

Identifying my USB device on the list of available SerialPorts

Author
RobH101
New Member
  • Total Posts : 2
  • Reward points : 0
  • Joined: 2010/03/19 05:06:00
  • Location: 0
  • Status: offline
2011/04/30 09:14:02 (permalink)
0

Identifying my USB device on the list of available SerialPorts

Hi,

I am using a PIC18F4550 with CDC Basic Demo to control a custom-built High-Voltage power supply over USB.
I can communicate with the PIC using the SerialPort Class in VB2008 Express under WinXP.

I can identify all the available SerialPorts by using:

nameArray = SerialPort.GetPortNames

Is there an easy way of identifying my particular USB device on the list of available SerialPorts?
( Bearing in mind that the SerialPort number will change, depending on which physical USB port I am connected to. )

Many Thanks,

Rob H.
#1

2 Replies Related Threads

    RLmonitor
    Starting Member
    • Total Posts : 81
    • Reward points : 0
    • Joined: 2008/05/13 18:00:01
    • Location: 0
    • Status: offline
    Re:Identifying my USB device on the list of available SerialPorts 2011/05/02 19:09:50 (permalink)
    0
    Search for MahUSB by Mike Heydon 2007 - Delphi code.
    Or HWdetect for cpp - http://www.codeproject.com/KB/system/HwDetect.aspx

    I have used the Delphi code to get this information ...
    COM13 : \Device\USBPDO-12
    Silicon Labs CP210x USB to UART Bridge (COM13)


    It's also useful to get notification from Windows that the USB device has been removed, as some drivers behave badly if the port is open.
    #2
    chinzei
    Super Member
    • Total Posts : 2250
    • Reward points : 0
    • Joined: 2003/11/07 12:39:02
    • Location: Tokyo, Japan
    • Status: offline
    Re:Identifying my USB device on the list of available SerialPorts 2011/05/02 20:04:59 (permalink)
    0

    For VC++ and C#
    http://www.microchip.com/forums/fb.ashx?m=560081

    bmwman91 posts snippets using WMI (System.Management class) for .NET
    http://www.microchip.com/forums/fb.ashx?m=560485
    http://www.microchip.com/forums/fb.ashx?m=560699

    Tsuneo
    #3
    Jump to:
    © 2019 APG vNext Commercial Version 4.5