?? time_c.c
字號:
//#include <pic.h>
#include <pic16f5x.h>
#include "define.h"
volatile unsigned char t1,t2,t3;
//----------------------------------------------------------------------
//函數功能:定時處理
//輸入參數:
//返回參數:
//創建時期:
//----------------------------------------------------------------------
fastcall void time() //定時
{
t1++;
if(!_50_60_fg)
{
if(t1>=100)
{t2++;t1=0;}
}
else
{
if(t1>=120)
{t2++;t1=0;}
}
if(t2>=60)
{t3++;t2=0;}
if(t3>=15)
power_fg=0; //FLAG1&=0b11111101
if(t3>=TIME_DEFINE)
{
t3=0;
power_fg=0;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -