Title: ????IC???
1 ????IC???
2? ?
- ????IC???
- ????/??/????
- ????IC?????
- ????/????/???
- ????IC?????
- MIFARE 1
- ????IC?????
- MIFARE 1
3??????????IC??
- ????????,?????????????(??????????????????????)????
????,???IC?????????????
4???????IC??Contactless ICC
- ????IC?????????,?????????,???????????,????????,???
?IC????????(RFCRadio Frequency
Card),??RF?,????IC????????????(RFIDRadio
Frequency Identification)?
5????IC?????
- ????IC?????,???
- ????IC?????????,???,???
6 ????IC??????
7(No Transcript)
8????IC???????
- ????(???????)?
- ????
- ????(??)
9????IC????
- ?????????
- ????IC????????????,??????????????????????ID???
??????,??????????????????????,????????,???????????
?? - ???????
- ?????
- ?????
10????IC????
- ???IC??????????CPU?
- ??????????????????
- ???????? 125kHz????(30 kHz 300
kHz),13.56MHz???????(3MHz30 MHz),915MHz?2.45GHz??
???(300MHz 3GHz)?5.8GHz????(gt3GHz)? - ??????????????????????????????????????????
- ??????????????(ID?)???? (?EEPROM)
11EM ID??
EM ID??
TI (????) Tag-it????
PHILIPS MIFARE 1?
????????
12??????????
?? ?? ???? ?????? ???? ????
?? 125134KHz ? ??(lt1m) ????
?? 13.56MHz ?? ??(lt1m) ????
??? 860960MHz ? ?(lt10m) ????
13????IC??????
???? ?? ?? ????
EPCglobal ???????????? ???? ??????????????????? UHF(860-960 MHz ) ??????(EPC)????????????????-???????????????????
ISO/IEC ??????/??????? ??????????? ???? ????????ISO/IEC14443 ????ISO/IEC15693 ISO/IEC18000
UID ???????? ???????IT?? 2.45GHz?13.56MHz ????????????
14??ICC????? CICCClose-Coupled
ICC,??(???)? PICCProximity ICC,????(???)? VICC
Vicinity ICC,????(???)?? CD Coupling
Device,?????????????
15- ISO/IEC14443????
- ???ISO/IEC 14443(??)?????????ISO/IEC14443-Type
A?ISO/IEC14443-TypeB? - TypeA?PHILIPS?????,??SIEMENS?HITACHI?GEMPLUS?GD
?Schlumberger??? - TypeB?ST(?????)?MOTOROLA?ATMEL???SAMSUNG????NEC?
??????
16- ISO/IEC18000????
- 18000-1???
- 18000-2??135KHz??????????
- 18000-3?13.56MHz??????????
- 18000-4?2.45GHz??????????
- 18000-55.8GHz??????????
- 18000-6860-960MHz??????????
- 18000-7433MHz??????????
17- ??13.56MHz???????
- ISO14443TypeA?Mifare 1 S50??Ultra Light? LEGIC
Type A ??????????IC???????Type A ? - ISO14443TypeB?ATMEL RF020
- ISO15693(????)?PHILIPS I-Code2?TI Tag-it??
- I-CODE(????)? PHILIPS I-Code?????BL75R02
- SONY Felica??????????
- ???????
18???? EM 4100/4102??? 4001???ID?? 8803???ID??
?? Swatch Group Em4102 Wafer ??4001 COB ??8803 Wafe
???? 125KHZ 125KHZ 125KHZ
???? 2-20cm 2-20cm 2-20cm
?? 85.5x54x0.82mm 85.5x54x2mm 85.5x54x1.05mm
???? PVC?ABS PVC,ABS PVC
???? ???? ???? ????
?? ?? ????
???? ?????????????????? ?????????????????? ??????????????????
??,???ATMEL?TEMIC????TI??????HITAG???
19????IC?????
- ????????
- (1)?????????????
- (2)????IC??????????
- (3)??????????????????????(?????)????????????
20????IC?????????
21- (1)?????????(??????????),??????????????
- (2)IC??????????,?????????????????,???LC??????????,
??????????,?????????2V?,????????????????????,?????
???????(???????????)? - (3)????????????????????,??????,?????????,?????????
?,???EEPROM????????,???2V?????15V??,?????EEPROM???
??? - (4)IC?????????????,??????(?????????????)?????
- (5)?????IC???????????????????
22??????? (AntiCollion)
- ???2??2????IC???????????,?????(???Collion),???????
?????IC??????????? AntiCollion? - ?????
- ?????(Bit AntiCollision)
- ????-ALOHA?(Slotted-ALOHA?)
23????IC??????
- ????
- ??????
- ?????
- ??????????
- ??????????????
- ??????????
- ???????
24??????????
- ????????
- SLE4406
- ????ID?
- EM?4001?
- ?????????
- PHILIPS?Mifare?
?????
??????,???
????????,??????,????,????
25Mifare 1????IC?
- ??????
- ????
- ???????Mifare MF1 IC S50 ????
- ??
- ??ISO/IEC 14443 Type A ??
- ????
- 13.56MHz
- ??????
- 106kbit/s (9.4µs/bit)
26Mifare??????????
27Mifare????????
TYPE A 100ASK
TYPE B 10ASK
Type A?Type B???????
28????????????
- ??fc13.56MHz
- ??????13.56MHz/128106kbit/s(9.4µs/bit)
- ????TYPE A?100ASK, TYPE B?10ASK,
- ????TYPE A????MILLER??, TYPE B?NRZ??(????????)
29????????????
- ???fc/16 847.5kHz
- ??????106kbit/s
- ?????????
- ????TYPE A?MANCHESTER-ASK, TYPE
B?BPSK-NRZ(???????????)
30Mifare 1???????
- ????10248???(?1KB),
- ????EEPROM
- ??16???(??0 15)
- ?????4??(Block)?0??1??2??3?
- ????16????
- ?????? 16 Byte4 64 Byte
31?????
1)??? ????0?0 ??IC?????????04????????SN,?5????
????????6?????????SIZE ?7,8????????Tagtype ??
????????????,????IC?????????????,????????????????
?420A7E00368804004481740630373937H
???SN420A7E00H???36H ????SIZE88H
????Tag Type0400H
32?????
- 2)???
- ???3????(??0??2?),??16???????????????(access
bits)??? - ????????????,???/??????/????
- ???????,????????????????????,????????INC/DEC/REST
ORE/TRANSFER??? - ??????????????????,???????/?/??/????????????????
?????????? -
33?????
- 3)???
- ??????3???(Sector Trailer)?
- KEY A(6B) Access bits(4B)KEY B(6B)
- ? A0A1A2A3A4A5FF078069 B0B1B2B3B4B5
- ??AA0A1A2A3A4A5H(???)
- ??BB0B1B2B3B4B5H(???)
- ?????FF078069H (???)
34Mifare 1 ????????????
- Access bits(?????)??????4???????,?????????(????)
- Mifare 1 ???????,?????3???????
- A0A1A2A3A4A5 FF078069 B0B1B2B3B4B5
- ?????????????
- ??A????,????A???B???????
- ??B?????A???B?????,???
- ????????A???B?????,????
-
35??MIFARE 1????
- EEPROM??????????
- 1K??EEPROM,16???, 4???/??,16??/?????????????????
????????(???)?????????,????????????
36Mifare 1 ????????
- Mifare 1 ???????????????????,?????????
37(A)? Mifare 1?????????????RB (B)?
?????RB??Mifare 1??????????TOKEN
AB??????????????RB????????????RA (C)? Mifare
1???? TOKEN AB ?,???????TOKEN AB????????????RB,??
?????(A)??Mifare 1?????????RB???(B)??????TOKEN
AB??RB???????????????/??????,???RBRB,????,????
????? (D) ? ??(C)???????,?Mifare
1???????????RA???????TOKEN BA???? (E)? ???
????TOKEN BA?,?????????????TOKEN
BA??RA(???)??????RA???????(B)????????????RA???(D
)????? ?TOKEN BA??RA?????,????????????/??????,??
?RARA,????,?????????
38(A)? Mifare 1?????RB1100,KEY11010, ??/??????,?
?RB???? (B)? ???????RA0011,KEY21010, ??/??????
,??RB ?RB??TOKENBRB??KEY20110,??TOKENBRA (C)?
Mifare 1???TOKEN B?? RBTOKENB??KEY11100RB,
???? (D) ? Mifare 1???RA?? TOKENARA??KEY11001
(E)? ??? ??TOKEN A?? RATOKENA??KEY20011RA,
????
39??MIFARE 1????
- ????
- ????SN
- ?????????,???????????(KEYSET0?1?2)??(KEY A?KEY
B)??? - ????????????
- ???????,??????????????????
- RF??????
40 Mifare 1????IC?????
41MIFARE ? ?????
POWER OFF??
RESET
IDLE??
REQUEST ??
READY??
ANTICOLLISION?? ??????? ??????UID(SN)
SELECT UID??
??AUTENTICATION/READ/WRITE/INC/DEC??
ACTIVE??
WAKE UP ??
HALT??
HALT??
42??MIFARE 1????
- ??????
- ?????????????????,??????(??)???,???????????????
43??MIFARE 1?????
- ????
- ??????????????????????
- ?????
- ?????????/???????????,??????/????????????
44??5 MIFARE 1???????????
- ?????????IC????????,????????????????????5V???????
- ?????????IC?????PC??????,??MIFARE??????IC?????MWRF
,??????? - ????(Load Key)???RFDEMO??????????0(KEYSET0),??A(K
EY A),???0-14???A????F,????15???A????0???????,????
?????????????????????
45- MIFARE 1?????
- ?MIFARE 1????????MIFARE????????????,?MIFARE
1????0?1?15??0?1?2???/????????????,???????????????
?????????????????? - ????????????3???,?????????,??????????
-
46- ?????
- (1)?????????MIFARE 1?(????1??2?)????,????0?1?
??,??????? - (2)???MIFARE 1??????????????????,?RFDEMO???????
?,?????SN???????(???1?)? - (3)?RFDEMO????????,????0?1??????????????
- (4)???????????????????,??????(??2?)???0?1???,?
?????????? - (5)??(4)???,???????????????0?1???,????????
- (6)????????,??MIFARE1???????????
47- ??????
- (1)???????14?0????????????,?????????????????????
- (2)????14???????,???14?0???????A/B????,???????????
???? - (3)??(1),????????????????
- (4)?????????????
- ????????3???,??????????????????,??????????
-
48????????
C2X3_b C2X2_b C2X1_b C2X0_b C1X3_b C1X2_b C1X1_b C1X0_b
C1X3 C1X2 C1X1 C1X0 C3X3_b C3X2_b C3X1_b C3X0_b
C3X3 C3X2 C3X1 C3X0 C2X3 C2X2 C2X1 C2X0
BX7 BX6 BX5 BX4 BX3 BX2 BX1 BX0
1 1 1 1 1 1 1 1
0 0 0 0 0 1 1 1
1 0 0 0 0 0 0 0
0 1 1 0 1 0 0 1
49???????3?????
??A ??A ???? ???? ??B ??B
C1X3 C2X3 C3X3 read write read write read write
0 0 0 never KEYAB KEYAB never KEYAB KEYAB
0 1 0 never Never KEYAB never KEYAB never
1 0 0 never KEYB KEYAB never never KEYB
1 1 0 never Never KEYAB never never never
0 0 1 never KEYAB KEYAB KEYAB KEYAB KEYAB
0 1 1 never KEYB KEYAB KEYB never KEYB
1 0 1 never Never KEYAB KEYB never never
1 1 1 never Never KEYAB never never never
50??????????????
C1XY C2XY C3XY Read Write Increment Decr,Transfer,restore
0 0 0 KEYAB KEYAB KEYAB KEYAB
0 1 0 KEYAB never never never
1 0 0 KEYAB KEYB never never
1 1 0 KEYAB KEYB KEYB KEYAB
0 0 1 KEYAB never never KEYAB
0 1 1 KEYB KEYB never never
1 0 1 KEYB never never never
1 1 1 Never never never never
51- ??3C1X00,C2X01,C3X00,
- ??????
- ???1??????EF 07 81 69H
- ???14?3??????
- FFFFFFFFFFFFEF078169FFFFFFFFFFFF
52??????????
??
??
MCU
MIFARE? ????
EEPROM ???
??
?
RS232??
53Mifare ??????MCM
- ?????MCU?MIFARE??????,?????,???????????/?????????
/?????????????? - ????13.56MHz?????106Kbps
- ????MCM20025mm,MCM500100mm
- ????????????
- ?????????????3????????????? ,????????,????
,???????? - ????MIFARE????
54MCM?MCU????
- ??????????????MODE?USEALE????,ALE??A0A3??
- P3.3??-CS,?P3.3?????(??)MCM200??
- MCM200?-IRQ?P3.2???????????MCM?????
55??????????
- ????M1????????
- 1)????MCU(????)?????MCM,
- 2)MCM??????????????????
- 3)??????MCM????,?????????????,???????/???MCM
- 4)MCM???????????????????????MCU,???MCU??MCM??????/
??,?????M1???????
56M C M ? ? ? ? ? ? ?
57MCM ? ? ? ? ? ? ?
58MIFARE????????
- ??MCM
- MCM???
- ?MCM????(LOAD KEY),???????????MCM?KEY-RAM?????????
??,????????? - ????(ANSWER TO REQUEST)??
- ???(ANTICOLLISION)???????
- ????(SELECT)???????
- ?? (AUTHENTICATION)???
- ????(?????????)???? (READ/WRITE/INCREAMENT/DECREM
ENT) - ??(HALT)???????,???????
59SOR/LOAD KEY
MIFARE ?????
REQUEST
???TAGTYPE(2B)
???SN(4B)???(1B)
ANTICOLLISION
SELECT
???SIZE(1B)
AUTHENTICATION
???AE?
READ/WRITE/INC/DEC
HALT
60????
- ?????7???????,???????????????
- (1)???,??????,???BCNTS?BCNTR?
- (2)?????DATA,?MCM?????
- (3) ??TOC,MCM??????????????
- (4)??DV??,???????????DV???1??MCM?MIFARE?????????
??,???????????MCM?????,???????????DV0????????????
??????,???????DV????DV1????????,????????,????????
DV??????1,??????????? - (5)??TOC?
- (6) ??????,???????,??????????,?????????,?????????
?????,??????,???????? - (7)MCU?DATA??MCM??????????
61Answer to Request (????)??
- Request ?????MCM??????????(??)???MIFARE 1??
- ???26H?52H?
- ??????????????????TAGTYPE(2???)
62Difference between request std request
all
- With a request std(26H) instruction only cards
which are not set into a HALT-mode will respond
to this request,or it may be expanded to all
cards in the field with a request all
(52H)option.The first option is needed to prevent
the MCM from selecting one card several times.
63Request NOP NOP MOV
A,0CH ??STACON MOV R0,01H
MOVX _at_R0,A MOV A,0EH
??BAUDRATE MOV R0,05H MOVX
_at_R0,A MOV A,0C0H ??ENABLE
MOV R0,02H MOVX _at_R0,A MOV
A,0C6H ??MODE MOV R0,07H
MOVX _at_R0,A MOV A,0CH ????STACON
MOV R0,01H MOVX _at_R0,A MOV
A,02H ??RCODE MOV R0,0EH
MOVX _at_R0,A
64 MOV A,07H ??BCNTS7bits
MOV R0,03H MOVX _at_R0,A MOV A,10H
??BCNTR2Bytes MOV R0,04H
MOVX _at_R0,A JUDGE_COMMAND ??REQ STD??REQ ALL
MOV A,R2 XRL A,01H JNZ
RQT_STD RQT_ALL MOV A,52H SJMP
RQT_NEXT RQT_STD MOV A,26H RQT_NEXT
MOV R0,00H ????? MOVX _at_R0,A
NOP
65 MOV A,0AH ??TOC1ms MOV
R0,06H MOVX _at_R0,A RQT_STACON
MOV R0,01H ? STACON MOVX A,_at_R0
JNB ACC.7,RQT_STACON ?? DV1? MOV R7,A
??STACON MOV A,00H ??TOC
MOV R0,06H MOVX _at_R0,A MOV
A,R7 ?????? JB ACC.6,RQT_TE_ERR
JB ACC.3,RQT_BE_ERR MOV R0,00H
?TAGTYPE MOVX A,_at_R0 MOV 20H,A
MOV R0,00H MOVX A,_at_R0 MOV
21H,A MOV B,00H ?? OK ?? SJMP
RQT_EXIT
66RQT_BE_ERR ???? MOV B,01H
SJMP RQT_EXIT RQT_TE_ERR MOV B,02H
SJMP RQT_EXIT RQT_EXIT RET
67AntiCollision ???
- ????????Mifare 1???MCM?????????(??)?,???????AntiCo
llision???MCM????Mifare 1????????? - AntiCollision?????AntiCollision
Loop(?????,????)??????STACON?????AC???AntiCollisio
n??? - MCM??AntiCollision??(93H20H),????????MIFARE
1???AntiCollision???,???????SN????? - ??????SN????,MCM??????(?SN)???1???0??1(???????????
?????),????????1???????1(?????0??),????2?,????,???
?????SN???????SN?
68Anticollision NOP NOP
MOV A, 0CH SETB ACC.0
??AC1,????? MOV R0,01H MOVX
_at_R0,A ACALL DELAY_500µs ??1000µs
ACALL DELAY_500µs MOV A,10H
??BCNTS?2Bytes MOV R0,03H
MOVX _at_R0,A MOV A, 28H
??BCNTR?5Bytes MOV R0,04H MOVX
_at_R0,A
69 MOV A, 93H ?????
MOV R0,00H MOVX _at_R0,A MOV
A,20H ??NVB MOV R0,00H MOVX
_at_R0,A MOV A,0AH
??TOC?1ms MOV R0,06H MOVX
_at_R0,A ANTI_STACON MOV R0,01H ?STACON
MOVX A,_at_R0 JNB ACC.7,ANTI_STACON ?
? DV1? MOV R7,A ??STACON
MOV A, 00H ??TOC MOV R0,06H
MOVX _at_R0,A MOV A,R7 ?????? JB
ACC.6, ANTI_TE_ERR JB ACC.3, ANTI_BE_ERR
70 MOV R7,04H MOV B,00H
MOV R1,30H ????RAM?SN?????? MOV
R0,00H ANTI_LOOP MOVX
A,_at_R0 ??4??SN????? MOV _at_R1,A
XRL B,A INC R1 DJNZ R7,ANTI_LOOP
MOVX A,_at_R0 ??1????? XRL
A,B ????????SN JNZ ANTI_CHK_ERR_EXIT
???? MOV B,00H ??OK?? AJMP
ANTI_BACK ANTI_TE_ERR ???? MOV
B,01H AJMP ANTI_BACK ANTI_BE_ERRMOV
B,0AH AJMP ANTI_BACK ANTI_CHK_ERR_EXITMO
V B,08H ANTI_BACK RET
71Select Tag ??????
- Select Tag?????AntiCollision??????SN????,?????????
,??????????????????? - MCM??Select??(93H70HSN????)
- ????????MCM???SN?????????,?????????(ACTIVE),??????
?READY??????(??)????????(SIZE)???????
72SELECT MOV A,0CH MOV
R0,01H MOVX _at_R0,A MOV A,0F0H
??ENABLE MOV R0,02H MOVX
_at_R0,A MOV A,38H
??BCNTS7Bytes MOV R0,03H MOVX
_at_R0,A MOV A,08H ??BCNTR1
Byte MOV R0,04H MOVX _at_R0,A
MOV A,93H ????? MOV
R0,00H MOVX _at_R0,A MOV
A,70H ??NVB MOV R0,00H MOVX
_at_R0,A
73 MOV R7,04H MOV B,00H
MOV R0,00H MOV R1,40H SN?????? SELECT_
WRT_LOOP MOV A,_at_R1 ??ANTICOLLISION?????
SN?? MOVX _at_R0,A ??SN???? XRL
B,A SN?????????? INC R1 DJNZ
R7, SELECT_WRT_LOOP MOV A,B MOVX
_at_R0,A ????? MOV A,0AH
SET TOC MOV R0,06H MOVX
_at_R0,A
74SEL_RD_STACON_AGAIN READ STACON MOV
R0,01H MOVX A,_at_R0 JNB
ACC.7,SEL_RD_STACON_AGAIN ??DV1? MOV
R6,A ??STACON MOV A,00H ??TOC
MOV R0,06H MOVX _at_R0,A MOV
A,R6 ?????? JB ACC.6, SEL_TE_ERR
JB ACC.5, SEL_PE_ERR JB ACC.3,
SEL_BE_ERR JB ACC.4, SEL_CE_ERR
MOV R0,00H ??SIZE?? MOVX A,_at_R0
MOV 22H,A SIZE????22H MOV
B,00H ??OK ?? SJMP SEL_EXIT
75SEL_TE_ERR ???? MOV B,01H
LJMP SEL_EXIT SEL_PE_ERR MOV B,05H
LJMP SEL_EXIT SEL_CE_ERR MOV
B,02H LJMP SEL_EXIT SEL_BE_ERR
MOV R7,0AH LCALL D500US MOV
B,0BH SEL_EXIT RET
76Authentication ????
- MCM???????????(KEY-RAM),????3????KEYSET0,KEYSET1,K
EYSET2,???KEYSET?????????KEY A ?KEY B? - Authentication?????KEY-RAM?????????????????????
- Authentication???????AE???
- AE1,????,??????
- AE0,????,????
77- Authetication????3???
- 1)??KEYSTACON???,??Authetication???KEYSET(0?1?2
) - 2)??KEYADDR???,??Authetication???KEYA?KEYB????
???? - 3)???(60H?61H)????(???015)?DATA???,??Auth
etication???
78READ/WRITE??
- READ/WRITE???????
- READ
- ?????30H???(063)
- ????????(16B)
- ???2?????????????????
- WRITE
- ?????A0H???(063)
- ??ACK/NAK?????????????
- ?????(16B)
- ??ACK/NAK???????????EEPROM
79Value Operate ???
- MIFARE??????/???????????????????,??INCREAMENT/DECR
EAMENT/ - TRANSFER/RESTORE
- ??????????????????????(Value Block)??Access
Bits??????
80??????
- ????????????????
- ??
- address ???(1B) value ?(4B,???)
??,?????01H?????????,????VALUE00030000H,?????? FE
01 FE 01 00030000 FFFCFFFF 00030000 ?
?
81Increment/Decrement/Transfer
- Increment
- adds the specified value to the memory value
- Decrement
- subtracts the specified value from the
memoty value - Transfer
- Each Increment or Decrement instruction
manipulating a standard value block has to be
followed by a Transfer intruction which actually
stores the calculated result in the card memory.
Until then, the result is kept in an internal
value buffer resgister.
82DECREMENT ?????addr,?value???D_BUF ??ACK/NAK
NOP NOP MOV A,10H SEND BCNTS(16bits?????
?) MOV R0,03H MOVX _at_R0,A MOV
A,04H SEND BCNTR(4bitsACK/NAK) MOV
R0,04H MOVX _at_R0,A MOV A,0C0H SEND CODE
MOV R0,00H MOVX _at_R0,A MOV A,addr SEND
BLOCK ADDR MOV R0,00H MOVX _at_R0,A
83MOV A,0AH SET TOC1ms MOV R0,06H MOVX
_at_R0,A D_wait_value ?STACON,??DV1? MOV
R0,01H MOVX A,_at_R0 JNB ACC.7,D_wait_value
MOV R6,A MOV A,00H ??TOC MOV R0,06H
MOVX _at_R0,A MOV A,R6 ???? JB
ACC.6,DEC_TE_ERR JB ACC.3,DEC_BE_ERR AJMP
DEC_CONTI DEC_TE_ERR NOTAGERR MOV B,01H
AJMP DEC_EXIT DEC_BE_ERR MOV B,02H AJMP
DEC_EXIT
84DEC_CONTI MOV R0,00H ??ACK/NAK, MOVX
A,_at_R0 ANL A,0BH ???0,1,3? CJNE
A,00H,D_N1 MOV B,07H
NOTAUTHERR(???00000000) SJMP DEC_NEXT D_N1
CJNE A,0AH,D_N2 ??ACK??(00000101),????DEC
SJMP DEC_NEXT D_N2 MOV B,03H
??????(00000011),CODEER AJMP WRITE_EXIT
85WRITE_NEXT ????? MOV A,32 SEND
BCNTS32bits(4B VALUE) MOV R0,03H MOVX
_at_R0,A MOV A,04H SEND BCNTR4 bits(ACK/NAK)
MOV R0,04H MOVX _at_R0,A MOV R5,4 ?4B
? MOV R0,00H MOV R1,D_BUF DEC_VALUE MOV
A,_at_R1 MOVX _at_R0,A INC R1 DJNZ R5,DEC_VALUE
86 MOV A,0AH SET TOC1ms MOV R0,06H MOVX
_at_R0,A DEC_end DV1? MOV R0,01H MOVX
A,_at_R0 JNB ACC.7,DEC_end MOV A,00H ??TOC
MOV R0,06H MOVX _at_R0,A Judge_answerMOV
R0,01H ???? MOVX A,_at_R0 JNB
ACC.6,DEC_error_TE MOV B,00H DEC_ANSWER ??ACK
/NAK MOV R0,00H MOVX A,_at_R0 ANL A,0FH
CJNE A,04H,D_ERR1 (00000100?VALUE OVERFLOW)
MOV B,0FEH SJMP DEC_EXIT D_ERR1MOV
B,0FFH ???? DEC_EXITRET
87TRANSFER ?? ???T_addr ??ACK/NAK TRANS NOP
NOP MOV A,10H SEND BCNTS(16bits??????)
MOV R0,03H MOVX _at_R0,A MOV A,04H SEND
BCNTR(4bitsACK/NAK) MOV R0,04H MOVX _at_R0,A
MOV A,0B0H SEND CODE MOV R0,00H MOVX
_at_R0,A MOV A,T_addr SEND BLOCK ADDR MOV
R0,00H MOVX _at_R0,A
88MOV A,10H SET TOC1.5ms MOV R0,06H MOVX
_at_R0,A T_end DV1? MOV R0,01H MOVX A,_at_R0
JNB ACC.7,T_end MOV A,00H ??TOC MOV
R0,06H MOVX _at_R0,A Judge_answer ???? MOV
R0,01H MOVX A,_at_R0 JB ACC.3,T_error_BE JB
ACC.6,T_error_PE MOV B,00H AJMP
NEXT_TRANS T_error_BE ???? MOV B,03H SJMP
NEXT_TRANS T_error_PE MOV B,05H SJMP
NEXT_TRANS
89NEXT_TRANS MOV A,95D SET TOC9ms MOV
R0,06H MOVX _at_R0,A T_Toc_end DV1?(EEPROM????
??) MOV R0,01H MOVX A,_at_R0 JNB
ACC.7,T_Toc_end MOV R6,A MOV A,00H CLEAR
TOC MOV R0,06H MOVX _at_R0,A MOV A,R6 ????
JB ACC.6,T_TAG_ERR JB ACC.3,T_BIT_ERR MOV
B,00H SJMP NEXT_ANSWER T_TAG_ERR ???? MOV
B,09H AJMP T_EXIT T_BIT_ERR MOV B,0BH
AJMP T_EXIT
90NEXT_ANSWER ??ACK/NAK MOV R0,00H MOVX
A,_at_R0 ANL A,0FH CJNE A,0AH,T_ERR1 (0000010
1?ACK,TRANSFER OK) MOV B,00H SJMP
T_EXIT T_ERR1 CJNE A,04H,T_ERR2 (00000100?NA
K) MOV B,02H SJMP T_EXIT T_ERR2 CJNE
A,05H,WRITE_EXIT ???? MOV B,04H T_EXIT RET
91??6 ????IC??????
????????MCU??RAM??16????????????,
???????????????????MCU???RAM??
MCU???????MCM??? ?????? mode
?????KEYSET0?1?2???A?B sector_nr
?????(015) R_H_BUF ?????????? R_E_BUF
?????????? W_H_BUF ???????? R_addr
???????(063) W_addr ???????(063)
92????
- ?????IC?????MWRF?MCM?????,?????MIFARE1??TAGTYPE?SN
?SIZE,???????????(???1?0)???? - ?????????IC??????MCU??,??????MCU?IC??
- ??????,?????
- ????RAM??????,?????(????10H?16???)???????????
- ????????????,???????????????????????/??,???,??????
???? - ?????????,????,???????????????????????/??,???,????
??????
93 ???? mode EQU 00H ??KEYSETKEYSET0,??
??A sector_nr EQU 01H ?????????1
R_H_BUF EQU 40H ??????? R_E_BUF EQU
50H ??????? W_H_BUF EQU 10H ?????
R_addr EQU 04H ???????(??1??0) W_addr
EQu 05H ???????(??1??1)
94 ORG 0000H AJMP MAIN ORG
0050H MAIN MOV SP,60H ?????? CLR
EA ?????? CLR P3.4 SETB
P3.3 ??MCM200 NOP NOP
CLR P3.3 ??MCM200 NOP
LCALL D500MS START NOP NOP
MOV A,80H SOR???? MOV R0,01H
MOVX _at_R0,A NOP NOP
LCALL D500MS CLR P3.3 ????MCM200
CLR P3.3
95 MOV R2,01H ??REQUEST ALL ??
LCALL REQUEST ????REQUEST SETB p3.4
???,??TAGTYPE(20H)(21H) LCALL
ANTICOLLISION ???ANTICOLLISION SETB
P3.4 ???,??SN(30H)(34H)
LCALL SELECT ????SELECT SETB P3.4
???,??SIZE(22H) LCALL
LOAD_KEY ???? SETB P3.4
LCALL AUTH ????AUTHENTICATION
SETB P3.4 LCALL
WRITE ???WRITE SETB P3.4
LCALL READ ???READ SETB P3.4
???,???? NOP
(40H)(4FH),(50H)(5FH)
NOP LCALL HALT ?? LJMP
START SJMP
96 97????
- ?2????MIFARE1??????????,????,??????????????
- ?????1?0??????????(??????),?????????????