Created
June 23, 2012 12:54
-
-
Save chrismeyersfsu/2978224 to your computer and use it in GitHub Desktop.
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
/* Blink LED example */ | |
#include <msp430g2553.h> | |
/** Delay function. **/ | |
delay(unsigned int d) { | |
int i; | |
for (i = 0; i<d; i++) { | |
nop(); | |
} | |
} | |
int main(void) { | |
WDTCTL = WDTPW | WDTHOLD; | |
P1DIR = 0xFF; | |
P1OUT = 0x01; | |
for (;;) { | |
P1OUT = ~P1OUT; | |
delay(0x4fff); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TI msp430 blink LED