Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Is it possible to connect two PCS via serial port with one microcontroller

Status
Not open for further replies.

Mithun_K_Das

Advanced Member level 3
Joined
Apr 24, 2010
Messages
896
Helped
24
Reputation
48
Reaction score
25
Trophy points
1,318
Location
Dhaka, Bangladesh, Bangladesh
Activity points
8,227
Is it possible to connect two PCS via serial port with one microcontroller with only one pair of Tx-Rx?

I want to know is it possible to use two COM ports via MAX232 with a single microcontroller? Note that Only one of these com port will be used to communicate. Another one will be standby. If one is not working for any reason, another one can be used alternately.
 

Hi,

No. Not as long as you like to comply with specification.

* RS232 is point-to-point, it is no bus.
* In RS232 there is no "standby" in the meaning of High-Z of Tx ... allowing other member to drive the Tx.

Klaus
 

Without considering whether it's a PC or anything else, if two devices drive the same wire at the same time with different data there will be a collision and one or both drivers will be overloaded. Current will flow through the high side driver of one device then through the low side driver of the other, effectively shorting the supply. In practice, drivers usually have some degree of protection against overload but the resulting data in overloaded condition is indeterminate.

You CAN have more than one device listening to (receiving from) one driver because it is only monitoring the line, not influencing what is already there.

There are serial methods that allow more than one driver on a three wire connection, for example RS485, but they have protocols that ensure only one device is driving at a time.

Brian.
 
So is it possible to use 2 com like this: one is used to data communication. Another is just standby.

Add a relay 2 contact RT to commute RS232 level to One or Other PC
Relay driven by Human choice ! or by a MCU output wich match some confitions

or a simple double inverter ..
 

There are means of sharing buses for very particular cases, for example by using diode in the RX of the device side, especially in the opposite situation (1PC + 2devices) where they only respond upon request, so that the general question as posed does not allow a precise answer, once we don't know how these modules work.
 

If a microcontroller is connected with PC via COM and it is working. Now if another COM (may be another PC) is used just to monitor their communication will it work?
 

As already clarified, the RS-232 standard doesn't provide a high-Z feature. As for standard RS-232 devices like PCs, the answer to your question in post #1 and #3 is clearly no.

Nevertheless some devices extend the RS-232 standard towards a multi-drop bus. There are RS-232 drivers with TX high-Z feature, and devices that use device addresses with three-stateable RS-232 driver operated similar to RS-485, e.g. VICI valve actuators in the lab automation. The operation is opposite to the intended operation, one PC and multiple peripheral devices controlled by one interface.

Monitoring with a second RS-232 is possible, but you cut to interrupt the TX line.
 

Yes, just join the grounds together and connect the RX pin to either the RX (monitor incoming) or TX pin (monitor outgoing) of the other computer.
If you have two serial ports you can connect the RX of one to the RX on the other PC and the RX or the other port to TX on the other PC, that lets you see the serial traffic in both directions. The golden rule is to NEVER connect two TX pins together!

Brian.
 
Yes, just join the grounds together and connect the RX pin to either the RX (monitor incoming) or TX pin (monitor outgoing) of the other computer.
If you have two serial ports you can connect the RX of one to the RX on the other PC and the RX or the other port to TX on the other PC, that lets you see the serial traffic in both directions. The golden rule is to NEVER connect two TX pins together!

Brian.
Yes! It works. I tested it before while working with GSM module and microcontrollers and monitoring their data communication from PC connecting a TTL-USB converter connecting their Tx Rx pins. But only module Tx to TTL to USB converter's Rx works fine. But if I connect TTL to USB converter's Tx to MCU Tx >>> problem here. TTL to usb converter become hot.

Thanks for your suggestion.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top