ANL A,#0X0F
MOV disp_buf,A
MOV A,MRD
SWAP A
ANL A,#0X0F
MOV disp_buf+1,A
MOV A,MRD+1
ANL A,#0X0F
MOV disp_buf+3,A
MOV A,MRD+1
SWAP A
ANL A,#0X0F
MOV disp_buf+4,A
MOV A,MRD+2
ANL A,#0X0F
MOV disp_buf+6,A
MOV A,MRD+2
SWAP A
ANL A,#0X0F
MOV disp_buf+7,A
MOV disp_buf+2,#1FH
MOV disp_buf+5,#1FH
DISPLAY:
MOV R7,#0X08
MOV R1,#disp_buf
MOV A,#0X60
DISLOOP:
MOV MTD,A
PUSH ACC
MOV 31H,R1
MOV 30H,R7
MOV MTD+1,@R1
MOV SLA,#ZLG7290 ;指定器件地址
MOV SUBA,#07H ;指定子地址
MOV NUMBYTE,#02H ;发送2字节数据
LCALL IWRNBYTE ;调用写2字节数据程序
LCALL DELAY
MOV R1,31H
MOV R7,30H
POP ACC
INC R1
INC A
DJNZ R7,DISLOOP
LJMP LOOP1
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) ;包含VIIC软件包
END
4.4 部分重要的子程序
(1)读时间显示子程序
MOV A,MRD
ANL A,#0x7f
MOV MRD,A
MOV A,MRD+1
ANL A,#0x7f
MOV MRD+1,A
MOV A,MRD+2
ANL A,#0x3f
MOV MRD+2,A
MOV A,MRD
ANL A,#0X0F
MOV disp_buf,A IC卡门禁系统微机控制软件设计(14):http://www.751com.cn/zidonghua/lunwen_9753.html