Skip to content

Instantly share code, notes, and snippets.

@chrismeyersfsu
Created June 23, 2012 12:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrismeyersfsu/2978224 to your computer and use it in GitHub Desktop.
Save chrismeyersfsu/2978224 to your computer and use it in GitHub Desktop.
/* 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);
}
}
@chrismeyersfsu
Copy link
Author

TI msp430 blink LED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment