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.

Please help me build a UART 2:1 Switch ???

Status
Not open for further replies.

abishek007

Junior Member level 3
Junior Member level 3
Joined
May 20, 2008
Messages
26
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,500
Hi All,

I was wondering if it would be easy to make a 2:1 UART programmable switch for UART ports. Also on the programming side I just need to select which UART input port ( 2 UART input ports and one UART output port ) to select...

-- --
| | | |
--------------
| |
| |
--------------
| |

some thing like this :)

-Abishek
 

Is it a two-way UART (both sides can transmit and receive)?

What are you resources (mechanical switch / programmable logic device)?

Generally, you better make sure that the RX input of the receiver that is currently disconnected from the TX source, will get a logic "1" (which is the idle state of a UART).
 

Hi Yoramgr,

Yeah its a 2 way UART... I would love to use a logic device to complete this task. currently I am using 2 Different UART's as input from 2 different sources.. I connect 1st UART do some operations disconnect the first UART connect the second UART do some operations... I was wondering if i could build some thing to automate this mechanical work...

I would appreciate for your reply...

Thanks,

-Abishek
 

OK, could you please give some details:

1. Is it a "standard" PC COM port?
2. What are the voltage levels for "0" and "1"?
3. What baud rates should it support?
 

1. Standard PC COM port.( RS232). would love if it can support both ( RS232 and RS422 )
2. The voltage levels for RS232 is 3.3V or 5V for a “1”, and GND for a “0”. RS422 is differential signaling.
3. The baud rates should support 115.2k minimally, better if it can support up to 3Mbps or 4Mbps.

thanks,

-Abishek
 

The voltage levels for RS232 is 3.3V or 5V for a “1”, and GND for a “0”.
The description applies to a TTL UART level, which is inverted compared to RS232. Standard RS232 is involving a bipolar voltage of at least +/- 3V. The idle state (bit value of "0") is indicated by a negative (low) voltage.
 

I can go with standard RS232.... I just want to remove the mechanical work :(
 

I can go with standard RS232.... I just want to remove the mechanical work
A multiplexer is possible for different serial interface standards, but more simple at the logic level, because you can use standard logic ICs. You didn't yet manage to tell clearly if you're talking about RS232 or logic level UART.
 

It's RS232...

Thanks,

-Abishek
 

The RS232 standard defines a negative voltage in the range of -3V to -15V as “1”, and a positive voltage in the range of +3V to +15V as “0”. The PC port usually use -10V and +10V levels.

RS422 use lower voltage, differencial (usually 3.3V or 5V).

A simple option would be to add a new COM port to your PC. There are inexpensive USB-to-Serial cables you can buy, so you could connect your two devices to the PC, and switch between them in software (by selecting different COM port in your PC software settings).

If you want to use your single PC port and build some switch, a simple option would be to use small low power relays. The attached schema is an example for COM port with cable that uses RX and TX signals only. If your devices require the other handshake signals as well (like DTR, RTS, etc.), you'll need to add more relays for them, and to connect the relay coils in parallel. Match the relay coil voltage to your available V+ DC power supply voltage.

You can use this circuit for RS422 as well, with different cable that supports RS422 signals.
 

Attachments

  • UART_Switch.pdf
    6.3 KB · Views: 192
Hi abishek007,

May be you can use an integrated mux like the **broken link removed** witch is an hi voltage dual 2:1 mux, or electronic switches like **broken link removed** from maxim-ic too.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top