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

📄 lcd1602.lst

📁 keil环境下ds18b20温度检测1602显示
💻 LST
字号:
C51 COMPILER V7.50   LCD1602                                                               07/20/2007 17:26:21 PAGE 1   


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

line level    source

   1          #include "lcd1602.h"
   2          #include "ds18b20.h"
   3          #include <stdio.h>
   4          
   5          unsigned int temp[5],lemp[5];
   6          extern int xiaoshu_temp[5],zhen_temp[4];
   7          extern bit flag;
   8          extern bit dot_dis;
   9          uchar ds18b20_num1[8]={0xfd,0x00,0x00,0x00,0xb8,0xc5,0x45,0x28};
  10          uchar ds18b20_num2[8]={0x8e,0x00,0x00,0x00,0xb8,0xc5,0x30,0x28};
  11          uchar ds18b20_num3[8]={0xb9,0x00,0x00,0x00,0xb8,0xc5,0x31,0x28};
  12          uchar ds18b20_num4[8]={0xe0,0x00,0x00,0x00,0xb8,0xc5,0x32,0x28};
  13          char *str5="# #   ";
  14          void delay(unsigned int time)
  15          {
  16   1            uint i,j;
  17   1              for(i=0;i<time;i++)
  18   1                      for(j=0;j<200;j++);
  19   1      
  20   1      }
  21          int button(int c)
  22             {
  23   1          int a;
  24   1          a=c;
  25   1          delay(5);
  26   1          
  27   1         if (a==0)
  28   1          return(1);
  29   1          }
  30                  
  31          void main(void)
  32          {   
  33   1         
  34   1          void warn();
  35   1              uchar i;
  36   1              uchar *ds18b20_rom;
  37   1              char *str1="PLACE1:";
  38   1              char *str2="PLACE2:";
  39   1              char *str3="PLACE3:";
  40   1              char *str4="PLACE4:";
  41   1          
  42   1              serial_set();
  43   1              Lcd_Init();
  44   1              ClrScreen();
  45   1              GotoXY(0,0);
  46   1              //while(1);
  47   1              while(1)
  48   1              {       
  49   2         if(button( button1)==1)
  50   2         {
  51   3              GotoXY(1,0);
  52   3              for(i=0;i<8;i++)                          //显示序列号
  53   3              {
  54   4                      print_char(ds18b20_num1[i]/16);
  55   4                      print_char(ds18b20_num1[i]%16);
C51 COMPILER V7.50   LCD1602                                                               07/20/2007 17:26:21 PAGE 2   

  56   4      
  57   4              }
  58   3                      ds18b20_init();
  59   3                      ds18b20_writecommand(0xcc);
  60   3                      ds18b20_writecommand(0x44);      //转换
  61   3                      delay(500);
  62   3                      match_rom(ds18b20_num1);          //匹配第一路
  63   3              
  64   3                      ds18b20_writecommand(0xbe);       //读
  65   3                      for(i=0;i<2;i++)
  66   3                      {       
  67   4                              temp[i]=ds18b20_readdata();             
  68   4                      }
  69   3                      temperature_process(temp[0],temp[1]); 
  70   3                      GotoXY(3,1);
  71   3                      Print(str1);
  72   3                      if(!flag) //正
  73   3                      {
  74   4      
  75   4                              Print(zhen_temp);
*** WARNING C182 IN LINE 75 OF LCD1602.C: pointer to different objects
  76   4                              if(dot_dis)     
  77   4                              Print(".");
  78   4                              Print(xiaoshu_temp);
*** WARNING C182 IN LINE 78 OF LCD1602.C: pointer to different objects
  79   4                              warn();
  80   4                              }
  81   3              
  82   3              /*      else   //负
  83   3                      {
  84   3                              Print("-");
  85   3                              Print(zhen_temp);
  86   3                              if(dot_dis)     
  87   3                              Print(".");
  88   3                              Print(xiaoshu_temp);
  89   3                              warn();
  90   3      
  91   3                      }*/
  92   3                      Print("  ");
  93   3                  }
  94   2         else if(button(button2)==1)
  95   2          {
  96   3              ClrScreen();
  97   3              GotoXY(1,0);
  98   3              for(i=0;i<8;i++)                          //显示序列号
  99   3              {
 100   4                      print_char(ds18b20_num2[i]/16);
 101   4                      print_char(ds18b20_num2[i]%16);
 102   4      
 103   4              }
 104   3                      ds18b20_init();
 105   3                      ds18b20_writecommand(0xcc);
 106   3                      ds18b20_writecommand(0x44);      //转换
 107   3                      delay(500);
 108   3                      match_rom(ds18b20_num2);          //匹配第二路
 109   3                      ds18b20_writecommand(0xbe);       //读
 110   3      
 111   3      
 112   3                      for(i=0;i<2;i++)
 113   3                      {
 114   4              
 115   4                              temp[i]=ds18b20_readdata();
C51 COMPILER V7.50   LCD1602                                                               07/20/2007 17:26:21 PAGE 3   

 116   4                      
 117   4                      }
 118   3                      temperature_process(temp[0],temp[1]);
 119   3                      GotoXY(3,1);
 120   3                      
 121   3                      Print(str2);
 122   3                      
 123   3                      if(!flag) //正
 124   3                      {
 125   4                              Print(zhen_temp);
*** WARNING C182 IN LINE 125 OF LCD1602.C: pointer to different objects
 126   4                              if(dot_dis)     
 127   4                              Print(".");
 128   4                              Print(xiaoshu_temp);
*** WARNING C182 IN LINE 128 OF LCD1602.C: pointer to different objects
 129   4                              warn();
 130   4                      }
 131   3                      /*else   //负
 132   3                      {
 133   3                              Print("-");
 134   3                              Print(zhen_temp);
 135   3                              if(dot_dis)     
 136   3                              Print(".");
 137   3                              Print(xiaoshu_temp);
 138   3      
 139   3                      }*/
 140   3                      
 141   3                      Print("  ");
 142   3              }
 143   2         else if(button(button3)==1)
 144   2          {
 145   3              ClrScreen();
 146   3              GotoXY(1,0);
 147   3              for(i=0;i<8;i++)                          //显示序列号
 148   3              {
 149   4                      print_char(ds18b20_num3[i]/16);
 150   4                      print_char(ds18b20_num3[i]%16);
 151   4      
 152   4              }
 153   3                      ds18b20_init();
 154   3                      ds18b20_writecommand(0xcc);
 155   3                      ds18b20_writecommand(0x44);      //转换
 156   3                      delay(500);
 157   3                      match_rom(ds18b20_num3);          //匹配第三路
 158   3                      ds18b20_writecommand(0xbe);       //读
 159   3      
 160   3      
 161   3                      for(i=0;i<2;i++)
 162   3                      {
 163   4              
 164   4                              temp[i]=ds18b20_readdata();
 165   4                      
 166   4                      }
 167   3                      temperature_process(temp[0],temp[1]);
 168   3                      GotoXY(3,1);
 169   3                      Print(str3);
 170   3              
 171   3                      if(!flag) //正
 172   3                      {
 173   4                              Print(zhen_temp);
*** WARNING C182 IN LINE 173 OF LCD1602.C: pointer to different objects
 174   4                              if(dot_dis)     
C51 COMPILER V7.50   LCD1602                                                               07/20/2007 17:26:21 PAGE 4   

 175   4                              Print(".");
 176   4                              Print(xiaoshu_temp);
*** WARNING C182 IN LINE 176 OF LCD1602.C: pointer to different objects
 177   4                              warn();
 178   4                      }
 179   3              /*      else   //负
 180   3                      {
 181   3                              Print("-");
 182   3                              Print(zhen_temp);
 183   3                              if(dot_dis)     
 184   3                              Print(".");
 185   3                              Print(xiaoshu_temp);
 186   3      
 187   3                      }*/
 188   3                      Print("  ");
 189   3              }  
 190   2                      //delay(500);
 191   2                      //ClrScreen();
 192   2                              /*ds18b20_rom=read_rom();        //读序列号
 193   2              for(i=0;i<8;i++)                 
 194   2              {
 195   2                      ds18b20_num4[i]=*ds18b20_rom;
 196   2                      ds18b20_rom++;
 197   2              }*/
 198   2         else if(button(button4)==1)
 199   2          {
 200   3              ClrScreen();
 201   3              GotoXY(1,0);
 202   3              for(i=0;i<8;i++)                          //显示序列号
 203   3              {
 204   4                      print_char(ds18b20_num4[i]/16);
 205   4                      print_char(ds18b20_num4[i]%16);
 206   4      
 207   4              }
 208   3                      ds18b20_init();
 209   3                      ds18b20_writecommand(0xcc);
 210   3                      ds18b20_writecommand(0x44);      //转换
 211   3                      delay(500);
 212   3                      match_rom(ds18b20_num4);          //匹配第四路
 213   3                      ds18b20_writecommand(0xbe);       //读
 214   3      
 215   3      
 216   3                      for(i=0;i<2;i++)
 217   3                      {
 218   4              
 219   4                              temp[i]=ds18b20_readdata();
 220   4                      
 221   4                      }
 222   3                      temperature_process(temp[0],temp[1]);
 223   3                      GotoXY(3,1);
 224   3                      Print(str4);    
 225   3                      if(!flag) //正
 226   3                      {
 227   4                              Print(zhen_temp);
*** WARNING C182 IN LINE 227 OF LCD1602.C: pointer to different objects
 228   4                              if(dot_dis)     
 229   4                              Print(".");
 230   4                              Print(xiaoshu_temp);
*** WARNING C182 IN LINE 230 OF LCD1602.C: pointer to different objects
 231   4                              warn();
 232   4                      }
 233   3              /*      else   //负
C51 COMPILER V7.50   LCD1602                                                               07/20/2007 17:26:21 PAGE 5   

 234   3                      {
 235   3                              Print("-");
 236   3                              Print(zhen_temp);
 237   3                              if(dot_dis)     
 238   3                              Print(".");
 239   3                              Print(xiaoshu_temp);
 240   3      
 241   3                      }*/
 242   3                      Print("  ");
 243   3              }
 244   2                      //delay(500);
 245   2                      //ClrScreen();
 246   2                 //delay(100);
 247   2              }
 248   1              while(1);       
 249   1      } 
