📄 detect.lst
字号:
201 000000 ;*******************************************************
202 000000 cookertempdetect:
203 000000 b0bts0 malfunctionflag
204 000000 jmp currentdetect90 ;有故障,退出
205 000000 b0bts0 ADCendflag
206 000000 jmp cookertempdetect70
207 000000 b0bts0 ADCstartflag
208 000000 jmp cookertempdetect60
209 000000 ;-----
210 000000 bset ADCstartflag
211 000000 mov a,#04h
212 000000 mov p4con,a ;isolate an2
213 000000 mov a,#02h
214 000000 mov adm,a ;enable an2
215 000000 mov_ ADCcnt,#4
216 000000 clr ADCvaluel
217 000000 clr ADCvalueh
218 000000 ;-----
219 000000 cookertempdetect60:
220 000000 call mnADconvert
221 000000 ret
222 000000 ;-----
223 000000 ;取出AD值,进行比较
224 000000 cookertempdetect70:
225 000000 ;-----
226 000000 bset onecycleflag
227 000000 bset volADCflag
228 000000 bclr cyclestartflag
229 000000 bclr curADCflag
230 000000 bclr IgbtADCflag
231 000000 bclr cookerADCflag
232 000000 bclr ADCstartflag
233 000000 bclr ADCendflag
234 000000 ;-----
235 000000 ;温度传感器开、短路分析
236 000000 call sensoranalyse
237 000000 ;-----
238 000000 b0bts0 malfunctionflag
239 000000 jmp cookertempdetect90
240 000000 ;-----
241 000000 ;过热分析
242 000000 call hotestanalyse
243 000000 ;-----
244 000000 ;干烧分析
245 000000 ;// call nowateranalyse
246 000000 ;-----
247 000000 b0bts0 malfunctionflag
248 000000 jmp cookertempdetect90
249 000000 ;-----
250 000000 ;温度控制
251 000000 b0bts0 overtempflag
252 000000 jmp cookertempdetect80
253 000000 ;-----
254 000000 mov_ temp0,ADCtempbufl
255 000000 mov_ temp1,ADCtempbufh
256 000000 ;-----
257 000000 mov a,ADCvaluel
258 000000 sub a,temp0
259 000000 mov a,ADCvalueh
260 000000 sbc a,temp1 ;ADCvalue-temp
261 000000 b0bts1 fc
262 000000 jmp cookertempdetect90 ;没有超温
263 000000 ;-----
264 000000 ;在哪一功能下
265 000000 mov a,flag3
266 000000 and a,#00011000b
267 000000 b0bts0 fz
268 000000 jmp stopheat
269 000000 b0bts1 fourthstepflag
270 000000 jmp cookertempdetect50
271 000000 ;-----------------------
272 000000 stopheat:
273 000000 bset overtempflag
274 000000 bclr fpwm1out
275 000000 bclr ftc1enb ;stop t1 pwm
276 000000 bclr ptpwm
277 000000 ret
278 000000 ;----------------------
279 000000 cookertempdetect50:
280 000000 bset tempcomeflag
281 000000 ret
282 000000 ;----------------------
283 000000 cookertempdetect80:
284 000000 ;-----
285 000000 mov_ temp0,ADCtempbufl ;超温后,温度往下降个10点再加热
286 000000 mov_ temp1,ADCtempbufh
287 000000 mov a,temp0
288 000000 sub a,#51h
289 000000 mov temp0,a
290 000000 mov a,#0
291 000000 mov temp2,a
292 000000 mov a,temp1
293 000000 sbc a,temp2
294 000000 mov temp1,a
295 000000 ;-----
296 000000 mov a,ADCvaluel
297 000000 sub a,temp0
298 000000 mov a,ADCvalueh
299 000000 sbc a,temp1 ;ADCvalue-temp
300 000000 b0bts0 fc
301 000000 jmp cookertempdetect90
302 000000 ;---
303 000000 bclr overtempflag
304 000000 bclr Igbtstartupflag
305 000000 ;-----
306 000000 cookertempdetect90:
307 000000 ret
308 000000
309 000000 ;**********************************************
310 000000 ;Name :cookercheck
311 000000 ;Function:无锅具、锅具材料不合、小物件检测
312 000000 ;Input :
313 000000 ;Output :
314 000000 ;Register Used:var3,var4
315 000000 ;***********************************************
316 000000 cookercheck:
317 000000 ;-----
318 000000 b0bts1 operateflag
319 000000 jmp cookercheck90
320 000000 b0bts0 stoprunflag
321 000000 jmp cookercheck90
322 000000 b0bts0 malfunctionflag
323 000000 jmp cookercheck90 ;其他故障
324 000000 b0bts0 abnormalvoltfalg
325 000000 jmp cookercheck90 ;市电电压不正常
326 000000 b0bts0 stopheatflag
327 000000 jmp cookercheck90 ;间歇加热停止时,不检测锅
328 000000 b0bts0 checkcookerflag
329 000000 jmp cookercheck80
330 000000 b0bts0 detecttimeflag
331 000000 jmp cookercheck70
332 000000 ;------------------------
333 000000 bset detecttimeflag
334 000000 bclr checkingflag
335 000000 bclr havecookerflag
336 000000 bclr pulsetimeflag
337 000000 bclr ADCstartflag
338 000000 bclr ADCendflag
339 000000 mov_ pulsetimer,#200 ;工作状态下,1秒钟检测一次
340 000000 ;------
341 000000 mov_ tc1r,#cookerpwmvalue ;发试探信号,检测锅
342 000000 bset fp01ien
343 000000 ret
344 000000 ;-----------------
345 000000 cookercheck70:
346 000000 ;----
347 000000 b0bts0 ADCendflag
348 000000 jmp cookercheckend
349 000000 b0bts0 ADCstartflag
350 000000 jmp cookercheckagain
351 000000 bset ADCstartflag
352 000000 mov a,#02h
353 000000 mov p4con,a ;isolate an1
354 000000 mov a,#01h
355 000000 mov adm,a ;enable an1
356 000000 mov_ ADCcnt,#4
357 000000 clr ADCvaluel
358 000000 clr ADCvalueh
359 000000 ;-----
360 000000 cookercheckagain:
361 000000 call mnADconvert
362 000000 ret
363 000000 ;-----
364 000000 cookercheckend:
365 000000 bset cyclestartflag
366 000000 bset checkcookerflag
367 000000 bclr detecttimeflag
368 000000 bclr ADCstartflag
369 000000 bclr ADCendflag
370 000000 bclr secondflag
371 000000 mov_ var3,#ADCnocookerl
372 000000 mov_ var4,#ADCnocookerh
373 000000 ;-----
374 000000 ;比较参数
375 000000 mov a,ADCvaluel
376 000000 sub a,var3
377 000000 mov a,ADCvalueh
378 000000 sbc a,var4
379 000000 b0bts0 fc
380 000000 jmp havecookerdeal
381 000000 ;---------------
382 000000 ;无锅处理
383 000000 b0bts0 checktimeflag
384 000000 jmp checkingtime
385 000000 bset checktimeflag
386 000000 mov_ timer1m,#60
387 000000 bclr oneminuteflag
388 000000 bclr havecookerflag
389 000000 bclr ptcout ;close IGBT
390 000000 bclr fpwm1out
391 000000 bclr ftc1enb ;stop t1 pwm
392 000000 bclr fp01ien
393 000000 bclr ptpwm
394 000000 ;-----
395 000000 mov_ seg1temp,seg1buf
396 000000 mov_ seg2temp,seg2buf
397 000000 mov_ seg3temp,seg3buf
398 000000 mov_ seg1buf,#Errorvalue
399 000000 mov_ seg2buf,#Errorvalue1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -