P2DIR = 0x3F;
P2SEL = 0;
P2SEL2 = 0;
P2IES = BIT6 + BIT7; // Falling/Rising
P2REN = BIT6 + BIT7; //pullup => P27OkKey
P2OUT = BIT6 + BIT7;
TimerA的設定
TA0CCR0 = 1200*ot;
CCTL0 = CCIE;//Enable the Timer A
TA0CTL = TASSEL_2 + MC_1;//Setup Timer and Start
__enable_interrupt(); //Enables Inturrupt for the whole chip
_BIS_SR( GIE );