Giving The MSP430 A GUI

Sometimes you need to toggle or read a few pins on a microcontroller for a project so simple (or so temporary) that coding some firmware is a rather large investment of time. [Jaspreet] had the same problem – wanting to read values and toggle pins without writing any code – so he came up with a rather clever solution to control an MSP430 through a serial connection.

[Jaspreet] calls his project ControlEasy, and it does exactly as advertised: it provides a software interface to control ADC inputs, PWM outputs, and the state of output pins via a desktop computer. ControlEasy does this with a matching piece of code running on any MSP430 with a hardware UART (like the TI Launchpad) sending and receiving data to the computer.

Right now ControlEasy can read analog values, generate PWM output, and set individual pins high and low. [Jaspreet] plans on expanding his software to allow control of LCDs and I2C and SPI devices.

In the video after the break you can see [Jaspreet] fiddling around with some pins on his LaunchPad via the GUI. The software is also available for download if you’d like to try it out, but unfortunately it’s a Windows-only build at this point.

[youtube=http://www.youtube.com/watch?v=rMAQzwj42QI&w=470]

30 thoughts on “Giving The MSP430 A GUI

      1. Hi,

        As I had promised earlier I have made some improvements to the app. Most importantly, I have created the win executable out of python scripts so that you do not have to install python and required libraries. This is not final version, I need to do more improvements. Please send in your valuable feed backs and suggestions that I will try to incorporate them in the final version.

        http://navinbhaskar.blogspot.com/2012/10/this-blog-post-is-continuation-of.html

  1. Definitely useful.

    I’m working hard on something similar right now for PIC24. The main difference is the GUI on the PC side is mostly defined by the MCU; so you can add or change something without reprogramming the GUI. Or even use a different MCU altogether, and everything is being designed with easy porting in mind.

    Hardware devices on the MCU are represented as objects, each with a name and a list of properties. An object can optionally be parented to another object, or a property to another property, allowing the PC to display all available MCU resources in a nicely structured tree; which can be expanded or collapsed to show only what you’re using. You can even connect multiple MCUs, and they’re shown in the same tree.

    The MCU keeps track of which object/property definitions, and changed property values, have been sent to the host. This is kept in a bit array. When the host sends a “Scan” command, the MCU scans the array, finds the first update and sends it to the host, then clears the bit. Or send an “Autoscan” command, and the MCU continuously sends all available updates as an idle task. A second bit array acts as a mask, allowing you to turn off updates for any objects/properties you’re not currently interested in; saving processor time and bandwidth.

    The property definition includes its name, and whether it can be read/written. Most importantly, it includes typing info, some examples:

    1) Numeric, various integer and float sizes, with optional min/max limits.
    2) Enumerated value. Essentially a limited numeric, but also returns text descriptions of each valid value in its definition. Like True/False, to allow a boolean property. Or a list of available analog pins.
    3) String. Can be read or written in its entirety.
    4) Stream. Like a string, but can be partially read, and writes are treated as appends. Usually represents an underlying ring buffer. Useful for things like UARTs, or ADC channels that have been set to sample continuously.
    5) Null. Serves only as a node in the GUI’s tree, to which other properties can be parented.

    This allows intelligent display and editing of virtually anything in the GUI, with only a limited and fixed set of editors required.

    You can also open up an oscilloscope window, and drag any property over to it; allowing any set of properties to be displayed with a common timebase. Even string or stream properties. When they’re read, it shows a tick at the bottom of the window, which can be hovered over to see the value.

    There’s more, but this is long enough. ;)

    1. Your idea is great ! The GUI which i developed is just for sending instructions … The rest of the task is dependent on the code inside the uC i.e, the GUI is not uC dependant. After completing this GUI (will require maybe a week or two), i will shift to other TI platforms C2000 & Stellaris launchpad and will develop algorithms to control them using the same GUI.

  2. I made something similar to this on an Arduino Mega board for a customer a while back but they never used or bought it. I used BertOS though and not that horrid Arduino IDE ‘thing’. I should do some more work on it methinks and publish it.

    1. Have you selected the correct Virual COMM Port? To check which COMM Port to connect to, Right Click on My Computer select Properties.. .go to device manager and Check PORTS (COM & LPT) … You will find something written like this “MSP430 Application UART (COMXX)”. Also, make sure that the baud rate is set to 9600.

    2. Also, make sure to connect the RXD & TXD jumpers on the MSP430 in H/W UART mode. (The small leaflet or the quick start guide that comes with MSP430 shows how to do this).

    3. I have the same problem, but Win7 64bit. GUI just doesn’t load. Run the executable and it’s like nothing happens. I’ve tried to run it as admin as well. Unfortunately it looks like the only way to get support is to e-mail him directly.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.