I need 2 simple Asyncronous serial ports on a laptop without any serial ports. I have found many USB to RS-232 and a few USB to RS-422/485 modules, but have not able to find a reasonably priced unit that has one RS-232 port and one RS-422/485 port. We are currently using a separate USB to RS-232 and USB to RS422/485, but the "COM" port changes depending on the sequence in which they are plugged in. This is for a test system where the people are fairly clueless, and I want something that stays consistant.
When the are both plugged in goto the device manager of the computer and bring up the comm ports. There should be advanced properties and dig around and you should be able to change from auto to a specific com port so that it gets the same letter everytime.
If that doesnt seem to work get two 232 usbs and one converter, rs232 to rs485. Though this will likly require an external power pack. They are normally $50 to $99 though, it depends on how many things are on the rs485 network, if its the full 32 then you need alot of power so the external power pack ones are always a good idea.
I have units which feature an isolated RS-232, RS-422, or RS-485 port. The interfaces are wired in parallel so there is no need to select the mode, just use the DB-9 or the screw terminals.
The units have unique serial numbers which means that windows will allow more than one or two (I have stacked 5 or more) without getting confused or losing track of which serial port number it was assigned to it. Since these are single port units you would need two. Let me know if you are interested and I can email you the data short.
The RS-232/422 conversion is trivial, but if RS-232/485 conversion is required, the converter becomes quite complex. Don't expect to be able to use RTS data direction control over USB (or Ethernet), since the latencies even in direct PCI connection with software RTS data direction control are often too long.
I always use a small dedicated micro to handle the line turn-around in RS-485 interfaces. When the control micro is locked to the baud rate it is possible to have a very tight line turn-around which I usually set to be around 2 bits.
I have separate USB to RS-232 and USB to RS-422. The problem is that depending on which ports the devices are plugged in, or in which sequence the COM port changes. I have found USB to 2 and more RS-232 ports, but not to a mixture of RS-232 and RS-422/485 ports. I do not need the multidrop functionality of RS-485. I am using full duplex comms.
And you've been told how to fix that. Didn't it work? I know you can fix that easily under Linux -- all of my USB serial ports show up with pre-configured device names no matter what order I plug them in.
--
Grant Edwards grante Yow! I brought my BOWLING
at BALL -- and some DRUGS!!
Yes, I forgot to mention that. I have not tried it yet, and I am sure it would work. For future reference though, it is always good to find suppliers of these sort of things. Having two separate units for 2 channels is fine, but if I need more in the future, then I would like to know I can get them, and from where.
Since you mention it, how does one fix it in Linux ?
They make USB chips and a range of ready-made modules. I don't know if they have one with both an RS-232 and an RS-485 interface, but they have a dual-Uart USB device (their Uarts support RS-485 directly) so you could quickly make one from their evaluation kit and a couple of driver chips.
They also have information about how to get the virtual comms ports numbered by USB location rather than randomly.
No, but it does mean that certain assumptions are being made, primarily that when the transmit data stops for two bit times, the line can be turned around.
The converter needs to know the bit rate, number of data and stop bits and also if parity bit is used. In this way, the converter can always detect the start bit correctly even in a string of characters and thus also knows when the (last) stop bit is expected. The transmitter can be turned off immediately after the stop bit(s), but to avoid problems with propagation delays and badly terminated lines, the transmitter may be on for an additional 1-2 bit times, in case the start bit of next character arrives before that.
If the bit rate is known, but not the character length, you must assume that the last "0" bit detected is a start bit and wait for about 11 consecutive "1" bits before turning off the transmitter. This is sufficient for the Modbus protocol which uses a 3.5 character pause (35-40 bit times) as the end of frame marker, thus, no responses can arrive before that. However, in protocols with distinct end of message characters especially with low line speeds and high performance processors, the slave may respond in much less than a single character time and relying on the last "0" bit as a worst case start bit will fail.
However, if only short distance test transmissions e.g. on the lab bench is required, simply use the RS-485 as a CANbus style wired-OR configuration. The transmitter is driven active only by the "0" (dominant) serial bit, but is put into passive tri-state when the "1" bit or intercharacter idle is to be transmitted, the "fail-safe" termination will pull the bus into the "1" state. This will however reduce the noise margin and thus, should not be used with long cables or in a harsh environment.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.