A basic guide to start with the MSP430F family and the GCC tools on Linux.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

20 lines
440 B

#include <msp430f2619.h>
void main(void)
{
WDTCTL = WDTPW | WDTHOLD; // stop watchdog timer
PM5CTL0 = 0x0000; // disable high impedance mode
P1DIR = 0x01; //set up bit 0 of P1 as output
P1OUT = 0x00; //initialize bit 0 of P1 to 0
for(;;){ //loop
volatile unsigned int i;
P1OUT ^= 0x01; //toggle bit 0 of P1
//Delay
for(i=40000; i>0;){
i--;
__no_operation();
}
}
}