Let's Make Robots!

Multiple Launchpads talking to each other

I'm about to give up on the Launchpad. No fault of the device, it's just everthing seems to be "roll your own". I see the code and examples for the PICAXE and the whole wide world seem simpler. Can't fault the LP for the price, though. If you have more that one LP you can test your switch sensing code with this example. See embedded video and my spaghetti code below.


// By Voltar.  www.ironjungle.com  June 2011

// Simple demonstration of multiple MSP430 Launchpads communicating 

// with each other in a Master/Slave type relationship.  


// All MSP430 are loaded with this exact same code.

// No limit to the number of MSP430 Launchpads.


// The Master Launchpad P1.0 (Red LED Output) is hardwired to

// P1.3 (S2 switch input) on the Slave Launchpad. 


// The Master Lauchpad passes control to the adjacent Slave Launchpad.  

// That Slave Launchpad then becomes a Master. 



//                Master MSP430

//             -----------------

//            |                 |

//            |                 |

//            |                 |

//            |             P1.6|-->LED2

//            |             P1.0|-->LED1  ----->hardwired to P1.3 on the Slave MP430

//            |                 |


#include <msp430g2231.h>


void main(void)


  WDTCTL = WDTPW + WDTHOLD;        // Calm the dog...

  P1DIR |= BIT0;                   // Set P1.0 to output direction (Red LED)

                                   // P1.0 low also triggers Slave MSP430 to run

  P1DIR |= BIT6;                   // Set P1.6 to output direction (Green LED)


  volatile long i;


P1OUT = BIT0;                      // Start with RED LED ON, Green LED off on all Launchpads


for (;;)



while ((P1IN & BIT3));             // Wait for button press on P1.3 to start the fun. 

                                   // We also wired P1.3 (INPUT) to P1.0 (Red LED Output)

                                   // for the Slave MSP430.  A low P1.0 triggers the Slave MP430.

for (i=0; i<500; i++);             // A little delay after the trigger


P1OUT ^= BIT0 + BIT6;          // TOGGLE the two LEDs (Red LED off, Green LED on)

    for (i=0; i<100000; i++);      // This brings P1.0 Low on the Master MSP430 and triggers the Slave MSP430 via P1.3.


    P1OUT ^= BIT0 + BIT6;          // TOGGLE the two LEDs (Red LED on, Green LED off) and wait for trigger.

  }  //endless loop                // The little MSP430 never gets bored.

}  //main


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Maybe I'm confused, but what exactly is the problem? And I do want to point out that one of the key features of this proc is it's low power modes which you aren't using. In fact one of the guides(coding techniques slaa294a.pdf) is very specific about it's best uses and how in LP modes it's ideal to use an interupts for most of your actions. I'm just mentioning this as you are using a loop to detect the button press.

I've become a fan of these procs for many reasons, one being, at least to me reading the source code for these procs seem a bit easier than the AVR chips. Also configuring them appears to be a lot easier and straitforward.

I also recommend this guys site as it's very informative on the ins and outs of these little procs/boards.

And if anyone doesn't want their LP kits, I'll take em off your hands free of charge  :D I'm finding them useful and have plans to implent them in a project of mine!


I'm not knocking the MSP430.  I think it is a wonderful uC full of features, including the low power mode that you mentioned.  It's low price point got me back into the hobby.

That said, compared to the PICAXE the MSP430 is just too difficult for me to program.  I have no experience yet with the PICAXE (I just ordered my dev board), but anyone that trys to controll a few servo motors with both can see the code difference.

My LPs will still find a place in a few projects, but probablly only simple ones.

It's taken me a bit of time to learn it as it's similar to an arduino without the training wheels...pretty much like a bare AVR/PIC which you could code in the same style if you wanted to.

I understand how the picaxe makes it easier to do what you need to, like control servos, but thats what it was designed for, to make it simple. I'm finding the picaxe, or the basic language a bit more troublesome these days due to the lack of finer controls.....but I still like the picaxe for it's quick and dirty prototyping that you can do.

I can agree with all that. 

I have 1 LP kit lying around.I dont think i would ever use it.If you want  i can send it to you.You just have to pay for shipping.

I would have given you mine, but I gave it to my brother. Now it sits in his drawer….
Good to hear that someone is actually using them.

I'll really have to show you all on this site how great these procs are....  :D

Yeah, my LaunchPad is sitting in a drawer. I had plans for it, but it hasn't gotten anywhere yet. Maybe someday.