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.

Sending MSP430G2553 Launchpad Data to PC for use in Software Program (C++)

Other Parts Discussed in Thread: MSP430G2553

Hi all,

I have just recently been able to use the MSP430G2553 Launchpad and TI's example code to echo a preset 16-char data to the Terminal each time a button on the keyboard is pressed. However, I need to expand the UART communication to communicate to a (preferably C++) program where it can use the data as necessary. In essence, I need my software program to get the data from the MSP430 each time upon request and do this over and over in an infinite loop while doing other things as well based on that data.

I have found a lot of libraries online, but I cannot completely grasp how this relates to the MSP430, as my UART program for the launchpad actually waits for a RX flag and then sets the TX buffer 16 times in a row, and frankly, I do not know how the terminal is interacting with the launchpad to get it to display those 16 chars every time I push a button on the keyboard.

This library http://www.codeproject.com/Articles/992/Serial-library-for-C looks like a promising option. However, I do not understand how the C++ program is getting the MSP430 to send the data and at the right time. Does the TXIFG indicate when the MSP430 should start transferring? And does this C++ library somehow get the launchpad's TXIFG to go high?

In general though, if there is anyone who knows how to do this, specifically with MSP430, any example code, guides/websites, or advice would be extremely helpful.

Thanks,

Matt

  • Hi Matthew,

    3-4yrs back I implemented the same thing with MSP430 launchpad and VB6 based application. Here's how communication took place:

    It was a Temperature, Humidity and Air Quality monitoring system. So all the respective sensors were connected to the kit. I used RS-232 communication for controller and PC app communication. When one presses Monitor button on the PC application:

    1. PC App transmitted 'M' as a character, the moment MSP received 'M' (using interrupt routines off course) it used to transmit all the critical parameters to PC

    2. Using the VB6 coding I isolated the values and displayed it on the App. 

    I used something called as "MSComm" module available in VB6. I hope this gives you some kind of idea of how you can proceed.

    Regards,

    Gautam

  • On the way as noted by Gautam, but you don't need to use any special "module" for serial communication, if application on PC side is under Win. There are standard API functions CreateFile/ReadFile/WriteFile for transfer over serial port, that can be called from any programming language C/Delphi/VB/... with plenty open source examples on web.

    Also, Launchpad USB/RS232 bridge is limited to max 9600 bps.

  • Thanks zrno for additional support.

    Regards,

    Gautam

**Attention** This is a public forum