• Not Answered

msp430g2xx1_ta_uart9600.c

hello every one,

i tried to work the "msp430g2xx1_ta_uart9600.c "  code taken from "msp430G2xx1" code examples in CCS version 4.2.4. with MSP430G2231 device in launch pad kit.

i understand that MSP430G2231 has only USI and not USCI and do not support UART. i believe the code return in  "msp430g2xx1_ta_uart9600.c "  uses timer A to implement a software functionality and achieve UART. in hardware wise i have connected the TX, RX and GND pins to P1.1, P1.2 and GND to UART of my computer with 9600-8-N settings.

but i find junk values in my serial window, please help.

 

regards

Kumar

4 Replies

  • Kumar,

    Did you put a RS232 level shifter in between you the pins on the MSP430 and the PC? The signal levels coming out of the MSP430 are TTL, whil the PC expects to see RS232 levels. If you are trying to do this without a dev kit, you can use something like a max3221 to do your level shifting for you:

    http://www.ti.com/product/max3221?qgpn=max3221

    If you are using a launchpad to do your developement, you can use the back channel uart that is available for testing. When you plug the launchpad in, you will see an MSP430 applications uart added to your com port listing. You can send and receive data over this link at 9600 baud.

    By deafult the launchpad has the connections setup for you, you can see the RXD/TXD pins located on the header.

     

    -Jason

     

  • In reply to Jason Kriek:

    Dear Jason

     Thanks for your lighting quick reply. Actually I use a RS232 to USB converter from computer and connect the RX, TX and GND pins directly to launch pads P1.1, P1.2 and GND pins directly without any level shifter.

     

    when i press my reset button on my launch pad i get only junk messages. loop back ( TX and RX shorted) works properly.

    regards

     kumar

  • In reply to Ramkumar natarajan:

    Ramkumar natarajan
    Actually I use a RS232 to USB converter

    If it's really an RS-232 to USB Converter, then you need and RS232 level shifter (or "transceiver") between it and the UART pins.

    "RS-232" means bi-polar signal levels with +/-12V levels - you must never connect that direct to any microcontroller's pins!!

  • In reply to Ramkumar natarajan:

    Kumar,

    The other option is to use a TTL to USB converter. It is in the same form factor as the 232 to USB, except it takes TTL input instead of 232 input.

    Another option is to get a launchpad board, they are $4.30 on wwwti.com. This has the back channel UART that you can use to communicate back to the PC.

    Even if you didnt wanted to plug an IC into the launchpad, you could attach to the RX/TX lines of the launchpad board to communicate back to the PC over the USB link.

      Here is a link to the launchpad:

    http://www.ti.com/tool/msp-exp430g2

     

    -Jason