大家帮忙看段代码,有问题请教一下!

2019-03-24 15:13发布

#include  "msp430x54x.h"
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; //停止看门狗定时器
P1DIR |= 0x01; // 设P1.0为输出
TA1CTL = RT1SSEL_0 + MC_2 + TAIE; // ACLK, 定时器A计数模式,且开中断功能
_BIS_SR(LPM3_bits + GIE); //进入LPM3 低功耗模式和开总中断允许
}

#pragma vector=TIMER0_A1_VECTOR
__interrupt void Timer_A(void)
{
     P1OUT ^= BIT0;
}

我的理解是Timer到时溢出触发中断,LED状态改变,那这个Timer是多长呢!?请高手指点!
此帖出自小平头技术问答
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
12条回答
鸵鸟蝈蝈
2019-03-26 02:33
The up mode is used if the timer period must be different from 0FFFFh counts.

In the continuous mode, the timer repeatedly counts up to 0FFFFh and restarts from zero

一周热门 更多>

相关问题

    相关文章