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

📄 main.lst

📁 带液晶显示屏的1拖8的EEPROM抄写器原代码,抄写速度很快,带校验功能.
💻 LST
字号:
C51 COMPILER V7.50   MAIN                                                                  09/20/2005 17:27:28 PAGE 1   


C51 COMPILER V7.50, COMPILATION OF MODULE MAIN
OBJECT MODULE PLACED IN main.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE main.c BROWSE DEBUG OBJECTEXTEND

line level    source

   1          
   2          
   3          #include<reg52.h>
   4          #include<ctype.h>
   5          #include<stdio.h>
   6          #include<string.h>
   7          #include<stdlib.h>
   8          #include<math.h>
   9          #include<absacc.h>
  10          #include<intrins.h>
  11          #include<stdarg.h>
  12          #include<setjmp.h>
  13          
  14          #include<define.h>
  15          #include<delay.h>
  16          #include<set.h>
  17          #include<RS232.h>
  18          #include<LCD.h>
  19          
  20          void disp(uchar nnn)
  21          {
  22   1         uchar su;
  23   1         uchar temp;
  24   1      
  25   1          su=nnn;
  26   1          f1=su&0x0f;
  27   1              temp=su>>4;f2=temp&0x0f;
  28   1              
  29   1      
  30   1              if (f1>9) f1+=0x37;      
  31   1              else f1+=0x30;
  32   1              if (f2>9) f2+=0x37;
  33   1              else f2+=0x30;
  34   1              
  35   1      }
  36          
  37          void disp5(uint nn)
  38          {
  39   1         uint su;
  40   1         uint temp;
  41   1         
  42   1              all+=nn;
  43   1      
  44   1              su=all;
  45   1      
  46   1              n1=su/10000;    temp=su%10000;
  47   1              n2=temp/1000;   temp=temp%1000;
  48   1              n3=temp/100;   temp=temp%100;
  49   1              n4=temp/10;   temp=temp%10;
  50   1              n5=temp;   
  51   1      
  52   1          if (n1>9) n1+=0x37;  
  53   1                else n1+=0x30;
  54   1              if (n2>9) n2+=0x37;      
  55   1                else n2+=0x30;
C51 COMPILER V7.50   MAIN                                                                  09/20/2005 17:27:28 PAGE 2   

  56   1              if (n3>9) n3+=0x37;      
  57   1                else n3+=0x30;
  58   1              if (n4>9) n4+=0x37;      
  59   1                else n4+=0x30;
  60   1              if (n5>9) n5+=0x37;      
  61   1                else n5+=0x30;
  62   1      }
  63          
  64          
  65          
  66          void main()
  67          {
  68   1        
  69   1         
  70   1      
  71   1        LEDY=0;LEDR=0;LEDG=0;delayms(60);
  72   1        LEDY=1;LEDR=1;LEDG=1;delayms(60);
  73   1        LEDY=0;LEDR=0;LEDG=0;delayms(60);
  74   1        LEDY=1;LEDR=1;LEDG=1;delayms(60);
  75   1      
  76   1      
  77   1        forreceive=0;
  78   1        sign=9;
  79   1      
  80   1        all=0;
  81   1      
  82   1         initialize_LCD() ;
  83   1      
  84   1         set_RS232();
  85   1         delayms(100);
  86   1      
  87   1         line_dis(0x80,&line1);
  88   1         line_dis(0xc0,&line2);
  89   1         line_dis(0x94,&line3);
  90   1         line_dis(0xd4,&line4);
  91   1      
  92   1         delayms(100);
  93   1      
  94   1      
  95   1      while(1)
  96   1      {
  97   2         if(sign==0)          //初始化
  98   2        {
  99   3         disp(str[0]);
 100   3          single_dis(1,18,f2); delayms(1);
 101   3              single_dis(1,19,f1); delayms(1);
 102   3      
 103   3         disp(str[1]);
 104   3              single_dis(2,5,f1);  delayms(1);
 105   3      
 106   3         disp(str[2]);
 107   3              single_dis(2,15,f1); delayms(1);
 108   3      
 109   3         disp(str[3]);
 110   3              single_dis(3,10,f2);delayms(1);
 111   3              single_dis(3,11,f1);
 112   3      
 113   3         disp(str[3]);
 114   3              single_dis(3,12,f2);delayms(1);
 115   3              single_dis(3,13,f1);delayms(1);
 116   3      
 117   3        forreceive=0;
C51 COMPILER V7.50   MAIN                                                                  09/20/2005 17:27:28 PAGE 3   

 118   3        sign=6;
 119   3        str[4]=8;
 120   3        }
 121   2      
 122   2      
 123   2        if(sign==1)              //抄写完成后
 124   2        {
 125   3         
 126   3      
 127   3         disp(str[0]);
 128   3              single_dis(2,5,f1);  
 129   3      
 130   3         disp(str[1]);
 131   3              single_dis(2,15,f1); 
 132   3      
 133   3         disp(str[2]);
 134   3              single_dis(3,10,f2); delayms(1);
 135   3              single_dis(3,11,f1);  
 136   3      
 137   3         disp(str[3]);
 138   3              single_dis(3,12,f2); delayms(1);
 139   3              single_dis(3,13,f1);
 140   3      
 141   3         disp5(str[0]);
 142   3              single_dis(4,10,n1); delayms(1);
 143   3              single_dis(4,11,n2); delayms(1);        
 144   3              single_dis(4,12,n3); delayms(1);
 145   3              single_dis(4,13,n4); delayms(1);
 146   3              single_dis(4,14,n5); 
 147   3              
 148   3      
 149   3        forreceive=0;
 150   3        sign=6;
 151   3        str[4]=8;
 152   3      
 153   3        }
 154   2        sign=str[4];
 155   2      }
 156   1        
 157   1      }
 158          
 159          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    967    ----
   CONSTANT SIZE    =    189    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =     21       6
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


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

⌨️ 快捷键说明

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