📄 bxfor12c2052.lst
字号:
C51 COMPILER V7.50 BXFOR12C2052 09/16/2007 09:15:58 PAGE 1
C51 COMPILER V7.50, COMPILATION OF MODULE BXFOR12C2052
OBJECT MODULE PLACED IN bxfor12c2052.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE bxfor12c2052.C BROWSE DEBUG OBJECTEXTEND
line level source
1 /*#include <absacc.h>
2 #include <reg2051.h>
3 #include <stdio.h>
4 #include <intrins.h> */
5 #include <display.c>
*** ERROR C202 IN LINE 99 OF DISPLAY.C: 'err': undefined identifier
*** ERROR C202 IN LINE 107 OF DISPLAY.C: 'reset': undefined identifier
*** ERROR C202 IN LINE 136 OF DISPLAY.C: 'kjtime': undefined identifier
*** ERROR C202 IN LINE 139 OF DISPLAY.C: 'keytmp': undefined identifier
*** ERROR C202 IN LINE 158 OF DISPLAY.C: 'tempodds': undefined identifier
*** ERROR C202 IN LINE 159 OF DISPLAY.C: 'tempodds': undefined identifier
*** ERROR C202 IN LINE 160 OF DISPLAY.C: 'tempodds': undefined identifier
*** ERROR C202 IN LINE 164 OF DISPLAY.C: 'tempset': undefined identifier
*** ERROR C202 IN LINE 165 OF DISPLAY.C: 'tempset': undefined identifier
*** ERROR C202 IN LINE 166 OF DISPLAY.C: 'tempset': undefined identifier
*** ERROR C202 IN LINE 185 OF DISPLAY.C: 'tempodds': undefined identifier
*** ERROR C202 IN LINE 186 OF DISPLAY.C: 'tempodds': undefined identifier
*** ERROR C202 IN LINE 187 OF DISPLAY.C: 'tempodds': undefined identifier
*** ERROR C202 IN LINE 191 OF DISPLAY.C: 'tempset': undefined identifier
*** ERROR C202 IN LINE 192 OF DISPLAY.C: 'tempset': undefined identifier
*** ERROR C202 IN LINE 193 OF DISPLAY.C: 'tempset': undefined identifier
*** ERROR C202 IN LINE 219 OF DISPLAY.C: 'keytmp': undefined identifier
*** ERROR C202 IN LINE 225 OF DISPLAY.C: 'keybb': undefined identifier
*** ERROR C202 IN LINE 226 OF DISPLAY.C: 'kjtime': undefined identifier
*** ERROR C202 IN LINE 227 OF DISPLAY.C: 'keytmp': undefined identifier
*** ERROR C202 IN LINE 233 OF DISPLAY.C: 'keybb': undefined identifier
*** ERROR C202 IN LINE 234 OF DISPLAY.C: 'keytmp': undefined identifier
6
7 #define ulong unsigned long
8 #define uint unsigned int
9 #define uchar unsigned char
10 uint tempsheding=60;
11 uint tempwenchar=10;
12
13
14 sbit ctrl=P3^7; //输出控制//
*** ERROR C231 IN LINE 14 OF BXFOR12C2052.C: 'ctrl': redefinition
15 sbit DQ =P3^5; //DS18B201线串口//
16 sfr seg=0x90; //P1口//
*** ERROR C231 IN LINE 16 OF BXFOR12C2052.C: 'seg': redefinition
17
18 uint data temp_set; //设定温度值存贮位//
19 uint data temp_odds; //设定高低温差存贮位(+-差)//
20 uint data temp_top;
21 uint data temp_bottom;
22 uint data gaowen; //存贮的最高温度//
23 uint data diwen; //存贮的最低温度//
24 uchar data qdtime; //电机开机时间计时器//
25 uchar data tjtime; //电机停机时间计时器//
26 uchar data kaijicount=6; //开机次数计数器,6个周期以后才能计算平均值
27 bit tiaozhengbz;
28 uchar data tmpgaowen;
29 uchar data tmpdiwen;
30
31 //uint data shuju[4]=0; //16位数据暂存共4个//
C51 COMPILER V7.50 BXFOR12C2052 09/16/2007 09:15:58 PAGE 2
32 //uchar data sjcount; //数据存放计数器//
33 uint data shujuequ; //温度数据平均值,做为最后数据判断用//
34 uchar data zhcount; //DS18B20转换时间计数器,在12位分辨率时为750MS//
35 bit zhuanhuan; //温度转换启动标志//
36
37
38
39 bit kjbz; //电机开关机标志//
40 bit err; //温度转换错误标志//
41 bit reset; //上电标志位//
42
43
44 void int3()interrupt 3 using 2
45 {
46 1
47 1 TR1=0;
48 1 TH1=0xb8;
49 1 TL1=0x10;
50 1 TR1=1;
51 1
52 1
53 1
54 1 jishitmp++; //计时计数器更新//
55 1
56 1 jishi20ms++; //计时时间更新,最终以分钟为单位循环计时//
*** ERROR C202 IN LINE 56 OF BXFOR12C2052.C: 'jishi20ms': undefined identifier
57 1 if (jishi20ms>=50)
*** ERROR C202 IN LINE 57 OF BXFOR12C2052.C: 'jishi20ms': undefined identifier
58 1 {
59 2 jishi20ms=0;
*** ERROR C202 IN LINE 59 OF BXFOR12C2052.C: 'jishi20ms': undefined identifier
60 2 jishisec++;
61 2 if (jishisec>=60)
62 2 {
63 3 jishisec=0;
64 3 jishimin++;
65 3 }
66 2 }
67 1 }
*** ERROR C237 IN LINE 67 OF BXFOR12C2052.C: 'int3': function already has a body
68
69
70
71 /*void shujupj()
72 {
73 uchar i;
74 uint temp;
75 for (i=0;i<=3;i++)
76 {
77 temp=temp+shuju[i];
78 }
79 shujuequ=temp/4;
80 }
81 */
82 void htod_change() //十六进制转十进制并查表存入显示缓冲区//
83 {
84 1 uint temp;
85 1 uchar a[3];
86 1 temp=disbuf16;
87 1 if (disbuf16>999)
88 1 disbuf16=0;
89 1
C51 COMPILER V7.50 BXFOR12C2052 09/16/2007 09:15:58 PAGE 3
90 1 a[0]=temp/100;
91 1 temp=temp-a[0]*100;
92 1 a[1]=temp/10;
93 1 a[2]=temp-a[1]*10;
94 1 disbuffer[1]=dismap[a[0]];
95 1 disbuffer[2]=dismap[a[1]];
96 1 disbuffer[3]=dismap[a[2]];
97 1 }
98
99 void buff_to_disbuff() //根据键不同将不同的内容送入缓冲区.//
100 {
101 1
102 1 switch (keydata)
*** ERROR C202 IN LINE 102 OF BXFOR12C2052.C: 'keydata': undefined identifier
103 1 {
104 2 case (0):
105 2 {
106 3 disbuf16=shujuequ;
107 3 disbuffer[0]=0x73;
108 3 break;
109 3 }
110 2 case (1):
111 2 {
112 3 disbuf16=shujuequ;
113 3 disbuffer[0]=0x73;
114 3 break;
115 3 }
116 2 case 2:
117 2 {
118 3 disbuf16=gaowen;
119 3 disbuffer[0]=0x33;
120 3 break;
121 3 }
122 2 case 3:
123 2 {
124 3 disbuf16=diwen;
125 3 disbuffer[0]=0x3c;
126 3 break;
127 3 }
128 2 case 4:
129 2 {
130 3 disbuf16=qdtime;
131 3 disbuffer[0]=0x79;
132 3 break;
133 3 }
134 2 case 5:
135 2 {
136 3 disbuf16=tjtime;
137 3 disbuffer[0]=0x4f;
138 3 break;
139 3 }
140 2 case 0x10:
141 2 {
142 3 disbuf16=tempset;
*** ERROR C202 IN LINE 142 OF BXFOR12C2052.C: 'tempset': undefined identifier
143 3 disbuffer[0]=0x36;
144 3 break;
145 3 }
146 2 case 0x20:
147 2 {
148 3 disbuf16=tempodds;
*** ERROR C202 IN LINE 148 OF BXFOR12C2052.C: 'tempodds': undefined identifier
C51 COMPILER V7.50 BXFOR12C2052 09/16/2007 09:15:58 PAGE 4
149 3 disbuffer[0]=0x09;
150 3 break;
151 3 }
152 2
153 2 }
154 1 htod_change();
155 1 }
156
157
158
159 bit Init_DS18B20() //18b20初始化//
160 {
161 1 unsigned char x=0;
162 1 uchar c=0;
163 1 DQ = 1; //DQ复位
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -