This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

为什么增计数模式需要加TA0CCTL0 = CCIE;

在以下一段程序中,为什么要加这句话呢?不是TA0CCTL0 = CCIE;只是用来使比较模块中断允许的吗?谢谢    

TA0CCTL0 = CCIE;                          //  比较模块中断允许位:允许中断

TA0CCR0 = 500;//250:40KHZ f=25000/ccr0 接受的方波频率为f/2

 TA0CTL = TASSEL_2 + MC_1 + TACLR;         // SMCLK, upmode, clear TAR

__bis_SR_register(LPM0_bits + GIE);       // Enter LPM0, enable interrupts