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

📄 display_process.lst

📁 温度仪表软件
💻 LST
字号:
C51 COMPILER V8.02   DISPLAY_PROCESS                                                       05/31/2008 12:47:21 PAGE 1   


C51 COMPILER V8.02, COMPILATION OF MODULE DISPLAY_PROCESS
OBJECT MODULE PLACED IN .\hex\display_process.obj
COMPILER INVOKED BY: D:\Program Files\keil\C51\BIN\C51.EXE src\display_process.c BROWSE INCDIR(.\h) DEBUG OBJECTEXTEND P
                    -RINT(.\lst\display_process.lst) OBJECT(.\hex\display_process.obj)

line level    source

   1          #include"reg52.h"
   2          #include"intrins.h"
   3          #include"interface.h"
   4          #include"my_type.h"
   5          #include"function.h"
   6          #include"global_var.h"     
   7          
   8          /********温度值转换处理程序*********/                                     
   9          void display_proccess(float temp)
  10          {       
  11   1      
  12   1              if(temp>=0 && temp<10)       //当温度在0-10摄氏度时
  13   1                      {
  14   2                              disp[0]=led[(uchar)(temp)+10];
  15   2                              disp[1]=led[((uchar)(temp*10))%10];
  16   2                              disp[2]=led[(uchar)((uint)(temp*100))%10];
  17   2                              disp[3]=led[(uchar)((uint)(temp*1000)%10)];     
  18   2              //      return 1;                                                                                               
  19   2                      }
  20   1                      if(temp>=10 && temp<100)         //当温度在10-100摄氏度时
  21   1                      {
  22   2                              disp[0]=led[(uchar)(temp/10)];
  23   2                              disp[1]=led[((uchar)(temp))%10+10];
  24   2                              disp[2]=led[(uchar)((uint)(temp*10)%10)];
  25   2                              disp[3]=led[(uchar)((uint)(temp*100)%10)];
  26   2              //              return 1;           
  27   2                      }
  28   1              if(temp>=100 && temp<1000)       //当温度在100-1000摄氏度时
  29   1                      {
  30   2                              disp[0]=led[(uchar)(temp/100)];
  31   2                              disp[1]=led[(uchar)(((uint)(temp))%100/10)];
  32   2                              disp[2]=led[(uchar)(((uint)(temp))%10)+10];
  33   2                              disp[3]=led[(uchar)((uint)(temp*10)%10)];
  34   2              //              return 1;           
  35   2                      }
  36   1              if(temp>=1000 && temp<10000)     //当温度在1000-10000摄氏度时
  37   1              {
  38   2                      disp[0]=led[(uchar)((uint)(temp/1000))];
  39   2                      disp[1]=led[(uchar)(((uint)(temp))%1000/100)];
  40   2                      disp[2]=led[(uchar)(((uint)(temp))%100/10)];
  41   2                      disp[3]=led[(uchar)(((uint)(temp))%10)];
  42   2                      //      return 1;           
  43   2              }
  44   1              if(temp>-10 && temp<=0)     //当温度在-10-0摄氏度时
  45   1                      {
  46   2                              disp[0]=led[21];
  47   2                          disp[1]=led[(uchar)((uint)(temp*(-1)))+10];
  48   2                              disp[2]=led[(uchar)(((uint)(temp*(-1)*10))%10)];
  49   2                              disp[3]=led[(uchar)(((uint)(temp*(-1)*100))%10)]; 
  50   2              //      return 1;   
  51   2                      }
  52   1              if(temp>-100 && temp<=-10)       //当温度在-100 -  -10摄氏度时
  53   1                      {
  54   2                              disp[0]=led[21];
C51 COMPILER V8.02   DISPLAY_PROCESS                                                       05/31/2008 12:47:21 PAGE 2   

  55   2                          disp[1]=led[(uchar)(temp*(-1)/10)];
  56   2                              disp[2]=led[(uchar)(((uint)(temp*(-1)))%10)+10];
  57   2                              disp[3]=led[(uchar)(((uint)(temp*(-1)*10))%10)];
  58   2                      //      return 1;   
  59   2                      }
  60   1                                                                                                               
  61   1      }
  62          /*void display_set_L()
  63          {
  64                  if(set_low>-50 && set_low<-10)
  65                  {       
  66                          num0=13;
  67                          num1=10;
  68                          num2=set_low/10;
  69                          num3=set_low%10;
  70                          disp[0]=led1[num0];
  71                      disp[1]=led1[num1];
  72                          disp[2]=led1[num2];
  73                          disp[3]=led1[num3];
  74                                                  
  75                   }
  76                   if(set_low>-10 && set_low<0)
  77                  {       
  78                          num0=13;
  79                          num1=10;
  80                          num2=set_low/10;                
  81                          num3=set_low;
  82                          disp[0]=led1[num0];
  83                      disp[1]=led1[num1];
  84                          disp[2]=led1[num2];
  85                          disp[3]=led1[num3];                     
  86                          
  87                   }
  88                   if(set_low>0 && set_low<10)
  89                  {
  90                          num0=13;
  91                          num1=0;
  92                          num2=0; 
  93                          num3=set_low;
  94                          disp[0]=led1[num0];
  95                      disp[1]=led1[num1];
  96                          disp[2]=led1[num2];
  97                          disp[3]=led1[num3];             
  98                                                          
  99                   }
 100          } 
 101          void display_set_H()
 102          {
 103                  if(set_high>10 && set_high<100)
 104                  {       
 105                          num0=12;
 106                          num1=0;
 107                          num2=set_high/10;               
 108                          num3=set_high%10;
 109                          disp[0]=led1[num0];
 110                      disp[1]=led1[num1];
 111                          disp[2]=led1[num2];
 112                          disp[3]=led1[num3];
 113                                                  
 114                   }
 115                   if(set_high>100 && set_high<500)
 116                  {       
C51 COMPILER V8.02   DISPLAY_PROCESS                                                       05/31/2008 12:47:21 PAGE 3   

 117                          num0=12;
 118                          num1=set_high/100;
 119                          num2=set_high/10%10;            
 120                          num3=set_high%10;
 121                          disp[0]=led1[num0];
 122                      disp[1]=led1[num1];
 123                          disp[2]=led1[num2];
 124                          disp[3]=led1[num3];                                                     
 125                   }
 126                                                                                    
 127          }                                                                                */
*** WARNING C316 IN LINE 127 OF src\display_process.c: unterminated conditionals


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    981    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----       4
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  1 WARNING(S),  0 ERROR(S)

⌨️ 快捷键说明

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