📄 鱼探仪.lst
字号:
C51 COMPILER V7.01 _鉥揭_ 05/09/2003 11:49:36 PAGE 1
C51 COMPILER V7.01, COMPILATION OF MODULE _鉥揭_
OBJECT MODULE PLACED IN .\鱼探仪.OBJ
COMPILER INVOKED BY: C:\KEIL\C51\BIN\C51.EXE .\鱼探仪.c LARGE DEBUG OBJECTEXTEND
stmt level source
1 #include<w77e58.h>
2 #include<intrins.h>
3 #include"main.h"
4
5 //#include <stdio.h>
6 void yasue();//数据压缩成500个数
7 void zdpe(); //判断最大值
8 void xlpe(); //判断最大斜率
9 uint haidewz();//海底值确定d
10 void yasuf();//数据压缩成250个数
11
12 sbit csd=P3^2;
13
14 void qdwer();//启动发射采集
15
16 void zdpbsa();
17
18 //*****************//
19 //深度
20 void sdset1();
21 void sdset2();
22 void sdset3();
23 void sdset4();
24 void sdset5();
25 void sdset6();
26 void sdset7();
27 void sdset8();
28 void sdset9();
29 void sdset10();
30 void sdset11();
31 void sdset12();
32 void sdset13();
33 void sdset14();
34 void sdset15();
35 void sdset16();
36 void sdset17();
37 void sdset18();
38 void sdset19();
39 void sdset20();
40 void sdset21();
41 void sdset22();
42 //********************//
43 void pbhd(uint f);
44
45 //*********************//
46 //功率
47 void glset1();
48 void glset2();
49 void glset3();
50 void glset4();
51 void glset5();
52 void glset6();
53 void glset7();
54 void glset8();
55 void glset9();
C51 COMPILER V7.01 _鉥揭_ 05/09/2003 11:49:36 PAGE 2
56 void glseta();
57 //*********************//
58 //main函数
59 //**************************************//
60 void plset();
61 void glset();
62 void kgset();
63 void zbset();
64 void sdset();
65 void zyset();
66 void stcset();
67 void ganset();
68 void jspl();
69 void kodai();
70 uint scsj();//判别设置参数
71 void wdcj();//温度采集
72 void sujucle();//数据处理
73 void sujuclf();
74 void yasud();
75 void sujuclg();
76 void yasus();//数据压缩成500个数
77 void yasuw();//数据压缩成250个数
78 uchar wdfu=0;
79 void plzusf();
80 void scsjq();//判别微调点参数
81
82 extern bit i2c_write(uchar address,uint fb);
83 //*********************************//
84 //ds1820
85 extern int Read_Temperature(void);
86 char xdata avb[10000];
87 extern uchar tongxin_rxd();//接收下传命令
88 extern void tongxin_txd(bit ewu);
89 extern void tongxin();
90 extern void cusiha();
91 extern void plsucu();
92 extern void plsm();
93 extern void stoptime2();
94
95 extern void timer2(uint r,uchar tiner);//发射功率载入
96 extern void qdtime2();//启动time2
97 static uint ak,al,az,ax,av,as,ad,ar,ay;
98 //extern uint i2c_read(uchar address);
99 void play_dog();
100 void clp_dog();
101 void off_dog();
102 uchar data cmb;//A/D采集点数几点压宿成一点
103 main()
104 {long i;
105 1 bit ey;
106 1 for(i=0;i<=10000;i++)
107 1
108 1 avb[i]=0x0a;
109 1 tongxin();//通信口设定
110 1 play_dog();
111 1 do
112 1 {
113 2 clp_dog();
114 2 cusiha();//读取参数,检测接口保证硬件ok
115 2 if((ram==0x00)|(e2prom==0x00)|(plsxe==0x00))
116 2 {
117 3 while(tongxin_rxd()>=0x00)
C51 COMPILER V7.01 _鉥揭_ 05/09/2003 11:49:36 PAGE 3
118 3 {
119 4 tongxin_txd(0);
120 4 ey=1;
121 4 clp_dog();
122 4 }
123 3 }
124 2 else ey=0;
125 2 }
126 1 while(ey);
127 1 zenyia=zenyi;
128 1 plsucu();//增益。频率。stc.设定
129 1 while(1)
130 1 {
131 2 switch(tongxin_rxd())
132 2 {
133 3 case 0x00: tongxin_txd(0);break; //空操作
134 3 case 0x01: plset(); tongxin_txd(0);break;//频率设置
135 3 case 0x02: glset(); tongxin_txd(0);break;//功率设置
136 3 case 0x03: kgset(); tongxin_txd(0);break;//开关
137 3 case 0x04: zbset(); tongxin_txd(0);break;//杂波设置
138 3 case 0x05: sdset(); tongxin_txd(0);break;//深度设置
139 3 case 0x06: zyset(); tongxin_txd(0);break;//增益设置
140 3 case 0x07: stcset();tongxin_txd(0);break; //stc设置
141 3 case 0x08: plsm(); tongxin_txd(0);break;//自动频率扫描确定探头频率
142 3 case 0x09: ganset();tongxin_txd(0);break;//干涉消除
143 3 case 0x0a: jspl(); tongxin_txd(0);break;//频率修正
144 3 case 0x0b: kodai(); tongxin_txd(0);break;//扩大倍数
145 3 case 0x0c: wdfu++;
146 3 if(wdfu>=60)
147 3 {
148 4 wdfu=0;
149 4 wdcj();
150 4 }
151 3 sukh=suk;
152 3 caijisendud=caijisendu;
153 3 plzusf();//频率和增益输出,stc,功率设定
154 3 pbhd(scsj());//判别设置参数,进入实际发射采集无海底扩大发射采集
155 3 haidisendu=0;
156 3 scsjq();//判别微调点参数
157 3 qdwer();//启动发射采集
158 3 sujucle();///海底数据处理
159 3
160 3 sujuclf();//无海底扩大数据处理压缩
161 3 tongxin_txd(0);//上传数据
162 3 break;
163 3 case 0x0d: wdfu++;
164 3 if(wdfu>=60)
165 3 {
166 4 wdfu=0;
167 4 wdcj();
168 4 }
169 3 sukh=suk;
170 3 caijisendud=caijisendu;
171 3 plzusf();//频率和增益输出,stc,功率设定
172 3 if(haidisendu<(scsj()*100))
173 3 {
174 4 haidisendu=0;
175 4 pbhd(scsj());//判别设置参数,进入实际发射采集无海底扩大发射采集
176 4 qdwer();//启动发射采集
177 4 sujucle();///海底数据处理
178 4 }
179 3 else { zdpbsa();//海底自动追踪
C51 COMPILER V7.01 _鉥揭_ 05/09/2003 11:49:36 PAGE 4
180 4 qdwer();//启动发射采集
181 4 sujucle();///海底数据处理
182 4 }
183 3 scsjq();//判别挡位微调点参数
184 3 sujuclg();//有海底扩大数据处理压缩
185 3 tongxin_txd(1);//上传数据
186 3 sujuclf();//无海底扩大数据处理压缩
187 3 tongxin_txd(0);//上传数据
188 3 break;
189 3 default: wdfu++;
190 3 if(wdfu>=60)
191 3 {
192 4 wdfu=0;
193 4 wdcj();
194 4 }
195 3 plzusf();//频率和增益输出,stc,功率设定
196 3
197 3 zdpbsa();//自动
198 3 caijisendud=caijisendue;
199 3 qdwer();//启动发射采集
200 3 sujucle();///海底数据处理
201 3 if(suk==0x0000)
202 3 {
203 4 sukh=0;
204 4 suk=0;
205 4 cm=cmb-1;
206 4 sujuclf();//无海底扩大数据处理压缩
207 4 tongxin_txd(0);//上传数据
208 4 }
209 3 else{
210 4 sukh=0;
211 4 suk=0;
212 4 sujuclg();//有海底扩大数据处理压缩
213 4 tongxin_txd(1);//上传数据
214 4 cm=cmb-1;
215 4 sujuclf();//无海底扩大数据处理压缩
216 4 tongxin_txd(0);//上传数据
217 4 }
218 3 }
219 2
220 2 }
221 1
222 1
223 1
224 1
225 1
226 1 }
227
228 void play_dog()
229 {
230 1
231 1
232 1 TA=0xaa;
233 1 TA=0x55;
234 1 WDCON=0x02;
235 1
236 1 }
237 void clp_dog()
238 {
239 1 TA=0xaa;
240 1 TA=0x55;
241 1 RWT=1;
C51 COMPILER V7.01 _鉥揭_ 05/09/2003 11:49:36 PAGE 5
242 1
243 1 }
244 void off_dog()
245 {
246 1
247 1 TA=0xaa;
248 1 TA=0x55;
249 1 WDCON=0x00;
250 1
251 1 }
252 void wdcj()//温度采集
253 {
254 1 wd=Read_Temperature();
255 1 if(wdcgaq)
256 1 sanwdbz=0x00;
257 1 else sanwdbz=0x01;
258 1 }
259
260
261
262
263
264 void plset()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -