⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 minsys.lst

📁 用S52和1602液晶做的可进行设置的多级菜单
💻 LST
字号:
C51 COMPILER V7.08   MINSYS                                                                04/06/2008 22:01:20 PAGE 1   


C51 COMPILER V7.08, COMPILATION OF MODULE MINSYS
OBJECT MODULE PLACED IN minsys.OBJ
COMPILER INVOKED BY: D:\Program Files\Keil\C51\BIN\C51.EXE minsys.c ROM(COMPACT) BROWSE DEBUG OBJECTEXTEND

line level    source

   1          #include<at89x52.h>
   2          #include<absacc.h>
   3          #include<memory.h>
   4          #include<lcm.h>
   5          
   6          #define Retry 0x80
   7          
   8          unsigned char table[]={'0','1','2','3','4','5','6','7','8','9'};
   9          
  10          unsigned char code DataSeclete[]={                      //在发送数据前先发此,用来选择模式的代号
  11                                                                                  0x81,   //0 停止用的包头代号 
  12                                                                                  0x82,   //1 查询用的包头代号
  13                                                                                  0x83    //2 设置用的包头代号
  14          };
  15          
  16          unsigned char DataBase[]={                              //向下设置的数值
  17                                                                                  0xff,   //0 地址(密码)
  18                                                                                  0xff,   //1 总开关(0x00为关,0xff为开)
  19                                                                                  0x00,   //2 分钟
  20                                                                                  0x0a,   //3 小时(最大99)
  21                                                                                  0x1d,   //4 时间修正值(修正值是计数器溢出次数24-33,默认值是29,分10个档,设置时对应为0~9,设置
             -值+24=修正值)
  22                                                                                  0xB2,   //5 温度上限,默认是50度(最高位为正负号,1为正,0为负,后面7位为温度值,范围为-9~+99)
  23                                                                                  0x80,   //6 温度下限,默认是0度(最高位为正负号,1为正,0为负,后面7位为温度值,范围为-9~+99)
  24                                                                                  0x03,   //7 震动灵敏度(灵敏度是25毫秒内震动的次数2-20,设置时对应为0~9,设置值*2+2=灵敏度)
  25          };
  26          
  27          
  28          unsigned char DataReceive[]={                           //向上读取的数值,把地址改为是否已经报警
  29                                                                                  0x00,   //0 是否已经报警(1不报警,0报警)
  30                                                                                  0x00,   //1 工作状态0x00为不工作,0xff为工作
  31                                                                                  0x00,   //2 分钟
  32                                                                                  0x00,   //3 小时(最大99)
  33          };
  34          
  35          sbit KeyA=P1^0;
  36          sbit KeyB=P1^1;
  37          sbit KeyC=P1^2;
  38          sbit KeyD=P1^3;
  39          sbit HzOut=P3^3;
  40          
  41          unsigned char KEYA = 1,//按键A被按下为0,未按为零,,下同
  42                                    KEYB = 1,
  43                                    KEYC = 1,
  44                                    KEYD = 1;
  45          
  46          unsigned char LiuCheng1 = 1,  //停止流程,1未开始,0开始,下同
  47                                                                LiuCheng1_1 = 1,//工作子流程-设置对应的地址 DispSetAddress(unsigned char HH,HL,sign)//输入被控
             -板的地址,输入数值,位置
  48                                                                                                          LiuCheng1_password[8], //流程1的地址暂存数组
  49                                                                                                          LiuCheng1_1_Sign = 8,  //焦点位置
  50                                                                                                          //LiuCheng1_password[0]地址8位
  51                                                                                                          //LiuCheng1_password[1]地址7位
  52                                                                                                          //LiuCheng1_password[2]地址6位
  53                                                                                                          //LiuCheng1_password[3]地址5位
C51 COMPILER V7.08   MINSYS                                                                04/06/2008 22:01:20 PAGE 2   

  54                                                                                                          //LiuCheng1_password[4]地址4位
  55                                                                                                          //LiuCheng1_password[5]地址3位
  56                                                                                                          //LiuCheng1_password[6]地址2位
  57                                                                                                          //LiuCheng1_password[7]地址1位
  58                                    LiuCheng2 = 1,  //查询流程
  59                                    LiuCheng3 = 1,  //工作流程
  60                                                                    LiuCheng3_1 = 1,//工作子流程-设时间
  61                                                                                                          LiuCheng3_1_HH,            //小时十位
  62                                                                                                          LiuCheng3_1_HL,            //小时个位
  63                                                                                                          LiuCheng3_1_LH,            //小时十位
  64                                                                                                          LiuCheng3_1_LL,            //小时个位
  65                                                                                                          LiuCheng3_1_Sign = 4,  //焦点位置
  66                                          
  67                                                                    LiuCheng3_2 = 1,//工作子流程-时间修正值
  68                                                                                                          LiuCheng3_2_Num,   //修正值
  69                                          
  70                                                                    LiuCheng3_3 = 1,//工作子流程-温度上限
  71                                                                                                          LiuCheng3_3_HH,            //温度十位
  72                                                                                                          LiuCheng3_3_HL,            //温度个位
  73                                                                                                          LiuCheng3_3_Sign,          //温度正负号
  74                                                                                                          LiuCheng3_3_WeiZhi = 3,//焦点位置
  75                                                                    LiuCheng3_4 = 1,//工作子流程-温度下限
  76                                                                                                          LiuCheng3_4_HH,            //温度十位
  77                                                                                                          LiuCheng3_4_HL,            //温度个位
  78                                                                                                          LiuCheng3_4_Sign,          //温度正负号
  79                                                                                                          LiuCheng3_4_WeiZhi = 3,//焦点位置
  80                                          
  81                                                                    LiuCheng3_5 = 1,//工作子流程-震动灵敏度
  82                                                                                                          LiuCheng3_5_Num = 0,   //灵敏度
  83                                                                LiuCheng3_6 = 1,//工作子流程-设置对应的地址 DispSetAddress(unsigned char HH,HL,sign)//输入被控
             -板的地址,输入数值,位置
  84                                                                                                          LiuCheng3_password[8],//流程3的地址暂存数组
  85                                                                                                          //LiuCheng3_password[0]地址8位
  86                                                                                                          //LiuCheng3_password[1]地址7位
  87                                                                                                          //LiuCheng3_password[2]地址6位
  88                                                                                                          //LiuCheng3_password[3]地址5位
  89                                                                                                          //LiuCheng3_password[4]地址4位
  90                                                                                                          //LiuCheng3_password[5]地址3位
  91                                                                                                          //LiuCheng3_password[6]地址2位
  92                                                                                                          //LiuCheng3_password[7]地址1位
  93                                                                                                          LiuCheng3_6_Sign = 8;  //焦点位置
  94          
  95          unsigned char LiuCheng1Enable = 1,//停止流程使能
  96                                    LiuCheng2Enable = 1,//查询流程使能
  97                                    LiuCheng3Enable = 1;//工作流程使能
  98          
  99          //////////////////////////////////////////////////////////////////////////////////////////////////////////
             -//菜单显示函数
 100          void DispPasswordError(void)
 101          {
 102   1         /****************
 103   1          Password Wrong.
 104   1              Please Retry!  
 105   1              ****************/
 106   1              printx(0,0,"Password Wrong. ");
 107   1              printx(0,1,"Please Retry!   ");
 108   1      
 109   1      }
 110          void DispSetTime(unsigned char HH,HL,LH,LL,weizhi)//设置时间,输入小时十位,小时个位,分钟十位,分钟个位,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -