//#define FSMTMER 1500000
void InitTimer3(void)
{
Bank1;
T3CON=0x10; //时钟1.5M
TL3=0xdc;
TH3=0x05;
Bank0;
IENC1|=0x10; //开中断
}
void StartTimer3(void)
{
Bank1;
TR3=0;
TL3=0xdc;
TH3=0x05;
TR3=1;
Bank0;
}
u8 Txet33=0;
//中断服务函数
void Timer3IntProc() interrupt 11
{
u8 tmp;
Bank1;
tmp=TF3;
Bank0;
if(tmp==1)
{
Bank1;
TF3=0;
Bank0;
}
Txet33++;
} |