USB to 232 Converter Question

USB to 232 Converter Question

Post by Tim C » Wed, 06 Feb 2008 00:10:08


Hello
 
I an working on a project that will use LV to send a string to a 8051 MCU.  Prior to my knowledge of the NI USB-232 device that already has a driver written I spec'ed a radio shack USB to 232 cable.  I selected that cable because I have used it in the past and it alwasys seemed to work without a problem.
 
BUT (isn't there always a but)  I noticed that sometimes when the cable is plugged into the PC it does not always get configured as the same com port. 
 
My question is this:  If I am not sure which com port will be created when the USB to 232 cable is plugged into the PC how can I get LV to find the correct com port so it can send the sting to the MCU?
 
Best Regards
Tim C.
 
 
 

USB to 232 Converter Question

Post by Jason » Sat, 02 Aug 2008 12:40:06

I know that I am replying to an old thread, but I thought I would fill in some information for anyone else who happens upon this. Windows utilizes the product serial number in order to uniquely identify USB devices on the system. If there is no serial number (which is optional for USB devices), the device is identified by the USB port to which it is connected.Many "electronics store" USB to serial converters (and even some more expensive ones) do not provide serial numbers, so Windows has no way to recognize when the same hardware is plugged into a different USB port. This means that any time you switch USB ports, you are likely to receive a new port number.You will probably always receive the same port number as long as you are careful to always use the same USB port. This should not be a problem with any product which supplies a unique serial number to Windows, although this is dependent on the individual driver implementation. Unfortunately is is virtually impossible to tell without buying a product whether it will identify itself in this way. All NI USB-232 and USB-485 products identify themselves uniquely to the operating system, and we take care to ensure that you
will always receive the same port number, even when switching USB
ports.-Jason S.National Instruments