📄 main.c
字号:
/******************************************************
DESIGN FOR PCBA'S Material Number Display by RF315M
Designer: BH Zhang
Date:2006-1-11
Ver:1.0
Modify Mark:NONE
*******************************************************/
#include <at89x51.h> //包含89S51的WDT子过程
#include "dfq.h"
#include "rf315mhz.h"
#include "timer.h"
#include "4x4key.h"
//------------------------------------------------------
void main(void){
unsigned char nOverTimer;
InitMcu();
//nCurMode=SEND; //check send time
for(;;){
RFTX=1;
switch(nCurMode){
case KEY: //step 1
if(nKey!=NOKEY)process_key();
nOverTimer=0;
break;
case SEND: //step2
if(nOverTimer++==0)Sort_Data();
RFSendStr();
T0250usDelay=300; //set overtime 0.075S
while(T0250usDelay);
if(nOverTimer==50){ //send 100 times
nCurMode=SENDOK;
}
break;
case SENDOK: //step3
DispSendOK();
T0250usDelay=12000; //set overtime 3S
while(T0250usDelay!=0);
nCurMode=KEY;
ClearDispNo();
break;
default:
nCurMode=KEY;
ClearDispNo();
break;
}
}
}
//------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -