Sign in

Not a member? | Forgot your Password?

Search Comp.Arch.Embedded

Search tips

Free PDF Downloads

Advanced Linux Programming

What Every Programmer Should Know About Memory

Introduction to Embedded Systems

C++ Tutorial

Embedded Systems - Theory and Design Methodology

Microcontroller Programming and Interfacing

Introduction to Microcontrollers


More Free PDF Downloads

Recent Blogs on EmbeddedRelated

The CRC Wild Goose Chase: PPP Does What?!?!?!
posted by Jason Sachs


Ada - 7 Segments and Catching Errors
posted by Mike Silva


Project Directory Organization
posted by Stephen Friederichs


OOKLONE: a cheap RF 433.92MHz OOK frame cloner
posted by Fabien Le Mentec


Practical protection against dust and water (i.e. IP protection)
posted by Dr Cagri Tanriover


Introduction to Microcontrollers

1 - Beginnings

2 - Further Beginnings

3 - Hello World

4 - More On GPIO

5 - Interrupts

6 - More On Interrupts

7 - Timers

8 - Adding Some Real-World Hardware

9 - More Timers and Displays

10 - Buttons and Bouncing

11 - Button Matrix & Auto Repeating

12 - Driving WS2812 RGB LEDs

13 - 7-segment displays & Multiplexing

See Also

ElectronicsDSPFPGA

Discussion Groups | Comp.Arch.Embedded | Serial port multiplexing? How to?

There are 13 messages in this thread.

You are currently looking at messages 1 to 10.


So far in October, you have voted 0 times ou of a total of 0 votes by the community.
Please help us clean the archives from unuseful discussion threads by using the voting system! Details here.

Serial port multiplexing? How to? - ElderUberGeek - 2007-07-03 05:16:00

Hi. I have only one available UART on a micro but need to connect two
serial devices (chips on the same board). Is there some type of chip
that can be used that will accept two serial inputs and then I can use
a GPIO pin to switch between the sources? The two serial sources need
not be used together (meaning when one is being used, the other is not
required).

Thanks


Re: Serial port multiplexing? How to? - Jim Granville - 2007-07-03 05:52:00

ElderUberGeek wrote:

> Hi. I have only one available UART on a micro but need to connect two
> serial devices (chips on the same board). Is there some type of chip
> that can be used that will accept two serial inputs and then I can use
> a GPIO pin to switch between the sources? The two serial sources need
> not be used together (meaning when one is being used, the other is not
> required).

A HC4052 will MUX expand up to 4 channels, two ways. More than 4
would need a MUX & Demux in separate packages, or a SPLD, like
a 16V8.
The SPLD can priority encode the RX, into an INT pin, so any
RX start bit, can wakeup the uC, and select that channel,
as well as do the TX/RX Mux.

-jg




Re: Serial port multiplexing? How to? - Torbjørn Heltne - 2007-07-03 06:26:00

ElderUberGeek wrote:
> Is there some type of chip
> that can be used that will accept two serial inputs and then I can use
> a GPIO pin to switch between the sources?

Yes, but it depends on what you want to do. I feel that you have not 
given enough detailed information.

A good starting point might be the MAX 393.


-- 
Torbjørn Heltne

Re: Serial port multiplexing? How to? - Stef - 2007-07-03 06:50:00

In comp.arch.embedded,
ElderUberGeek <a...@gmail.com> wrote:
>
> Hi. I have only one available UART on a micro but need to connect two
> serial devices (chips on the same board). Is there some type of chip
> that can be used that will accept two serial inputs and then I can use
> a GPIO pin to switch between the sources? The two serial sources need
> not be used together (meaning when one is being used, the other is not
> required).

If you can leave both connected to Tx, you can switch Rx with a single
7400. If your Rx's remain quiet when not in use and they are open drain,
you can just connect them together. Both assuming you are dealing with
logic levels.


-- 
Stef    (remove caps, dashes and .invalid from e-mail address to reply by mail)


Re: Serial port multiplexing? How to? - dowlers - 2007-07-03 06:51:00

If you have 2 spare GPIO you can implement it in software.



