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

📄 数据采集.lst

📁 采用C51单片机结合ADC0809模数转换器
💻 LST
字号:
C51 COMPILER V7.06   数_莶杉_                                                              08/12/2007 16:01:53 PAGE 1   


C51 COMPILER V7.06, COMPILATION OF MODULE 数_莶杉_
OBJECT MODULE PLACED IN 数据采集.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE 数据采集.c BROWSE DEBUG OBJECTEXTEND

stmt level    source

   1          #include<reg52.h>
   2          #include<intrins.h>
   3          #include <stdlib.h>
   4          #include <absacc.h>
   5          int code0[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0xc6};
   6          sbit p30=P3^0;sbit p31=P3^1;sbit p32=P3^2;sbit p33=P3^3;sbit p34=P3^4;sbit p35=P3^5;sbit p36=P3^6;sbit p37
             -=P3^7;
   7          void delay(int k)
   8          {while(k--);}
   9          
  10          void display(unsigned   char n1,n2,n3,n4)
  11          {int i;for(i=5;i>0;i--)
  12   1      { P1=code0[0];
  13   2        P2=0x01;delay(5);P1=code0[n1];delay(500);
  14   2        P2=0x02;delay(5);P1=code0[n2];delay(500);
  15   2        P2=0x04;delay(5);P1=code0[n3];delay(500);
  16   2        P2=0x08;delay(5);P1=code0[n4];delay(500);
  17   2        P2=0;}}
  18          main()
  19          {unsigned       char     n1=0,n2=0,n3=0,n4=0; 
  20   1      int s=0;int count=0;P0=0xff;     
  21   1      for(;;)
  22   1      {if(p33==0) count++;if(count==5)count=0;
  23   2      if(count==1){P3=0;p37=1;delay(100);p37=0;p36=1;s=P0;n2=s/100;n3=s%100/10;n4=s%10;delay(100); delay(100);p3
             -3=1;}
  24   2      if(count==2){P3=1;p37=1;delay(100);p37=0;p36=1;s=P0;n2=s/100;n3=s%100/10;n4=s%10;delay(100); delay(100);p3
             -3=1;}
  25   2      if(count==3){P3=2;p37=1;delay(100);p37=0;p36=1;s=P0;n2=s/100;n3=s%100/10;n4=s%10;delay(100); delay(100);p3
             -3=1;}
  26   2      if(count==4){P3=3;p37=1;delay(100);p37=0;p36=1;s=P0;n2=s/100;n3=s%100/10;n4=s%10;delay(100); delay(100);p3
             -3=1;}
  27   2      display(n1,n2,n3,n4);}}


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    364    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =     22      15
   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 + -