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.
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:
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.
In reply to Jason Kriek:
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.
In reply to Ramkumar natarajan:
Ramkumar natarajanActually 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!!
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:
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.