⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.asm

📁 应用松翰母体写的一款电磁炉
💻 ASM
字号:
;-----------------------------------------------
;******************Program code segment*********
;-----------------------------------------------
.CODE

	ORG	000h				;Code section start
	jmp	Start				;Reset vector
						;Address 4 to 7 are reserved
	ORG	008h
	jmp	InterruptSub			;Interrupt vector

	ORG	010h
;**************************************************
;***************************************************
Start:
	nop
	nop
	call	Pdelay		;//Power on delay
;-----	
	b0bts1	fnt0
	jmp	wdtresetsub	;//watch dog reset way,no need initialize
;-----	
TurnOnInitial:
	call	PortInitial	
	call	RAMInitial
	call	SysInitial
;-----
wdtresetsub:
	
;**********************************************
MainLoop:
;//User need write the main routine Program.
	nop
	@RST_WDT		;//User can use Macro instrution  REST_WATCHDOG
	call	mnintgnd	;//interface between interrupt and main
	call	mnkey		;//Interface between machine and human
	call	mndisplay	;//显示控制
	call	mntwinkle	;//闪烁控制
	call	mnapp		;//按键、功能控制
	call	poweronsub	;//上电控制
	call	mngetdata	;//显示数据控制
	call	mncontroll	;//单片机工作控制
	call	mcustate	;//单片机的工作状态判定
	call	mndetect	;//各种参数检测
	call	mnchecktime	;//两小时无键操作控制
	call	cookercheck	;//锅具检测
	call	mnintermission	;//功率在600W以下采用间歇加热控制
	jmp	MainLoop
;*****************************************************
;*****************************************************
;*****************************************************
mnchecktime:
	b0bts0	stoprunflag
	jmp	mnchecktime90
;----
	mov	a,flag3
	and	a,#01100111b
	b0bts0	fz		;在煮米饭、煲汤功能下无效
	jmp	mnchecktime90
	b0bts1	t2hflag
	jmp	mnchecktime90
;----
	bset	stoprunflag	;两小时无操作,自动关机
	bset	buzzerflag
	mov_	buzzercnt,#10	;叫5声
;-----
mnchecktime90:
	ret

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -