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.

2540的Timer1的OVFIF为何不挂号?



从数据手册上看,Timer1的T1STAT寄存器的OVFIF位,在free-running和module模式下,计数溢出时都会导致OVFIF置位,在以下程序中:

 T1CNTL=0;
  T1CC0L = 4;
 T1CC0H = 0;

 T1CTL=0x9;
 
while(!(T1STAT & 0x20));   这时可以跳出循环,即:OVFIF 有置位,

而改为:  T1CTL=0xa;  时,就无法跳出循环, 即:OVFIF 无置位, 可以看见T1CNTL的值从0变为4,再变为0,但OVFIF始终不置位,这时为何?