#include <msp430g2553.h>
void configled(void)
{
P1DIR |= BIT6;
P1SEL |= BIT6;
}
void configtimer(void)
{
TA0CCR0 = 2500;
TA0CCTL0 = CCIE;
TA0CCTL1 = OUTMOD_3;
TA0CCR1 = 0;
TA0CTL |= TASSEL_2 + MC_1 + TAIE;
}
#pragma vector = TIMER0_A1_VECTOR
__interrupt void CCR1_interrupt(void)
{
TA0CCR1 += 1;
if(TA0CCR1 == 2501) TA0CCR1 = 0;
}
void main (void)
{
WDTCTL = WDTHOLD + WDTPW;
configled();
configtimer();
_bis_SR_register(LPM0_bits);
while(1);
}