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.

Current loop and RS232 on single UART

Status
Not open for further replies.

stoyanoff

Full Member level 4
Joined
Aug 10, 2011
Messages
195
Helped
8
Reputation
16
Reaction score
8
Trophy points
1,298
Activity points
2,725
Greetings! I have to combine current loop and RS232 or RS485 and RS232. I have 2 free UART interfaces on a PIC uC and I have connected to them a current loop and RS485. I`m using 6N136 optocouplers for the current loop and SP485EEN for RS232. Now I have to add additional RS232. So it must share one of the UARTs. What`s bothers me is the input signal RX. I don`t think RX of MAX232 could be driven to high impedance state. So what can I do? I have seen devices with multiple interfaces on single UART - RS232,RS485 and so on... How do they achieve it?
Thanks!
 

Hi,

There are external UART devices.
********
Without external UARTs you may use:
* diodes + pullup to create "wired AND"
* AND gates
* three state buffers
* MUXes (digital as well as analog)
* PLDs, FPGA
* different microcontroller
...

You see there are plenty solutions you may choose..

Btw: for more detailed answers you should post a sketch about your application. Signal flow with informations like usage timing, baud rates, transmitted data information, micrcontroller type...and so on. Even hand drawn is better than text.

Klaus
 

Diode + pull up is it going to work? I though about this option but I think it has to be a pull down and it changes the logic of operation - it inverts the data... I`ll do a few simos...
 

Hi,

You did not draw a circuit to find out how it works...
Do this.

--> a diode is a passive device, it is impossible to generate inverted output.

With pull down you may generate "wired OR"....but since UART is "idle HIGH" you rather need "wired AND".

I will come back after you posted a drawing...

Klaus
 

So what can I do? I have seen devices with multiple interfaces on single UART - RS232,RS485 and so on... How do they achieve it?
simple, presuming you don't want to carry different data down them simultaneously to one of the UARTS: The RX signal to the PIC is at logic levels so steer it with a logic signal from one of the IO pins. Depending on what PIC you are using, you might be able to re-assign the RX pin using the pin mapping registers so both are connected but only the desired one is internally connected to the UART module.

Brian.
 

betwixt, this is good idea, but it`s not suitable in my case. I don`t like the idea to use diodes to make AND. I`m afraid the voltage levels will not be suitable for the uC logic. So I decided to use a standard AND element! It will do the job 100%!
Thanks!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top