This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RS-232 connection

I have 2 processors and 2 RS-232 devices (slaves). I would like to connect the 2 RS-232 devices to each processor through RS-232 protocol. At any one time, only one processor is active. I would like the active processor to access both the RS-232 device.

Is it possible to use just 1 RS232 interface on the processor to connect to the 2 RS-232 devices?

If it is not possible, I would be able to allocate 2 RS-232 interfaces for the processor. Each RS-232 interfaces on the processor will  be connected to each RS-232 device. Another question is that the one RS-232 interface on the RS-232 device, can it be used for connecting to both processors? Is there a RS232 multiplexer chip to route the RS-232 signal from the RS-232 device to the active processor?

  • Wenjun,

    If the RS232 device has enough receivers and drivers for two RS232 ports then only one RS232 interface chip is required.
    If the processors allow voltage on it's I/O lines when it is disabled then both processors can be connected at the same time.

    Be sure that the driver logic inputs never float (DIN or TIN). A pull-up resistor can be used to prevent this possibility.

    Regards,
    Ron Michallick

     

  • Hi Ron,

    Thanks for your reply. What do you mean by RS232 interface chip? Is it a device that would help to multiplex 2 sets of RS232 to 1 RS232? When u mention I/O lines, do you refer to RS232. The 2 processors will be on - not disabled. What do you mean by allow voltage on its I/O line? I will be caution about the floating input pointer. Will either be using a PU or PD resistor to do that.

    My device only has 1 RS232 interface. Hence I would need to use this 1 RS232 interface to connect to 2 processors. I read that RS232 is a point-to-point topology (1 driver, 1 receiver). Hence I thought that 1 RS232 interface cannot be connected to 2 processors. I am not very sure about the reason for why RS232 can only be used for 1 driver 1 receiver. Is it because of fanout issue (the voltage will drop significantly if 1 RS232 is used to drive 2 sets of line? Or is it that if 1 processor send something out from its RS232, the other processor will also receive the signal on the same line, which is a output line. Hence receiving some signal on an output line may spoil the processor RS232.)

    Besides wanting the device to be connected to 2 processors, I would also like to have 2 such devices. In the end, there are 4 sets of connection.

    Device A (RS-232 Interface A)-> Processor A (RS-232 Interface A)

    Device A (RS-232 Interface A)-> Processor B (RS-232 Interface B)

    Device B (RS-232 Interface A)-> Processor A (RS-232 Interface A)

    Device B (RS-232 Interface A)-> Processor B (RS-232 Interface B)

    I should be trying out the following connection.

    1. Using splicing to connect Device A to the 2 processors. Do the same for Device B also.

    2. Using an external circuitry (buffer, multiplexer) to connect the Device to processor (so that only 1 processor is accessing the device at any one time).

  • Wenjun,

    The RS232 interface chips convert RS232 (>+/-5V) to logic level signals. We have many options.
    http://focus.ti.com/paramsearch/docs/parametricsearch.tsp?family=analog&familyId=543&uiTemplateId=NODE_STRY_PGE_T

    The RS232 lines are used in point to point communication, not  shared.
    Logic lines can be shared if only one output is active at a time.

     

  • Did you consider using RS485, which includes multidrop capability?

    Another possibility would be to use an MSP430 as RS232 hub.

  • I am actually using hardware that people have created to integrate into a system. The hardware is not built specially for this system but can be used. As RS485 is being used for other integration of card and the device is using RS232, I cannot be using RS485, must use RS232.

    The processor card I am using is actually using a RS232 transceiver (which is the link u have recommended). I would like to clarify the following.

    processor (uart interface) -> RS232 transceiver -> connecting cable -> RS232 device

    On the connecting cable, the signal is RS232. On the interface between processor and RS232 transceiver is logic logic level signal. Is that correct?

    If that is correct, I am trying to connect "processor (uart interface) -> RS232 transceiver" to the "RS232 device". Hence if RS232 is point to point communication, I cannot use your suggested method.

    Why is RS232 point to point? Could I violate this and try to use splicing cable to connect it to 1 driver, 2 receiver. What would be the repercussion?

    I am also intending to create circuitry (consisting of multiplexer and buffer) to connect it physically to 1 driver, 2 receivers. But the circuitry will make it logically connected to 1 driver, 1 receiver at any one time. Do you think it is feasible?

    Thanks.

  • If you connect one driver to two receivers, you have:

    1) One TX from the PC. It could be spliced to two receivers.

    2) Two Rx from two devices. How can you possibly connect two drivers (one from each device) to a single Rx on the PC? The drivers are drivers, if you cannot shut them down, one of them could be trying to drive -5V, and the other one, +5V. Collision, data corrupted and danger of the drivers getting damaged.

    Regarding multiplexing, you would have to find a multiplexer that handles positive and negative signals.

  • Actually, I got 2 same processor cards, 2 same devices.

    The processor card has 2 RS232 interfaces, each to be connected to the 2 devices. 

    The device only has 1 RS232. I want to connect this 1 RS232 to the 2 processor cards. This will have the problem of potential spoiling the interface if both RS232 device try to send different signals to the processor card.

    So u r saying that the splicing method will not work. The circuitry method may work if I am able to find a multiplexer that handles positive and negative signals. Do you have any multiplexer to recommend? I believe an analog multiplexer which accepts voltages from -3 to -15V and 3 to 15V should work for RS232.

    What makes RS232 different from RS422 or RS485? Why is RS232 point-to-point, RS422 multi-drop (1 driver, many receiver), RS485 multi-point ( many drivers, many receivers, but only 1 driver can transmit at any one time)

  • Specifically, RS485 and RS422 are designed and tested with multidrop applications in mind. They are designed and tested to withstand and survive a collision with no damage. RS-232 on the other hand, since it was never defined for that, are not designed nor tested (as far as I know) with collision requirements in mind.

    I don't know of a suitable MUX, in your case, and if I were going to do special purpose H/W, I would consider a microcontroller or CPLD. It will be not so more expensive to build, and would save a lot of pain while debugging (so I think).

    About RS485 and 422:

    http://www.ti.com/lit/an/slla070d/slla070d.pdf

     

     

  • Avi Shalom,

    RS2323 its not acting as a bus. For multi  nodes you need RS485 instead RS232

    Thanks

    Haim