Use Arduino Code on a TI Launchpad MSP430




Introduction: Use Arduino Code on a TI Launchpad MSP430

About: Electronics are a newly re-found hobby for me. I'm not an engineer - I'm an ordinary guy who likes to tinker with electronics in his free time. You can see more about my projects at
You can now use Arduino sketches to program your TI Launchpad MSP430.

The video show me programming an Arduino Mega 2560 and a TI Launchpad MSP430 with the same Arduino sketch.

The TI Launchpad MSP430 is a microprocessor development board from Texas Instruments.  It's very similar to the Atmel chips in the Arduino.  The MSP430 2553, which is the processor that ships with the Launchpad, has 14 I/O pins and 16K of program memory. Compare this to 20 I/O pins and 32K of program memory of the Atmel 328, the chip in the Arduino Uno, Nano, and several others.

The TI Launchpad MSP 430 only costs $4.30 from TI.  This includes two MSP430 chips, a USB cable, and a cool sticker.  The reason the TI Launchpad has not been more popular is they are very hard to program, especially if you are coming over from the Arduino.  You have to use a complex software package called Code Composer Studio and either program the MSP430 in Assembly code, or you can use C code that just as cryptic looking as the assembly code.  I've tried a few times, and always went back to ease of the Arduino.

Now you can use Energia to upload Arduino sketches to you TI MSP430 chips.  A lot of the more popular libraries like LCD Serial and Servo have already been ported over, and people are porting more code over all the time.

So the tip is:  use a low cost TI Launchpad in your next project instead of an Arduino, if the I/O requirements permit.  For simple applications, the TI chips may make more sense.  You can buy more chips from - the processors run anywhere from .50 cents to 2 dollars, and you don't have to have a bootloader like you do with the Atmels.  It's very easy to either program your chips in the Launchpad, then move it to your circuit, or you can use the Launchpad as an In System Programmer very easily.

At $4.30, you can just use the development boards in your projects if you want.  Compare that to the 20-30 dollar cost of Arduino boards...


Energia at Github

Energia forum at

TI MSP430 Launchpad at Texas Instruments



    • Water Contest

      Water Contest
    • Metalworking Contest

      Metalworking Contest
    • Fix It! Contest

      Fix It! Contest

    19 Discussions


    I was wonderingr if I could load a code using arduino (leonardo) board to a msp430 chip. The reason is that I don't have the board now and have the chip and I also have a Leonardo with me. So will it be possible?

    1 reply

    I guess it depends on the code; I'm running some code as-is with no modifications - simply copy and paste into Energia and it compiles just fine. Other code needs minor modifications on the pin names but other than that the syntax seems identical between Arduino IDE and Energia IDE


    2 years ago

    Many sketches compile with no errors but simply do not work on the TI board. By that I mean the code doesn't do what it is supposed to do. What does work is the most simplest sketch such as hello world. So the behind the scene compiler is very different. Libraries, of course are least likely to work so if your Arduino sketch uses a non-stock library then the whole idea of cross compiling code on to the TI just isn't true...

    4 replies

    Make sure the pins match the board your using, the arduino examples are setup with arduino normal pins, you may need to change them to 1.2 or etc depending on what pin you are using

    Thanks skylerh4, I do account for the pin changes, my issue appears to be compiler bugs or the micro simply runs out of memory, all sketches that do NOT work properly on MSP430 DO WORK correctly on the more powerful Stellaris hence my suspicion that it's likely an issue of resources rather than compiler bugs.

    interesting if you find out what the problem is please tell me, i would like to know

    Hi after posting at various forums including Energia's boards there isn't concrete evidence to this day of why this happens; there's a probable cause which has to do with MSP430 smaller SRAM but that has to be coupled with bug in the Energia's compiler so that the issue isn't reported at compile or link time but only occurs during runtime. Many sketches do run just fine on all 3 boards yet few don't (3 boards being the original Duemilanove; Stellaris and MSP430)

    I'd like to port Arduino's Print class to an IAR MSP430 compiler..

    However, I'm getting errors:

    'class Print' has virtual functions but non-virtual destructor : class Print

    error: expected ',' or '...' before '&' token : size_t print(const String &);

    ISO C++ forbids declaration of 'String' with no type : size_t print(const String &);

    Perhaps related to the above Print errors, the BufferFiller class (which inherits from Print) also has an error:

    'class BufferFiller' has virtual functions but non-virtual destructor

    So if Print calls 'write' how do I resolve this for the MSP430? Or what would would be the bare minimum functions in the Print Class that are needed to compile?

    So if i were to upload my code form arduino onto the launchpad, how would the pins correspond to those on the arduino?

    1 reply

    You need to check the energia website for the ti pin out. pin mapping is on the right of the page

    could u upload the link where I can find the corresponding pins between arduino and the lunch pad please

    Thank you.

    I've wanted to explore the MSP430, but didn't have the courage to learn the language.

    Because of your information, today I ordered 5 of them.

    2 replies

    Nice! You're going to like it, it's a cool board. Be sure to stop by the Energia forum at and say hi - the Energia developer is there all the time.

    So, my 5 units arrived.

    I visited, as you suggested. Thanks for that advice.

    After much scrounging around, I managed to find info about the pin assignments. Now a bit of play-time, just for practice.

    Hopefully soon after that, I'll be busy on something practical and useful (such as a beer sip counter or an alarm system for the bag of pork rinds).

    But really, thanks again and more thanks than last time. Your info here has already been helpful and appreciated.

    You have just become my best friend. Like many others I've been looking for a simplier way to program the MSP430 (I hate bit flipping). I almost gave up when I found your post. I'm glad i did as I was about to break down and buy an Arduino. THANKS FOR POSTING!!!

    1 reply

    I think Arduinos are good too - I especially like buying the $12 Nano clones on eBay, or the Arduino Mega 2560 knockoffs for around $20 are good deals too.

    For simple designs, you can't beat the MSP430.

    Stay tuned to Energia though, they are going to be coming out with a version that will work with the Stellaris Launchpad soon!

    Way cool!  I bought a few of the launchpads but was turned off by the rather closed software development tools, etc. but I was interested in the processor family itself.  This make it even more inviting.

    Best Wishes

    1 reply

    I loved the hardware, but couldn't be bothered to learn how to program the damn things when the Arduino was so easy. I am a fan of TI, though. Thanks for looking and commenting!