#include
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
P3DIR |= 0xFF; // P3.5 output
CCTL0 = CCIE; // CCR0 interrupt enabled
CCR0 = 3000-1;
TACTL = TASSEL_1 + MC_1; // ACLK, upmode
_BIS_SR(LPM3_bits + GIE); // Enter LPM3 w/ interrupt
}
// Timer A0 interrupt service routine
#pragma vector=TIMERA0_VECTOR
__interrupt void Timer_A (void)
{
P3OUT ^= 0xFF; // Toggle P3.5
}