/* main.c */

// Include the register definitions. Note that we do not

// use a device specific include file, the compiler handles

// that based on the -mmcu option

#include <msp430.h>

#include <msp430g2452.h>

int main()        // The main function

 {

 //volatile unsigned int i = 0;

 unsigned int i = 0;

 // Disable the watchdog.

 // The watchdog is on by default on an     * MSP430,

 // if we do not disable it it will reset the CPU

 // after * 32k cycles in the standard configuration. */

 WDTCTL = WDTPW + WDTHOLD;

 // set P1.0 as output

 P1DIR = BIT0;

 // do forever:

 while (1)

         {

         i++;

         if (i == 0)

              {

              // Flip the value of P1.0's output register

              // when i * overflows to zero

              P1OUT ^= BIT0;

              }

         }

  }