Multiple MSP430 Launchpad.

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
354 views
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jul 7, 2011

A simple example of four MSP430 Launchpads passing control to each other. (please don't mock my source code...)


// 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 on, Green off on all LPs

for (;;)
{

while ((P1IN & BIT3));
// Wait for button press on P1.3
// We also wired P1.3 (INPUT) to P1.0 (Red LED Output)
// for the Slave MSP430. A low P1.0 triggers the Slave.
for (i=0; i=500; i++);

// A little delay after the trigger
P1OUT ^= BIT0 + BIT6;
// TOGGLE the two LEDs 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 and wait for trigger. } //endless loop. The little MSP430 never gets bored.
} //main

Category:

Science & Technology

Tags:

License:

Standard YouTube License

Link to this comment:

Share to:
see all

All Comments (0)

Sign In or Sign Up now to post a comment!
Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more