RET
$INCLUDE(VI2C_ASM.INC)
END
(5)ZLG7290应用程序
MOV SP,#70H
CLR RST
LCALL DELAY
SETB RST
LCALL DELAY
MAINLOOP:
JNB KEY_INT,KEY_HANDLE
SJMP MAINLOOP
KEY_HANDLE:
MOV SLA,#ZLG7290
MOV SUBA,#01H
MOV NUMBYTE,#01H
LCALL IRDNBYTE
LCALL DELAY
MOV R7,#08H
MOV A,#60H
HANDLELOOP:
MOV MTD,A
PUSH ACC
MOV 30H,R7
MOV MTD+1,MRD
MOV SLA,#ZLG7290
MOV SUBA,#07H
MOV NUMBYTE,#02H
LCALL IWRNBYTE
LCALL DELAY
USING 2
MOV R7,30H
POP ACC
INC A
DJNZ R7,HANDLELOOP
SJMP MAINLOOP
DELAY:
MOV R7,#80H
MIN: DJNZ R7,YS500
RET
YS500: LCALL YS500US
LJMP MIN
YS500US:MOV R6,#80H
DJNZ R6,$
RET
DELAY1: MOV R7,#20H
DJNZ R7,$
RET
$INCLUDE(VI2C_ASM.INC)
END
(6) EERROM应用程序
MOV SP,#70H
LCALL DELAY
MOV MTD,#12H
MOV MTD+1,#34H
MOV SLA,#CSI24WC02
MOV SUBA,#00H
MOV NUMBYTE,#02H
LCALL IWRNBYTE
LCALL DELAY
MOV SLA,#CSI24WC02
MOV SUBA,#00H
MOV NUMBYTE,#02H
LCALL IRDNBYTE
LCALL DELAY
SJMP $
DELAY:
MOV R7,#00H
MIN: DJNZ R7,YS500
RET
YS500: LCALL YS500US
LJMP MIN
YS500US:MOV R6,#00H IC卡门禁系统微机控制软件设计(16):http://www.751com.cn/zidonghua/lunwen_9753.html