Introduction - If you have any usage issues, please Google them yourself
#include<iom16v.h>
#include<macros.h>
#define uchar unsigned char
#define uint unsigned int
uchar senserflag=0 //传感器状态标志
uchar count1=0
uchar jsflag=0 //金属标志
uchar task=1 //任务标志
uint distancedata=0 //路程值
uint distancecount=0 //路程脉冲记数
//数码管字型表,对应0,1,2,3,4,5,6,7,8,9//#pragma data:code
#pragma data:code
const uchar Table[10]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f}
#pragma data:data
static uchar Data[3]={0,0,0} //显示初始值:0 0 0
uchar CNT=0 //初始计数值:0
uchar Timer[2]={1,10} //初始时间00:00
uchar disdata[3]={0,0,0} //路程初值0