This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

UART Communication Question

Other Parts Discussed in Thread: MSP430G2553

Currently I am working on a project which requires PC could communication with two msp430g2553. I am planing to use UART to realize the communication. However, that requires me to connect the UART TX pins of two MSP430 together. Our design is different MSP430 sends data back at different time period, but the data collision my also happens.

I am  wondering when two UARTs transmit simultaneously on the same wire what will happen.Will that burn any thing or MSP430 can protect itself?

Besides, in our design, we didn't use any driver to drive the signal output of UART, which means we will transmit directly with TTL level. Is this a legal design for msp430?

Many many thanks!

  • Yunxi Guo said:
    I am  wondering when two UARTs transmit simultaneously on the same wire what will happen.Will that burn any thing or MSP430 can protect itself?

    The stronger signal will win. Typically devices can sink more current than they can source, which means a logic low will beat a logic high. Regardless, when the signals are in competing states, you will draw a lot more current.

    I would recommend using some sort of priority mux device to control which MSP's UART has control over the communications line.

    Yunxi Guo said:
    Besides, in our design, we didn't use any driver to drive the signal output of UART, which means we will transmit directly with TTL level. Is this a legal design for msp430?

    Depends on what you are transmitting to. If you are sending to a PC, then no. In fact, you will most likely blow out the RX pin if it is directly connected to a PC's RS-232 port. On the TX side, you have nowhere near enough voltage swing for the PC to recognize the signal as valid data. There also exists the fact that RS-232 data is inverted on the physical line. So even if the PC could see the transitions, it would indicate an error state when idle and most likely framing errors. Either way you would never get your real data on the PC.

  • Thank you very much for your quick reply!

    Does that mean when there is signal collision, the power consumption will be larger but it won't burn the UART transmitter? 

    Thanks again!

  • Yunxi Guo said:
    but it won't burn the UART transmitter?

    I didn't say, and can't guarantee that. You should look at the device-specific datasheet and see what the I/O pin specifications are and do the math.

  • Yunxi Guo said:
    Currently I am working on a project which requires PC could communication with two msp430g2553. I am planing to use UART to realize the communication. However, that requires me to connect the UART TX pins of two MSP430 together. Our design is different MSP430 sends data back at different time period, but the data collision my also happens.

    You can't drive rs232 with msp430 pins directly, you need level converter. Also RS232 is not supposed for such kind of "multidrop bus" configurations. You need something like RS422. If this is just hobby project then you can possibly think of paralleling two "simple transistor-based rs232->ttl converters", like this: http://project.irone.org/simple-rs232-to-ttl-level-converter.html

    For each msp430 you need it's own PNP transistor Q1 and it's base resistor R4. Transistors connected in open-collector manner. Of course, power it from VCC of msp430, supposedly 3.3V

  • Most PCs nowadays do not have RS232 Port. If you buy a USB to RS232 converter cable, most likely it has a USB chip with a 3.3V UART and a 3.3V to RS232 converter chip. Skip the RS232 converter chip and use the 3.3V UART signals directly.

    Also the $5 LaunchPad G2 has the 3.3V "Application UART" too.

  • Brian Boorman said:
    Typically devices can sink more current than they can source


    That's surely right for TTL, but on CMOS, usually, both transistors are equally strong, so two different output signal will likely result in an output voltage right in the middle. Which will, on the MSPs Schmitt trigger inputs, likely result in keeping the old state (due to hysteresis), but it depends on the actual trigger level.

    So the result is unpredictable. But definitely maximizes the energy dissipation.

    For joining multiple devices on a single signal line, there is for example the half-duplex RS485 bus, which is based on UART but uses specific transceiver chips with separate send/receive enable inputs. Also, these chips are designed to withstand permanent bus collision. However, some method for synchronizing needs to be implemented on high-level. Like round robin, token ring, polling, time slice etc.

**Attention** This is a public forum