Newbie: 2 serial conversations

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
I want to receive serial data from one machine, perform some logic, and
periodically send a different serial signal to another machine.

Do I need 2 separate UART's to do this?

Is there an MCU that that directly serves this particular need?





Re: Newbie: 2 serial conversations

Quoted text here. Click to load it


Not necessarily, but you'll probably find it easier. You could put a
multiplexer (74HC405x perhaps) on the output of the UART (before the
RS232 or whatever buffers) and use that to steer the connection. But
you'll have to be sure that the unselected channel never receives
anything while disabled, or you'll miss it.

An MSP430F147/8/9 has 2 UARTS, as does the XAG49 and several other MCUs.
Alternatively, depending on speed requirements, you could bitbang the
second channel.

Paul Burke



Re: Newbie: 2 serial conversations
On Thu, 4 Sep 2003 07:34:24 -0700, "News"

Quoted text here. Click to load it

If one path is receive only and the other is transmit only, and
neither uses any handshaking, you can use one UART for both paths -
but the receive and transmit sides must (usually) operate at the same
speed.


--
Peter Bennett VE7CEI        
GPS and NMEA info and programs: http://vancouver-webpages.com/peter/index.html
We've slightly trimmed the long signature. Click to see the full one.
Re: Newbie: 2 serial conversations
Quoted text here. Click to load it

If one channel is receive only and the other transmit only, this can be
handled by a single UART. But only if both baudrates are equal as most
UARTs do not support different baudrates for transmit and receive. If
you can make sure there is no incoming data at the time you want to
send, you could ofcourse re-program the baudrate between receiving and
sending.

Stef



Re: Newbie: 2 serial conversations
 
Quoted text here. Click to load it

No, assuming that your communication is strictly one way and that you
are using the same data rate for both ports.  You just connect lines for
TD and RD to different units.  If there are acknowledgment messages or
requests, or the data rate or format (data bits, parity) is different,
then you would need two ports.

Quoted text here. Click to load it

Many of the micro families have units with multiple serial ports on
board or you can use external UARTs if needed.  Look at a selection
guide for the micro family you are interested in.

Thad

Re: Newbie: 2 serial conversations
Quoted text here. Click to load it

"Yes" but one or both of them can be software-only UARTs if your MCU
is fast enough and/or the serial streams are slow enough.

Quoted text here. Click to load it

Numerous, numerous, numerous MCUs have more than one UART. What speed
is the serial link, and how much "logic" is in the middle? Are there
large buffering requirements? If your processing requirements are
small, and the serial streams are slow (kilobits rather than megabits
per second) you can certainly do it in a small 8-bitter; 8051 variant,
PIC, AVR, ... - in some cases you would need to implement at least one
software UART.

Site Timeline