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

📄 allwindow.lst

📁 液晶程序液晶程序液晶程序液晶程序液晶程序液晶程序
💻 LST
📖 第 1 页 / 共 2 页
字号:
C51 COMPILER V7.01  ALLWINDOW                                                              09/23/2008 14:27:38 PAGE 1   


C51 COMPILER V7.01, COMPILATION OF MODULE ALLWINDOW
OBJECT MODULE PLACED IN AllWindow.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE AllWindow.c OPTIMIZE(6,SPEED) BROWSE DEBUG OBJECTEXTEND

stmt level    source

   1          #include<reg52.h>
   2          //----------------------------------------------
   3          //宏定义
   4          #define   KEY_ENTER      0x01
   5          #define   KEY_MOVE       0x02
   6          #define   KEY_DOWN       0x03
   7          #define   KEY_UP         0x04
   8          #define   KEY_SET        0x05
   9          #define   KEY_ESC        0x06
  10          //----------------------------------------------------
  11          
  12          //外部变量声明
  13          extern unsigned char xdata KEY_BUF;
  14          extern unsigned char xdata XPOS;//XPOS为0~7
  15          extern unsigned char xdata YPOS;//YPOS为0~127
  16          extern bit FB_FLAG;
  17          //-------------------------------------------------------
  18          
  19          //外部函数声明
  20          void putstr(unsigned int *STR);
  21          void clearscreen();
  22          void putchar(unsigned int singlecharnum);
  23          //--------------------------------------------------------------
  24          void can_common();
  25          //--------------------------------------------------------------
  26          
  27          //外部变量定义
  28          unsigned int xdata Ia,Ib,Ic,Vab,Vbc,Vca,PF;//各电压电流全局变量
  29          bit PHASE_FLAG=0;//相位标志位,0为正1为负
  30          bit DISP_ENTER_FLAG=0;//是否进入电压电流显示界面
  31          unsigned int xdata bit1,bit2,bit3,bit4;//计算数得到的4位
  32          //unsigned int xdata fignum[]={0x000A,0x000A,0x000A,0x000A,0x000A,0x00ff};
  33          //unsigned char xdata j; 
  34          //-----------------------------------------------------------
  35          
  36          //字符串定义
  37          unsigned int code TITLE_VOL[]={0x800f,0x8059,0x00ff};//电压
  38          unsigned int code TITLE_CUR[]={0x800f,0x805a,0x00ff};//电流
  39          unsigned int code TITLE_PF[] = {0x801a,0x805d,0x805e,0x801f,0x00ff};//功率因数
  40          //------------------------------------------------------------------------------
  41          
  42          //得到各个位,最高bit4,bit3,bit2,bit1;
  43          void getfigurebit(unsigned int para)
  44          {
  45   1              if(para > 1000 )
  46   1              {
  47   2                      bit1 = para%10;
  48   2                      bit2 = ((para-bit1)/10)%10;
  49   2                      bit4 = para/1000;
  50   2                      bit3 = (para-1000*bit4)/100;
  51   2              }
  52   1              else if(99 < para && para <= 999)
  53   1              {
  54   2                      bit1 = para%10;
  55   2                      bit2 = ((para-bit1)/10)%10;
C51 COMPILER V7.01  ALLWINDOW                                                              09/23/2008 14:27:38 PAGE 2   

  56   2                      bit3 = para/100;
  57   2              }
  58   1              else if(9 < para && para <= 99)
  59   1              {
  60   2                      bit1 = para%10;
  61   2                      bit2 = para/10;
  62   2              }
  63   1              else if(0 <= para && para <= 9)
  64   1              {
  65   2                      bit1 = para;
  66   2              }
  67   1      }
  68          //----------------------------------------------------------------------------
  69          
  70          //写入0000型电压数据
  71          void display_vol(unsigned int para)
  72          {
  73   1              unsigned int data volstr[5]={0x005c,0x005c,0x005c,0x005c,0x00ff};
  74   1              if(999<para&&para<=9999)
  75   1                      volstr[0]=bit4;
  76   1              if(para>99)
  77   1                      volstr[1]=bit3;
  78   1              if(para>9)
  79   1                      volstr[2]=bit2;
  80   1                      volstr[3]=bit1;
  81   1              putstr(volstr);
  82   1      }
  83          //---------------------------------------------------------------------  
  84          
  85          void display_dat(unsigned int para)
  86          {
  87   1              if(para > 1000)
  88   1              {
  89   2                      unsigned int data datstr[6] = {0x005c,0x005c,0x005c,0x005c,0x005c,0x00ff};
  90   2                      datstr[0] = bit4;//百位
  91   2                      datstr[1] = bit3;//十位
  92   2                      datstr[2] = bit2;//个位
  93   2                      datstr[3] = 0x005b;//小数点
  94   2                      datstr[4] = bit4;//小数位
  95   2      
  96   2                      putstr(datstr);
  97   2              }
  98   1              if(99 < para && para <= 999)
  99   1              {
 100   2                      unsigned int data datstr[5] = {0x005c,0x005c,0x005c,0x005c,0x00ff};
 101   2                      datstr[0] = bit3;//十位
 102   2                      datstr[1] = bit2;//个位
 103   2                      datstr[2] = 0x005b;//小数点
 104   2                      datstr[3] = bit1;//小数位
 105   2      
 106   2                      putstr(datstr);
 107   2              }
 108   1              if(9 < para && para <= 99)
 109   1              {
 110   2                      unsigned int data datstr[5] = {0x005c,0x005c,0x005c,0x005c,0x00ff};
 111   2                      datstr[0] = 0x0017;//十位 空格
 112   2                      datstr[1] = bit2;//个位
 113   2                      datstr[2] = 0x005b;//小数点
 114   2                      datstr[3] = bit1;//小数位
 115   2      
 116   2                      putstr(datstr);
 117   2              }
C51 COMPILER V7.01  ALLWINDOW                                                              09/23/2008 14:27:38 PAGE 3   

 118   1              if(0 <= para && para <= 9)
 119   1              {
 120   2                      unsigned int data datstr[5] = {0x005c,0x005c,0x005c,0x005c,0x00ff};
 121   2                      datstr[0] = 0x0017;//十位 空格
 122   2                      datstr[1] = 0x0000;//个位
 123   2                      datstr[2] = 0x005b;//小数点
 124   2                      datstr[3] = bit1;//小数位
 125   2      
 126   2                      putstr(datstr);
 127   2              }
 128   1      }
 129          //--------------------------------------------------------------------
 130          /*
 131          //写入000.0型电流数据
 132          void display_cur(unsigned int para)
 133          {
 134                  unsigned int data curstr[6]={0x005c,0x005c,0x005c,0x005c,0x005c,0x00ff};
 135                  
 136          //      if(999<para&&para<=9999)
 137                          curstr[0]=bit4;//百位
 138          //      if(para>99)
 139                          curstr[1]=bit3;//十位
 140                          curstr[2]=bit2;//个位
 141                          curstr[3]=0x005b;//小数点
 142                          curstr[4]=bit1;//小数
 143                  putstr(curstr);
 144          }
 145          //-------------------------------------------------------------------
 146          
 147          //写入00.0型数据
 148          void display_(unsigned int para)
 149          {
 150                  unsigned int data curstr[6]={0x005c,0x005c,0x005c,0x005c,0x005c,0x00ff};
 151                  
 152          //      if(999<para&&para<=9999)
 153          //              curstr[0]=bit4;//百位
 154                  if(para>99)
 155                          curstr[0]=bit3;//十位
 156                          curstr[1]=bit2;//个位
 157                          curstr[2]=0x005b;//小数点
 158                          curstr[3]=bit1;//小数
 159                  putstr(curstr);
 160          }
 161          //-------------------------------------------------------------------
 162          
 163          //写入0.0型数据
 164          void display__(unsigned int para)

⌨️ 快捷键说明

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