// Copyright 2012 Matthew Hiles #include #define pause for (i=0; i < 100; i++) wait(7000) void wait(int ticks) { TAR=0; while(TAR < ticks) _NOP(); } void main(void) { int i = 0; WDTCTL = WDTPW + WDTHOLD; // stop watchdog TACTL = TASSEL_2 | MC_2; // setup TXD and RXD P1SEL = 0; // all ports GPIO P1DIR = 0xFF; // all is output while(1) { P1OUT ^= (BIT0); // toggle bit0 (red LED) pause; // wait } }