*** WARNING C280 IN LINE 36 OF LCD1602.C: 'ds18b20_rom': unreferenced local variable
 250          void warn()
 251                {if(temperature_process1(temp[0],temp[1])==1)
 252   1              {
 253   2                     while(1)
 254   2                  {
 255   3                            GotoXY(10,1);
 256   3                    Print(zhen_temp);
*** WARNING C182 IN LINE 256 OF LCD1602.C: pointer to different objects
 257   3                                if(dot_dis)   
 258   3                              Print(".");
 259   3                              Print(xiaoshu_temp);
*** WARNING C182 IN LINE 259 OF LCD1602.C: pointer to different objects
 260   3                    //Print("     ");
 261   3                    delay(300);
 262   3                    GotoXY(10,1);
 263   3                    Print(str5);
 264   3                            delay(300);
 265   3                    DBPort=0xff;
 266   3                            buzzer=1;
 267   3                            delay(200);
 268   3                    buzzer=0;
 269   3                    //delay(5);
 270   3                            if(button(button1)==1||button(button2)==1||button(button3)==1||button(button4)==1)
 271   3                            break;
 272   3                          }
 273   2                  }
 274   1             }


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    871    ----
   CONSTANT SIZE    =     44    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =     55      16
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


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

⌨️ 快捷键说明

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