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

📄 mjl-cn.asm

📁 用PIC控制lcd-12232F液晶LCD的中文显示
💻 ASM
📖 第 1 页 / 共 3 页
字号:

; PicBasic Pro Compiler 2.45, (c) 1998, 2004 microEngineering Labs, Inc. All Rights Reserved.  
PM_USED			EQU	1

	INCLUDE	"16F877.INC"


; Define statements.
#define		CODE_SIZE		 8
#define		LCD_DREG		        PORTD           
#define		LCD_DBIT		        4
#define		LCD_RSREG		       PORTE
#define		LCD_RSBIT		       0
#define		LCD_EREG		        PORTE
#define		LCD_EBIT		        1

RAM_START       		EQU	00020h
RAM_END         		EQU	001EFh
RAM_BANKS       		EQU	00004h
BANK0_START     		EQU	00020h
BANK0_END       		EQU	0007Fh
BANK1_START     		EQU	000A0h
BANK1_END       		EQU	000EFh
BANK2_START     		EQU	00110h
BANK2_END       		EQU	0016Fh
BANK3_START     		EQU	00190h
BANK3_END       		EQU	001EFh
EEPROM_START    		EQU	02100h
EEPROM_END      		EQU	021FFh

R0              		EQU	RAM_START + 000h
R1              		EQU	RAM_START + 002h
R2              		EQU	RAM_START + 004h
R3              		EQU	RAM_START + 006h
R4              		EQU	RAM_START + 008h
R5              		EQU	RAM_START + 00Ah
R6              		EQU	RAM_START + 00Ch
R7              		EQU	RAM_START + 00Eh
R8              		EQU	RAM_START + 010h
T1              		EQU	RAM_START + 012h
T2              		EQU	RAM_START + 014h
FLAGS           		EQU	RAM_START + 016h
GOP             		EQU	RAM_START + 017h
RM1             		EQU	RAM_START + 018h
RM2             		EQU	RAM_START + 019h
RR1             		EQU	RAM_START + 01Ah
RR2             		EQU	RAM_START + 01Bh
_chrm            		EQU	RAM_START + 01Ch
_counts          		EQU	RAM_START + 01Eh
_incounts        		EQU	RAM_START + 020h
_j               		EQU	RAM_START + 022h
_l               		EQU	RAM_START + 024h
_ofhrm           		EQU	RAM_START + 026h
_onhrm           		EQU	RAM_START + 028h
_qqq             		EQU	RAM_START + 02Ah
_almp            		EQU	RAM_START + 02Ch
_bcdh            		EQU	RAM_START + 02Dh
_bcdl            		EQU	RAM_START + 02Eh
_cbcd            		EQU	RAM_START + 02Fh
_cdate           		EQU	RAM_START + 030h
_cday            		EQU	RAM_START + 031h
_chr             		EQU	RAM_START + 032h
_clmp            		EQU	RAM_START + 033h
_cmin            		EQU	RAM_START + 034h
_cmonth          		EQU	RAM_START + 035h
_countcnt        		EQU	RAM_START + 036h
_cyear           		EQU	RAM_START + 037h
_dtime           		EQU	RAM_START + 038h
_dtimecnt        		EQU	RAM_START + 039h
_hcnt            		EQU	RAM_START + 03Ah
_i               		EQU	RAM_START + 03Bh
_incountcnt      		EQU	RAM_START + 03Ch
_m               		EQU	RAM_START + 03Dh
_modecnt         		EQU	RAM_START + 03Eh
_n               		EQU	RAM_START + 03Fh
_ofhr            		EQU	RAM_START + 040h
_ofm             		EQU	RAM_START + 041h
_onhr            		EQU	RAM_START + 042h
_onm             		EQU	RAM_START + 043h
_powercnt        		EQU	RAM_START + 044h
_rtccontrol      		EQU	RAM_START + 045h
_rtcdate         		EQU	RAM_START + 046h
_rtcday          		EQU	RAM_START + 047h
_rtchr           		EQU	RAM_START + 048h
_rtcmin          		EQU	RAM_START + 049h
_rtcmonth        		EQU	RAM_START + 04Ah
_rtcsec          		EQU	RAM_START + 04Bh
_rtcyear         		EQU	RAM_START + 04Ch
_runcnt          		EQU	RAM_START + 04Dh
_runsec          		EQU	RAM_START + 04Eh
_runtimes        		EQU	RAM_START + 04Fh
_setcnt          		EQU	RAM_START + 050h
_whour           		EQU	RAM_START + 051h
_wnmb            		EQU	RAM_START + 052h
_PORTL           		EQU	 PORTB
_PORTH           		EQU	 PORTC
_TRISL           		EQU	 TRISB
_TRISH           		EQU	 TRISC
#define _RST             	_PORTA_2
#define _IO              	_PORTC_1
#define _SCLK            	_PORTC_3
#define _SDA             	_PORTC_4
#define _PORTA_2         	 PORTA, 002h
#define _PORTC_1         	 PORTC, 001h
#define _PORTC_3         	 PORTC, 003h
#define _PORTC_4         	 PORTC, 004h
#define _OPTION_REG_7    	 OPTION_REG, 007h
#define _PORTE_2         	 PORTE, 002h
#define _PORTC_2         	 PORTC, 002h
#define _PORTC_0         	 PORTC, 000h
#define _PORTB_6         	 PORTB, 006h
#define _PORTD_1         	 PORTD, 001h
#define _PORTD_2         	 PORTD, 002h
#define _PORTB_4         	 PORTB, 004h
#define _PORTB_7         	 PORTB, 007h
#define _PORTB_5         	 PORTB, 005h
#define _PORTB_0         	 PORTB, 000h
#define _PORTB_1         	 PORTB, 001h
#define _PORTB_2         	 PORTB, 002h
#define _PORTB_3         	 PORTB, 003h

