|
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
FLL_CTL0 |= XCAP14PF; // Configure load caps
TACTL = TASSEL1 + TACLR + TAIE; // SMCLK, clr. TAR, interrupt
P5DIR |= 0x02; // Set P5.1 to output direction
TACTL |= MC1; // Start Timer_a in continous
_EINT(); // Ena××e interrupts
for (;;)
{
_BIS_SR(CPUOFF); // CPU off
_NOP(); // Required only for C-spy
}
}
// Timer_A3 Interrupt Vector (TAIV) handler
interrupt [TIMERA1_VECTOR] void Timer_A(void)
{
switch( TAIV )
{
case 2: break; // CCR1 not used
case 4: break; // CCR2 not used
case 10: P5OUT ^= 0x02; // overflow
break;
}
}这个怎么看设置拉三个定时器呢 |
|