非接觸式智能卡模塊ID-0/10/15的原理及應(yīng)用
WIEGAND_DATA: RLC A ;
DJNZ R3,WIEGAND1 ;BYTE IS NOT OVER
ANL A,#00001111B ;BYTE OVER
MOV @R0,A ;SAVE DATA TO INRAM
INC R0 ;INCREASE INRAM ADDRESS
MOV R3,#4 ;4 BITS PER BYTE
DJNZ R2,WIEGAND1 ; READ DATA AGAIN
ODD: JNB ID-0_DATA0,ODD_BIT ;WAIT ODD CHECK BIT
JB ID-0_DATA1,ODD ;
ODD_BIT: NOP ;
LCALL DELAY25US ;DELAY 25 μS
MOV C,ID-0_DATA0 ;ODD CHECK BIT
MOV ODD_CHECK,C ;SAVE ODD CHECK BIT
NOP
LJMP OTHER_PROGRAM ;READ CARD OVER
DELAY25US: MOV R4,#11 ;DELAY 25μS
DELAY25US_A: DJNZ R4,DELAY25US_A
NOP
RET
DELAY175US: MOV R4,#86 ;DELAY 175 μS
DELAY175US_A: DJNZ R4,DELAY175US_A
蜂鳴器相關(guān)文章:蜂鳴器原理
評(píng)論