Last active
October 27, 2020 18:10
-
-
Save trtg/4451982 to your computer and use it in GitHub Desktop.
msp430 launchpad sample code to blink LED 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Demo app to blink the red LED (LED1) on the TI Launchpad | |
//which is attached to P1.0 | |
//The green LED(LED2) is connected to P1.6 | |
#include <msp430g2553.h> | |
int main(void) { | |
volatile int i; | |
// stop watchdog timer | |
WDTCTL = WDTPW | WDTHOLD; | |
// set up bit 0 of P1 as output | |
P1DIR = 0x01; | |
// intialize bit 0 of P1 to 0 | |
P1OUT = 0x00; | |
// loop forever | |
for (;;) { | |
// toggle bit 0 of P1 | |
P1OUT ^= 0x01; | |
// delay for a while | |
for (i = 0; i < 0x6000; i++); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you pls give an idea regarding interfacing Bluetooth with msp430