📄 187.lst
字号:
C51 COMPILER V8.02 187 08/22/2007 17:57:22 PAGE 1
C51 COMPILER V8.02, COMPILATION OF MODULE 187
OBJECT MODULE PLACED IN 187.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE 187.c BROWSE DEBUG OBJECTEXTEND
line level source
1 #include<reg51.h>
2 #include<MAX187.h>
3 #include<lcd1602.h>
4 #define Uchar unsigned char
5 #define Uint unsigned int
6 unsigned long sum; //
7 void delayms(unsigned int x) //delay x ms
8 {
9 1 unsigned char j;
10 1 while((x--)!=0 )
11 1 { for(j=0;j<125;j++)
12 2 { ; }
13 2 }
14 1 }
15 void read(void)
16 { long int x;
17 1 //long float y;
18 1 long float result;
19 1 uchar temp[9];
20 1 // delayms(500);
21 1 max187(); //sum=(Adss*16+Date/16);
22 1 sum=Adss*16+Date/16; //Voltage-16 U0单位为mV
23 1 //sum=1024;
24 1 result=sum*100000;
25 1 //y=result
26 1 //y=100.0/(result*2.0);
27 1 // x=315003532;
28 1 x=(long int)result;
29 1 temp[0]=(uchar)(x/100000000);
30 1 temp[1]=(uchar)((x-temp[0]*100000000)/10000000);
31 1 temp[2]=(uchar)((x-temp[0]*100000000-temp[1]*10000000)/1000000);
32 1 temp[3]=(uchar)((x-temp[0]*100000000-temp[1]*10000000-temp[2]*1000000)/100000);
33 1 temp[4]=(uchar)((x-temp[0]*100000000-temp[1]*10000000-temp[2]*1000000-temp[3]*100000)/10000);
34 1 temp[5]=(uchar)((x-temp[0]*100000000-temp[1]*10000000-temp[2]*1000000-temp[3]*100000-temp[4]*10000)/1000
-);
35 1 temp[6]=(uchar)((x-temp[0]*100000000-temp[1]*10000000-temp[2]*1000000-temp[3]*100000-temp[4]*10000-temp[
-5]*1000)/100);
36 1 temp[7]=(uchar)((x-temp[0]*100000000-temp[1]*10000000-temp[2]*1000000-temp[3]*100000-temp[4]*10000-temp[
-5]*1000-temp[6]*100)/10);
37 1 temp[8]=(uchar)( x-temp[0]*100000000-temp[1]*10000000-temp[2]*1000000-temp[3]*100000-temp[4]*10000-temp[
-5]*1000-temp[6]*100-temp[7]*10);
38 1 clr();
39 1 load0();showchar(20,temp[0]+48);
40 1 load0();showchar(21,'.');
41 1 load0();showchar(22,temp[1]+48);
42 1 load0();showchar(23,temp[2]+48);
43 1 load0();showchar(24,temp[3]+48);
44 1 load0();showchar(25,temp[4]+48);
45 1 load0();showchar(26,temp[5]+48);
46 1 load0();showchar(27,temp[6]+48);
47 1 load0();showchar(28,temp[7]+48);
48 1 load0();showchar(29,temp[8]+48);
49 1
50 1
51 1 }
C51 COMPILER V8.02 187 08/22/2007 17:57:22 PAGE 2
52 void main(void)
53 { delayms(500);
54 1
55 1 load0();
56 1 display(0,table);
57 1 while(1)
58 1 {
59 2 delayms(500);
60 2 read();
61 2 }
62 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 2035 ----
CONSTANT SIZE = 68 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 6 21
IDATA SIZE = 3 ----
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 + -