2
\$\begingroup\$

The following image describes the problem:

Bus Contention

Processor 1 has no RS232 channel, but has an SPI one, so we used a UART driver and a level translator ICs.

The two processors are on separate boards, and the RS232 receiver will be connected to them by one cable that will be split into two to be connected to each board.

How can we solve this bus contention problem?

Edit #1

Unfortunately, I can't modify hardware. Is there any software solution?

Edit #2

I thought of a solution but don't know if it's applicable or not. I read through the MAX3223 level translator chip datasheet, and found that if the input level to the IC is undefined "Irrelevant", the output is high impedance. I found the following function table in its datasheet:

enter image description here

In my circuit, FORCEON and EN~ signals are tied low and FORCEOFF~ is tied high.

How can I send an unidentified level to it?

\$\endgroup\$
6
  • \$\begingroup\$ You have a fundamentally flawed architecture. \$\endgroup\$ – Olin Lathrop Feb 20 '12 at 12:51
  • 1
    \$\begingroup\$ @Abdella - The data sheet is saying that if /FORCEOFF is held low, the output will be high-impedance regardless of the state of DIN. But since you say that /FORCEOFF is tied high in your circuit, this will not help you. In any case, how would Processor 1 and Processor 2 negotiate who has control of the bus? \$\endgroup\$ – MikeJ-UK Feb 20 '12 at 12:52
  • \$\begingroup\$ @MikeJ-UK, there is no negotiation. Processor 1 will be used first, then Processor 2. They're both separated and the user will not use them in parallel. But even this won't solve the problem, there will always be an output on the RS232 link. I need to put one of them in the High impedance state. \$\endgroup\$ – Abdella Feb 20 '12 at 13:26
  • \$\begingroup\$ Can you control the output on Processor 2? Is it possible to put the RS232 pins into high impedance or input only modes and ignore those pins? If you can put those pins into an inactive mode any time the forceoff is inactive on the level shifter you can probably make this work. Although it isn't the best solution but sometimes you have to work with poor constraints. \$\endgroup\$ – Mark Smith Feb 21 '12 at 15:52
  • \$\begingroup\$ @MarkSmith , Processor 2 is a computer processor running windows or linux, the motherboard contains RS232 COM port. Is it possible to put this PC RS232 port in high impedance or input mode? \$\endgroup\$ – Abdella Feb 21 '12 at 16:11
4
\$\begingroup\$

This is not bus contention - there is no bus. RS-232 simply doesn't work the way you want it to. Period. End of story. It's point-to-point and not a bus. I've seen serial cards in laptops get destroyed because of 'clever' wiring schemes.

You talk about applying an undefined level to it and ask how you can do that. It also can't be done. It makes no sense to produce an 'undefined' voltage - when the electrons hit the other end the voltage is defined, period. You can't send an undefined voltage level to it.

You'll probably reply with a comment to this post asking if this response is for real. It is. You can do nothing to solve this without putting some sort of arbitrator where the two red wires meet. And as you said - that involves new hardware. So game over.

RS-232 simply does not work this way and you will probably damage things trying to make it work.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks for clarifying expressions. Fundamentally, you're right. It's the circuit's designer fault. I'm a PCB designer and trying to find some trick! \$\endgroup\$ – Abdella Feb 20 '12 at 13:36
2
\$\begingroup\$

You could use an RS232 multiplexer. Eg. http://www.maxim-ic.com/app-notes/index.mvp/id/588

However, you may need to modify the software at your RS232 receiver to demultiplex the signal.

\$\endgroup\$
3
  • \$\begingroup\$ Unfortunately, I can't modify the hardware. Is there any software solution? \$\endgroup\$ – Abdella Feb 20 '12 at 12:02
  • \$\begingroup\$ Nothing obvious, no. \$\endgroup\$ – Toby Jaffey Feb 20 '12 at 12:07
  • \$\begingroup\$ Kindly check Edit #2 \$\endgroup\$ – Abdella Feb 20 '12 at 12:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.