Re: Serial port multiplexing? How to? - runner - 2007-07-03 09:30:00

"ElderUberGeek" <a...@gmail.com> wrote in message
news:1...@g37g2000prf.googlegroups.com...
>
> Hi. I have only one available UART on a micro but need to connect two
> serial devices (chips on the same board). Is there some type of chip
> that can be used that will accept two serial inputs and then I can use
> a GPIO pin to switch between the sources? The two serial sources need
> not be used together (meaning when one is being used, the other is not
> required).
>
> Thanks
>

I used a 74126, but it was not so intuitive as both TX and RX must
stay high while idle. When you switch one of the sources off you have
to make sure it doesn't pull the line down. (we're talking about 0/5V)
A relay works either.




Re: Serial port multiplexing? How to? - Mark Borgerson - 2007-07-03 11:30:00

In article <1...@g37g2000prf.googlegroups.com>, 
a...@gmail.com says...
> 
> Hi. I have only one available UART on a micro but need to connect two
> serial devices (chips on the same board). Is there some type of chip
> that can be used that will accept two serial inputs and then I can use
> a GPIO pin to switch between the sources? The two serial sources need
> not be used together (meaning when one is being used, the other is not
> required).
> 
> Thanks

In a similar situation,  I used at TI  TS3L110DR    IC LAN switch.

It's basically a quad 1 of 2 multiplexer with the added advantage
that the ports are bidirectional.   

Mark Borgerson


Re: Serial port multiplexing? How to? - David Kelly - 2007-07-03 18:06:00

ElderUberGeek wrote:
> Hi. I have only one available UART on a micro but need to connect two
> serial devices (chips on the same board). Is there some type of chip
> that can be used that will accept two serial inputs and then I can use
> a GPIO pin to switch between the sources? The two serial sources need
> not be used together (meaning when one is being used, the other is not
> required).

As has already been said, "You haven't provided enough information."

If the two chips need to communicate to each other, and one needs to 
communicate with the outside world but the other does not, then look at 
an SPI between the chips. Is likely your MCUs already have SPI modules, 
if not its terribly easy to make in software. Especially easy when you 
are writing both ends.

If both MCUs need to communicate to the outside world, consider daisy 
chaining. Connect one to the RxD coming in, its TxD to the other MCU's 
RxD, and the 2nd MCU's TxD to the outgoing TxD. The first MCU keeps 
everything it recognizes and passes the rest and new data it has created 
to the second. The second MCU keeps everything it recognizes and passes 
the rest to the outside connector while possibly adding some new data.

Daisy chaining requires no additional hardware, only a bit of software.

Re: Serial port multiplexing? How to? - Marra - 2007-07-03 19:48:00

On 3 Jul, 10:16, ElderUberGeek <aribl...@gmail.com> wrote:
> Hi. I have only one available UART on a micro but need to connect two
> serial devices (chips on the same board). Is there some type of chip
> that can be used that will accept two serial inputs and then I can use
> a GPIO pin to switch between the sources? The two serial sources need
> not be used together (meaning when one is being used, the other is not
> required).
>
> Thanks

If both dont communicate at same time a simple and gate would do the
trick.


Re: Serial port multiplexing? How to? - TT_Man - 2007-07-04 19:04:00

"Marra" <c...@talktalk.net> wrote in message 
news:1...@o61g2000hsh.googlegroups.com...
> On 3 Jul, 10:16, ElderUberGeek <aribl...@gmail.com> wrote:
>> Hi. I have only one available UART on a micro but need to connect two
>> serial devices (chips on the same board). Is there some type of chip
>> that can be used that will accept two serial inputs and then I can use
>> a GPIO pin to switch between the sources? The two serial sources need
>> not be used together (meaning when one is being used, the other is not
>> required).
>>
>> Thanks
>
> If both dont communicate at same time a simple and gate would do the
> trick.
>
Simpler than that.... a few diodes as he doesn't have concurrent I/O 
conflicts....Rxd on Micro may need a pullup...

Tx1 -I<I------I------ RXd on Micro
                    I
Tx2 -I<I------I

Tx on Micro---I-------Rxd1
                        I------Rxd2 



| 1 | |