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
RET
(2)读卡号显示子程序
MOV A,30H
ANL A,#0F0HH
SWAP A
MOV disp_buf,A
MOV A,30H
ANL A,#0FH
SWAP A
MOV disp_buf+1,A
MOV A,31H
ANL A,#0F0HH
SWAP A
MOV disp_buf+2,A
MOV A,31H
ANL A,#0FH
SWAP A
MOV disp_buf+2,A
RET
(3)LED灯显示刷卡成功子程序
MOV A,#55
CJNE A,30H,L1
MOV A,#66H
CJNE A,31H,L1
CLR P1.5
LCALL DELAY
L1:SETB P1.5
RET
(4) 实时时钟程序
MOV SP,#70H
LCALL DELAY
MOV MTD,#00H
MOV MTD+1,#12H
MOV MTD+2,#00H
MOV MTD+3,#30H
MOV MTD+4,#12H
MOV SLA,#PCF8563
MOV SUBA,#00H
MOV NUMBYTE,#05H
LCALL IWRNBYTE
LCALL DELAY
MAINLOOP:
MOV SLA,#PCF8563
MOV SUBA,#02H
MOV NUMBYTE,#03H
LCALL IRDNBYTE
LCALL DELAY
SJMP MAINLOOP
DELAY:
MOV R7,#00H
MIN: DJNZ R7,YS500
RET
YS500: LCALL YS500US
LJMP MIN
YS500US:MOV R6,#00H
DJNZ R6,$
RET
DELAY1: MOV R7,#20H
DJNZ R7,$ IC卡门禁系统微机控制软件设计(15):http://www.751com.cn/zidonghua/lunwen_9753.html