; Constants.
_T2400           		EQU	00000h
_T1200           		EQU	00001h
_T9600           		EQU	00002h
_T300            		EQU	00003h
_N2400           		EQU	00004h
_N1200           		EQU	00005h
_N9600           		EQU	00006h
_N300            		EQU	00007h
_OT2400          		EQU	00008h
_OT1200          		EQU	00009h
_OT9600          		EQU	0000Ah
_OT300           		EQU	0000Bh
_ON2400          		EQU	0000Ch
_ON1200          		EQU	0000Dh
_ON9600          		EQU	0000Eh
_ON300           		EQU	0000Fh
_MSBPRE          		EQU	00000h
_LSBPRE          		EQU	00001h
_MSBPOST         		EQU	00002h
_LSBPOST         		EQU	00003h
_LSBFIRST        		EQU	00000h
_MSBFIRST        		EQU	00001h
_CLS             		EQU	00000h
_HOME            		EQU	00001h
_BELL            		EQU	00007h
_BKSP            		EQU	00008h
_TAB             		EQU	00009h
_CR              		EQU	0000Dh
_UnitOn          		EQU	00012h
_UnitOff         		EQU	0001Ah
_UnitsOff        		EQU	0001Ch
_LightsOn        		EQU	00014h
_LightsOff       		EQU	00010h
_Dim             		EQU	0001Eh
_Bright          		EQU	00016h
	INCLUDE	"MJL-CN.MAC"
	INCLUDE	"PBPPIC14.LIB"

	MOVE?CT	000h, _OPTION_REG_7
	MOVE?CB	004h, ADCON1
	LOW?T	_PORTE_2
	PAUSE?C	064h
	MOVE?CB	000h, PORTA
	MOVE?CB	033h, TRISA
	MOVE?CB	000h, _clmp
	MOVE?CB	000h, _almp
	LOW?T	_PORTC_2
	LOW?T	_RST
	LOW?T	_SCLK
	MOVE?CB	000h, _modecnt
	MOVE?CB	000h, _setcnt
	MOVE?CB	000h, _powercnt
	MOVE?CB	000h, _runcnt
	MOVE?CB	000h, _countcnt
	MOVE?CB	000h, _incountcnt
	MOVE?CB	000h, _dtimecnt
	MOVE?CB	000h, _wnmb
	MOVE?CB	000h, _hcnt
	MOVE?CB	001h, _dtime
	MOVE?CB	001h, _runtimes
	MOVE?CB	00Ah, _runsec
	MOVE?CW	000h, _counts
	MOVE?CW	000h, _incounts
	MOVE?CB	000h, _cyear
	MOVE?CB	000h, _cday
	MOVE?CB	000h, _cmonth
	MOVE?CB	000h, _chr
	MOVE?CB	000h, _cmin
	MOVE?CW	000h, _j
	LABEL?L	L00001	
	CMPGT?WCL	_j, 006h, L00002
	I2CDATA?T	_SDA
	I2CCLOCK?T	_SCLK
	I2CWRITE?C	0A0h
	I2CWRITE?W	_j
	I2CREAD?B	_onhr
	I2CREAD?B	_onm
	I2CREAD?B	_ofhr
	I2CREADS?B	_ofm
	PAUSE?C	00Ah
	NEXT?WCL	_j, 002h, L00001
	LABEL?L	L00002	
	MOVE?CW	00Ah, _j
	LABEL?L	L00003	
	CMPGT?WCL	_j, 00Eh, L00004
	I2CDATA?T	_SDA
	I2CCLOCK?T	_SCLK
	I2CWRITE?C	0A0h
	I2CWRITE?W	_j
	I2CREAD?W	_onhrm
	I2CREADS?W	_ofhrm
	PAUSE?C	00Ah
	NEXT?WCL	_j, 002h, L00003
	LABEL?L	L00004	
	MOVE?CW	014h, _j
	LABEL?L	L00005	
	CMPGT?WCL	_j, 016h, L00006
	I2CDATA?T	_SDA
	I2CCLOCK?T	_SCLK
	I2CWRITE?C	0A0h
	I2CWRITE?W	_j
	I2CREAD?B	_runtimes
	I2CREADS?B	_runsec
	PAUSE?C	00Ah
	NEXT?WCL	_j, 002h, L00005
	LABEL?L	L00006	
	MOVE?CW	01Eh, _j
	LABEL?L	L00007	
	CMPGT?WCL	_j, 020h, L00008
	I2CDATA?T	_SDA
	I2CCLOCK?T	_SCLK
	I2CWRITE?C	0A0h
	I2CWRITE?W	_j
	I2CREADS?W	_counts
	PAUSE?C	00Ah
	NEXT?WCL	_j, 002h, L00007
	LABEL?L	L00008	
	MOVE?CW	028h, _j
	LABEL?L	L00009	
	CMPGT?WCL	_j, 02Ah, L00010
	I2CDATA?T	_SDA
	I2CCLOCK?T	_SCLK
	I2CWRITE?C	0A0h
	I2CWRITE?W	_j
	I2CREADS?W	_incounts
	PAUSE?C	00Ah
	NEXT?WCL	_j, 002h, L00009
	LABEL?L	L00010	
	MOVE?CW	032h, _j
	LABEL?L	L00011	
	CMPGT?WCL	_j, 036h, L00012
	I2CDATA?T	_SDA
	I2CCLOCK?T	_SCLK
	I2CWRITE?C	0A0h
	I2CWRITE?W	_j
	I2CREAD?B	_wnmb
	I2CREAD?B	_whour
	I2CREADS?B	_hcnt
	PAUSE?C	00Ah
	NEXT?WCL	_j, 002h, L00011
	LABEL?L	L00012	
	MOVE?CW	03Ch, _j
	LABEL?L	L00013	
	CMPGT?WCL	_j, 03Dh, L00014
	I2CDATA?T	_SDA
	I2CCLOCK?T	_SCLK
	I2CWRITE?C	0A0h
	I2CWRITE?W	_j
	I2CREADS?B	_dtime
	PAUSE?C	00Ah
	NEXT?WCL	_j, 002h, L00013
	LABEL?L	L00014	
	MOVE?CW	046h, _j
	LABEL?L	L00015	
	CMPGT?WCL	_j, 047h, L00016
	I2CDATA?T	_SDA
	I2CCLOCK?T	_SCLK
	I2CWRITE?C	0A0h
	I2CWRITE?W	_j
	I2CREADS?B	_clmp
	PAUSE?C	00Ah
	NEXT?WCL	_j, 002h, L00015
	LABEL?L	L00016	
	MOVE?CW	050h, _j
	LABEL?L	L00017	
	CMPGT?WCL	_j, 051h, L00018
	I2CDATA?T	_SDA
	I2CCLOCK?T	_SCLK
	I2CWRITE?C	0A0h
	I2CWRITE?W	_j
	I2CREADS?B	_almp
	PAUSE?C	00Ah
	NEXT?WCL	_j, 002h, L00017
	LABEL?L	L00018	
	MOVE?CB	001h, PORTB
	MOVE?CB	0FFh, TRISB
	MOVE?CT	001h, _PORTC_0
	MOVE?CB	001h, TRISC

	LABEL?L	_main	
	GOSUB?L	_init
	GOSUB?L	_testwork
	GOSUB?L	_mode
	GOSUB?L	_gettime
	GOSUB?L	_tohex
	CMPEQ?BCL	_wnmb, 000h, L00019
	GOSUB?L	_rweeks
	LABEL?L	L00019	
	MUL?BCW	_chr, 03Ch, T1
	ADD?WBW	T1, _cmin, _chrm
	CMPLE?WWL	_ofhrm, _onhrm, L00021
	SUB?WCW	_onhrm, 001h, T1
	CMPLT?WWB	T1, _chrm, T1
	CMPLT?WWB	_chrm, _ofhrm, T2
	LAND?BBW	T1, T2, T2
	CMPF?WL	T2, L00023
	GOSUB?L	_workinglcd
	CMPNE?TCL	_PORTB_6, 000h, L00025
	MOVE?CB	001h, _i
	LABEL?L	L00027	
	CMPGT?BBL	_i, _dtime, L00028
	PAUSE?C	00Ah
	NEXT?BCL	_i, 001h, L00027
	LABEL?L	L00028	
	CMPNE?TCL	_PORTB_6, 000h, L00029
	ADD?WCW	_incounts, 001h, _incounts
	GOSUB?L	_incountdata
	GOSUB?L	_takein
	LABEL?L	L00029	
	LABEL?L	L00025	
	GOTO?L	_main
	GOTO?L	L00024
	LABEL?L	L00023	
	GOSUB?L	_waitinglcd
	GOTO?L	_main
	LABEL?L	L00024	
	LABEL?L	L00021	
	CMPGE?WWL	_ofhrm, _onhrm, L00031
	SUB?WCW	_ofhrm, 001h, T1
	CMPLT?WWB	T1, _chrm, T1
	CMPLT?WWB	_chrm, _onhrm, T2
	LAND?BBW	T1, T2, T2
	CMPF?WL	T2, L00033
	GOSUB?L	_waitinglcd
	GOTO?L	_main
	GOTO?L	L00034
	LABEL?L	L00033	
	GOSUB?L	_workinglcd
	CMPNE?TCL	_PORTB_6, 000h, L00035
	MOVE?CB	001h, _i
	LABEL?L	L00037	
	CMPGT?BBL	_i, _dtime, L00038
	PAUSE?C	00Ah
	NEXT?BCL	_i, 001h, L00037
	LABEL?L	L00038	
	CMPNE?TCL	_PORTB_6, 000h, L00039
	ADD?WCW	_incounts, 001h, _incounts
	GOSUB?L	_incountdata
	GOSUB?L	_takein
	LABEL?L	L00039	
	LABEL?L	L00035	
	GOTO?L	_main
	LABEL?L	L00034	
	LABEL?L	L00031	
	GOSUB?L	_waitinglcd
	GOTO?L	_main

	LABEL?L	_takein	
	HIGH?T	_PORTD_1
	PAUSE?C	00BB8h
	MOVE?CB	001h, _n
	LABEL?L	L00041	
	CMPGT?BBL	_n, _runtimes, L00042
	LCDOUT?C	0FEh
	LCDOUT?C	002h
	LCDOUT?C	0FEh
	LCDOUT?C	00Ch
	LCDOUT?C	0FEh
	LCDOUT?C	001h
	LCDOUT?C	0D7h
	LCDOUT?C	0D4h
	LCDOUT?C	0B6h
	LCDOUT?C	0AFh
	LCDOUT?C	0B2h
	LCDOUT?C	0B6h
	LCDOUT?C	0BBh
	LCDOUT?C	0F1h
	LCDOUT?C	0D4h
	LCDOUT?C	0CBh
	LCDOUT?C	0D0h
	LCDOUT?C	0D0h
	LCDOUT?C	0FEh
	LCDOUT?C	002h
	LCDOUT?C	0FEh
	LCDOUT?C	00Ch
	LCDOUT?C	0FEh
	LCDOUT?C	090h
	LCDOUT?C	0D4h
	LCDOUT?C	0CBh
	LCDOUT?C	0D0h
	LCDOUT?C	0D0h
	LCDOUT?C	0B4h
	LCDOUT?C	0CEh
	LCDOUT?C	0CAh
	LCDOUT?C	0FDh
	LCDOUT?C	0A1h
	LCDOUT?C	0C3h
	LCDOUT?C	020h
	LCDOUT?C	020h
	LCDOUTCOUNT?C	002h
	LCDOUTNUM?B	_n
	LCDOUTDEC?	
	PAUSE?C	0012Ch
	HIGH?T	_PORTD_2
	GOSUB?L	_runsecond
	LOW?T	_PORTD_2
	GOSUB?L	_fivesec
	NEXT?BCL	_n, 001h, L00041
	LABEL?L	L00042	
	LOW?T	_PORTD_1
	MOVE?CB	001h, _almp
	GOSUB?L	_alnormalflagdata
	GOTO?L	_catcherror
	RETURN?	

	LABEL?L	_init	
	CMPNE?TCL	_PORTC_0, 000h, L00043
	PAUSE?C	01F40h
	CMPEQ?TCL	_PORTC_0, 000h, _initializing
	LABEL?L	L00043	
	RETURN?	

	LABEL?L	_initializing	
	MOVE?CB	002h, _rtcyear
	MOVE?CB	004h, _rtcday
	MOVE?CB	001h, _rtcmonth
	MOVE?CB	001h, _rtcdate
	MOVE?CB	000h, _rtchr
	MOVE?CB	000h, _rtcmin
	MOVE?CB	000h, _rtcsec
	MOVE?CB	000h, _onhr
	MOVE?CB	000h, _onm
	MOVE?CB	000h, _ofhr
	MOVE?CB	000h, _ofm
	MOVE?CB	001h, _runtimes
	MOVE?CB	00Ah, _runsec
	MOVE?CB	000h, _clmp
	MOVE?CB	000h, _almp
	LOW?T	_PORTC_2
	MOVE?CW	000h, _counts
	MOVE?CW	000h, _incounts
	MOVE?CB	000h, _wnmb
	MOVE?CB	000h, _hcnt
	MOVE?CB	001h, _dtime
	GOSUB?L	_catchflagdata
	GOSUB?L	_countdata
	GOSUB?L	_incountdata
	GOSUB?L	_settime
	RETURN?	

	LABEL?L	_testwork	
	CMPNE?TCL	_PORTB_4, 000h, L00045
	PAUSE?C	003E8h
	CMPEQ?TCL	_PORTB_4, 000h, _testing
	LABEL?L	L00045	
	RETURN?	

	LABEL?L	_testing	
	HIGH?T	_PORTD_1
	PAUSE?C	00BB8h
	MOVE?CB	001h, _n
	LABEL?L	L00047	
	CMPGT?BCL	_n, 003h, L00048
	LCDOUT?C	0FEh
	LCDOUT?C	002h
	LCDOUT?C	0FEh
	LCDOUT?C	00Ch
	LCDOUT?C	0FEh
	LCDOUT?C	001h
	LCDOUT?C	0CAh
	LCDOUT?C	0D6h
	LCDOUT?C	0B2h
	LCDOUT?C	0D9h
	LCDOUT?C	0D7h
	LCDOUT?C	0F7h
	LCDOUT?C	0CAh
	LCDOUT?C	0D4h
	LCDOUT?C	0D4h
	LCDOUT?C	0CBh
	LCDOUT?C	0D0h
	LCDOUT?C	0D0h
	LCDOUT?C	0FEh
	LCDOUT?C	002h
	LCDOUT?C	0FEh
	LCDOUT?C	00Ch
	LCDOUT?C	0FEh
	LCDOUT?C	090h
	LCDOUT?C	0D4h
	LCDOUT?C	0CBh
	LCDOUT?C	0D0h
	LCDOUT?C	0D0h
	LCDOUT?C	0B4h
	LCDOUT?C	0CEh
	LCDOUT?C	0CAh
	LCDOUT?C	0FDh
	LCDOUT?C	0A1h
	LCDOUT?C	0C3h
	LCDOUT?C	020h
	LCDOUT?C	020h
	LCDOUTCOUNT?C	002h
	LCDOUTNUM?B	_n
	LCDOUTDEC?	
	PAUSE?C	0012Ch
	HIGH?T	_PORTD_2
	GOSUB?L	_runsecond
	LOW?T	_PORTD_2
	GOSUB?L	_fivesec
	NEXT?BCL	_n, 001h, L00047
	LABEL?L	L00048	
	LOW?T	_PORTD_1
	RETURN?	

	LABEL?L	_runsecond	
	MOVE?CB	001h, _i
	LABEL?L	L00049	
	CMPGT?BBL	_i, _runsec, L00050
	MOVE?CB	001h, _m
	LABEL?L	L00051	
	CMPGT?BCL	_m, 064h, L00052
	CMPNE?TCL	_PORTB_7, 000h, L00053
	ADD?WCW	_counts, 001h, _counts
	GOSUB?L	_countdata
	MOVE?CB	001h, _clmp
	GOSUB?L	_catchflagdata
	HIGH?T	_PORTC_2
	PAUSE?C	003E8h
	PAUSE?C	003E8h
	LOW?T	_PORTC_2
	GOTO?L	_catchserror
	LABEL?L	L00053	
	CMPNE?TCL	_PORTB_5, 000h, L00055
	GOTO?L	_suctionreset
	LABEL?L	L00055	
	PAUSE?C	00Ah
	NEXT?BCL	_m, 001h, L00051
	LABEL?L	L00052	
	NEXT?BCL	_i, 001h, L00049
	LABEL?L	L00050	
	CMPNE?TCL	_PORTB_6, 000h, L00057
	MOVE?CB	001h, _almp
	GOSUB?L	_alnormalflagdata
	GOTO?L	_interserror
	LABEL?L	L00057	
	RETURN?	

	LABEL?L	_catchserror	
	GOSUB?L	_stopsuction
	CMPNE?TCL	_PORTB_7, 000h, L00059
	MOVE?CB	001h, _almp
	GOSUB?L	_alnormalflagdata
	GOTO?L	_catchloop
	LABEL?L	L00059	
	GOTO?L	_main

	LABEL?L	_catchloop	
	LCDOUT?C	0FEh
	LCDOUT?C	002h
	LCDOUT?C	0FEh
	LCDOUT?C	00Ch
	LCDOUT?C	0FEh
	LCDOUT?C	001h
	LCDOUT?C	0B2h
	LCDOUT?C	0B6h
	LCDOUT?C	0BBh
	LCDOUT?C	0F1h
	LCDOUT?C	0B4h
	LCDOUT?C	0ABh
	LCDOUT?C	0B8h
	LCDOUT?C	0D0h
	LCDOUT?C	0C6h
	LCDOUT?C	0F7h
	LCDOUT?C	0BEh
	LCDOUT?C	0AFh
	LCDOUT?C	0B8h
	LCDOUT?C	0E6h
	LCDOUT?C	0FEh
	LCDOUT?C	002h
	LCDOUT?C	0FEh
	LCDOUT?C	00Ch
	LCDOUT?C	0FEh
	LCDOUT?C	090h
	LCDOUT?C	0C7h
	LCDOUT?C	0EBh
	LCDOUT?C	0B2h
	LCDOUT?C	0C1h
	LCDOUT?C	0CAh
	LCDOUT?C	0C3h
	LCDOUT?C	0B4h
	LCDOUT?C	0ABh
	LCDOUT?C	0B8h
	LCDOUT?C	0D0h
	LCDOUT?C	0C6h
	LCDOUT?C	0F7h
	LCDOUT?C	0A3h
	LCDOUT?C	0A1h
	PAUSE?C	0012Ch
	CMPNE?TCL	_PORTB_5, 000h, L00061
	MOVE?CB	000h, _almp
	GOSUB?L	_alnormalflagdata
	GOTO?L	_main
	LABEL?L	L00061	
	CMPNE?TCL	_PORTB_7, 001h, L00063
	GOSUB?L	_fivesec
	CMPNE?TCL	_PORTB_7, 001h, L00065
	MOVE?CB	000h, _almp
	GOSUB?L	_alnormalflagdata
	GOTO?L	_main
	LABEL?L	L00065	
	LABEL?L	L00063	
	GOTO?L	_catchloop

	LABEL?L	_suctionreset	
	GOSUB?L	_stopsuction
	GOTO?L	_main

	LABEL?L	_interserror	
	GOSUB?L	_stopsuction

	LABEL?L	_interloop	
	LCDOUT?C	0FEh
	LCDOUT?C	002h
	LCDOUT?C	0FEh
	LCDOUT?C	00Ch
	LCDOUT?C	0FEh
	LCDOUT?C	001h
	LCDOUT?C	0C7h
	LCDOUT?C	0D6h
	LCDOUT?C	0C8h
	LCDOUT?C	0EBh
	LCDOUT?C	0B4h
	LCDOUT?C	0ABh
	LCDOUT?C	0B8h
	LCDOUT?C	0D0h
	LCDOUT?C	0C6h
	LCDOUT?C	0F7h
	LCDOUT?C	0BEh
	LCDOUT?C	0AFh
	LCDOUT?C	0B8h
	LCDOUT?C	0E6h
	LCDOUT?C	0FEh
	LCDOUT?C	002h
	LCDOUT?C	0FEh
	LCDOUT?C	00Ch
	LCDOUT?C	0FEh
	LCDOUT?C	090h
	LCDOUT?C	0C7h
	LCDOUT?C	0EBh
	LCDOUT?C	0B2h
	LCDOUT?C	0C1h
	LCDOUT?C	0CAh
	LCDOUT?C	0C3h
	LCDOUT?C	0B4h
	LCDOUT?C	0ABh
	LCDOUT?C	0B8h
	LCDOUT?C	0D0h
	LCDOUT?C	0C6h
	LCDOUT?C	0F7h
	LCDOUT?C	0A3h
	LCDOUT?C	0A1h
	PAUSE?C	0012Ch
	CMPNE?TCL	_PORTB_5, 000h, L00067
	MOVE?CB	000h, _almp
	GOSUB?L	_alnormalflagdata
	GOTO?L	_main
	LABEL?L	L00067	
	CMPNE?TCL	_PORTB_6, 001h, L00069
	GOSUB?L	_fivesec
	CMPNE?TCL	_PORTB_6, 001h, L00071
	MOVE?CB	000h, _almp
	GOSUB?L	_alnormalflagdata
	GOTO?L	_main
	LABEL?L	L00071	
	LABEL?L	L00069	
	GOTO?L	_interloop

	LABEL?L	_stopsuction	
	GOSUB?L	_fivesec
	LOW?T	_PORTD_2
	PAUSE?C	003E8h
	LOW?T	_PORTD_1
	RETURN?	

	LABEL?L	_catchflagdata	
	MOVE?CW	046h, _j
	LABEL?L	L00073	
	CMPGT?WCL	_j, 047h, L00074
	I2CDATA?T	_SDA
	I2CCLOCK?T	_SCLK
	I2CWRITE?C	0A0h
	I2CWRITE?W	_j
	I2CWRITES?B	_clmp
	PAUSE?C	00Ah
	NEXT?WCL	_j, 002h, L00073
	LABEL?L	L00074	
	RETURN?	

	LABEL?L	_rweeks	
	CMPGT?BBL	_hcnt, _wnmb, L00075
	GOSUB?L	_gettime
	GOSUB?L	_tohex
	CMPNE?BBL	_whour, _chr, L00077
	ADD?BCB	_hcnt, 001h, _hcnt
	GOSUB?L	_rdaysdata
	MOVE?CB	001h, _m
	LABEL?L	L00079	
	CMPGT?BCL	_m, 046h, L00080
	MOVE?CB	001h, _n
	LABEL?L	L00081	
	CMPGT?BCL	_n, 03Ch, L00082
	CMPNE?TCL	_PORTB_5, 000h, L00083
	GOSUB?L	_fivesec
	CMPNE?TCL	_PORTB_5, 000h, L00085
	GOTO?L	_stoprest
	LABEL?L	L00085	
	LABEL?L	L00083	
	GOSUB?L	_restlcd
	NEXT?BCL	_n, 001h, L00081
	LABEL?L	L00082	
	NEXT?BCL	_m, 001h, L00079
	LABEL?L	L00080	
	LABEL?L	L00077	
	CMPNE?TCL	_PORTB_5, 000h, L00087
	GOSUB?L	_fivesec
	CMPNE?TCL	_PORTB_5, 000h, L00089
	GOTO?L	_stoprest
	LABEL?L	L00089	
	LABEL?L	L00087	

⌨️ 快捷键说明

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