使用430制作的水表---休眠管理

[复制链接]
1912|0
 楼主| 雁舞白沙 发表于 2012-2-28 09:24 | 显示全部楼层 |阅读模式
ASIC, ic, se, TI, sic
#i nclude <GLOBAL.h>
#i nclude <stdlib.h>
#i nclude <stdbool.h>
#i nclude <msp430x41x.h>
void BasicTimerEn(void)
{
    if(BasicTimer==0)
    {
          CardParseOverFg=1;
          LPM4;
          _NOP();
          SCFQCTL=SCFQ_2M;//---------------------时钟为1M
          FLL_CTL0 |= XCAP10PF;
          WDTCTL=WDTPW+WDTHOLD;
          InitRTC();
    }
    else
    {
        if(SecondsConn&0x80)
        {
            if(BasicTimer!=0)
            {
                BasicTimer--;
            }
            SecondsConn&=0x7f;
        }
        if(SleepEn)
        {
              LPM3;
              _NOP();   
        }
    }
}
您需要登录后才可以回帖 登录 | 注册

本版积分规则

213

主题

789

帖子

242

粉丝
快速回复 在线客服 返回列表 返回顶部