Newbie: 2 serial conversations

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?

Reply to
News
Loading thread data ...

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

Reply to
Paul Burke

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 
Newsgroup new user info: http://vancouver-webpages.com/nnq
Reply to
Peter Bennett

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

Reply to
Stef

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.

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

Reply to
Thad Smith

"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.

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.

Reply to
Lewin A.R.W. Edwards

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.