Continue to Site

Welcome to

Welcome to our site! 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.

duplicating serial port with relays

Not open for further replies.


Full Member level 1
Oct 27, 2010
Reaction score
Trophy points
Activity points
If my controller card has only 2 serial ports and I want to use one as a monitor but I need 2 more, can I just use relays to switch the ttl receive and send to another rs232 port? Essentially, I would have a double pole double throw switch. The controller card would send a command to 1 serial port, wait for a response, then switch to the other and do the same. Can someone tell me why that wouldn't work?

if you have a couple of spare digital IO pins (one for itransmit and one for receive) you can implement a UART in software, e.g.
**broken link removed**
@burger, which card/board do you have? does the usart works at TTL level or RS232 level?

does the communication is continuous? is it polled? is it bidirectional with any of the devices you wan to communicate? half-duplex (one at a time)? or full duplex (tx/tx at the same time)?

@horace1 is right, you can implement a simple UART in software with timers and/or delays

but your idea is kind of right... If the data is in TTL level I would use some kind of mux/demux logic instead of relays, and if its all in RS232 level I would use some serial splitter or combiner, or relays as you suggested.
Thanks for the replies. Its a TS-5300 from Technologic Systems. It has (2) serial ports. Com2 will be used as a monitor and Com1 is going to be used to communicate with a LCD/keypad module. Both serial ports are RS-232, full duplex. I'm also using some ttl<->RS-232 converters so I could easily use some extra pins to implement another serial port. Thanks for the link horace1.

Depending on how these modules work ( e.g. sending data packs continuously, or just replying a request as a slave device ) you can multiplex just the TX pin of an UART due is you who will define time allocation of communication for each one. The RX pins in this case could be connected by diodes.
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to