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.

How to get inverted output of MSP430F2xx UART?

Hello,

   I have an application whereby two processors communicate with each other via UART through an opto-isolator. The opto-isolation circuit inverts the signal. Is there a way to get the MSP430F2xx UART to output its inverse?

 

Thanks,

Derek

  • If you use "software UART" (with or without help from a Timer), you can invert the polarity of both/either Tx and Rx easily. If you use  the hardware UART, I think you will need to add hardware inverters.

  • I'm currently using a software UART, and just inverted the signals, but was hoping to switch to the hardware UART. I was hoping there was some config flag I could set to invert the output but it looks like I'm SOL. I was thinking of using a hardware inverter, but I figure that if I'm modifying hardware I might as well just change the opto circuit.

     

    Thanks,

    Derek

  • Derek said:
    The opto-isolation circuit inverts the signal. Is there a way to get the MSP430F2xx UART to output its inverse?

    No, signal inversion is not implemented (only for the synchronous clock).

    However, you do not ncessarily have to invert the signal by an optocoupler.

    Simply put the optocouplers output transistor between VCC and RX and ad a pulldown resistor. Then when teh input diode is activated by a high signal, the output transistor will connect the RX pin with VCC (high again), while if the diode is inactive (low signal), the pulldown will hold the output low.

    Alternatively, take a look at the ADUM chips. Thex offer a magnetic coupling with up to 1MHZ (and more for the more expensive ones) transfer speed and 4 lines (including variants with lines into two directions). Of course without any signal inversion.

  • Thanks Jens-Michael. We're updating the hardware so that the opto circuit is non-isolating as you mention. I looked at the ADUM isolators (and TI's line too) but they're all quite pricey compared to two opto-isolators. Speed here isn't an issue since the serial comms only operates at less than 100bps.

    --Derek

  • Derek said:
    so that the opto circuit is non-isolating

    I hope you meant 'non-inverting', as a non-isolating optopcoupler doesn't make much sense :)

    Yes, teh ADUMs are quite pricey compared to a cheap OC. However, if teh speed increases, you'll sooner or later need one of these rather expensive OCs for digital transmissions.

    Also, if you want to transfer a digital signal, you'll need some external components (pullups, pulldowns etc.), And the OCs are quite large. The ADUMs with 4 or even 5 transmission lines, digital outputs in the proper logic level and voltage and only one supply line are really tiny compared with an array of OCs. No external components, only one pin in and out per digital line (suitable for bus routing) etc. We had to use the Sharp PC600 before and one ADUM replaces 4 of them. And takes half the size for the same costs. And I think, the power consumption is also smaller than with driving an LED.

    For 100 Bd, however, a simple OC is good enough.

**Attention** This is a public forum