楼主好犀利呀,就这个程序我还是看了很多天,才把他凑齐的,你尽然分析到这了,佩服!
#pragma vector=TIMER1_A1_VECTOR
__interrupt void TIMER1_A1_ISR(void)
{
switch(__even_in_range(TA1IV,14))
{
case 0: break;
case 2: TA1CCR1 += 16; // Add Offset to CCR1
break;
case 4: TA1CCR2 += 100; // Add Offset to CCR2
break;
case 6: break; // CCR3 not used
case 8: break; // CCR4 not used
case 10: break; // CCR5 not used
case 12: break; // Reserved not used
case 14: P4OUT ^= 0x10; // overflow
break;
default: break;
}
}