?? 數據采集.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 + -