ATMEL??????IC?¨?°??·?????
ATMEL??????IC?¨?°??·?????
?? ??
?????? ??????????ATMEL??????IC?¨???????á???°??±??????? 2
????AT24C01A??AT24C02??AT24C04??AT24C08??AT24C16??AT24C32??AT24C64 2
????AT88SC102??AT88SC1604??AT88SC1608??AT88SC153 3
1??AT88SC102?????¨ 3
2??AT88SC1604?????¨ 5
3??AT88SC1608?????¨ 8
4??AT88SC153?????¨ 12
????AT45D041 16
?????? ??????IC?¨?????????? 19
??????????±í(??????, ?ò?????÷) 19
1???¨?????? 19
2??ATMEL AT88SC102/AT88SC1604?????¨×¨?????? 19
3??ATMEL AT88SC1608?°AT88SC153?????¨×¨?????? 20
4??ATMEL AT45D041 Flash?????¨×¨?????? 20
???????????÷ 21
?????????¨?à???¤?¨?? 29
????????ICFOX.PLB???????? 30
?????? ??????IC?¨?×???í????·????? 31
????IC?¨??×÷?×?????? 31
1??IC?¨??×÷?×?????????÷?? 31
2??IC?¨?????¨???·????(Base.h) 32
????AT24C64?¨???????? 32
1??AT24C64?¨?????·????(AT24C64.h) 32
2??AT24C64?¨???? 33
3??AT24C64?¨????????(App24C64.c) 35
?????? ??????????ATMEL??????IC?¨???????á???°??±???????
??????????IC?¨??????×???????????????????·????????¤???????????????¨???ù±?????×???????????ATMEL?????ú?ú????????IC?¨????????????????????±???????????×????ò???é????????????IC?¨???????°??·????ù°??ú??
??1 AT24C01A??AT24C02??AT24C04??AT24C08??AT24C16??AT24C32??AT24C64
????????????IC?¨??ATMEL?????¨????????????±???????????EEPROM?¨??AT24C????????????×???·???K????????·?±???1K??2K??4K??8K??16K??32K??64K?????ü??????·?·¨??EEPROM?ê???à?????????á???ò??????????????????×÷???????÷????????·?????±????????ó????????????
AT24C???????¤×÷??????1MHz?¨5V????1MHz?¨2.7V????400KHz?¨1.8V?????¤×÷??????5V??10%???ù?????ó×???????1.8V??Icc???÷??×??ó??1mA????×??ó??3mA????/??????????100?ò????????±???100?ê???¤×÷??????0??70?????ù?????ó?????????¨?¤×÷???????¨?????é·???ISO/IEC 7816-3???????é????????????????
?????á????
AT24C???????????ó??????×???????????×??óK?????¨1K=1024????8????1×?????×??ó×???????????????·¨??K??????1024??8??????AT24C01A??×??ó??????????1??1024??8=128????×??????·??????0??127?¨16??????0x00??0x7F????
???????±?????ò??AT24C?????¨??ADDR???·??????LEN??×???????????????????
Open(AT24Cxxx)
Write(ADDR,LEN,WDATA)
RDATA = Read(ADDR,LEN)
Close()
IF WDATA = RDATA THEN ?????? ELSE ???§°?
???????±?????ò??AT24C?????¨??ADDR???·??????LEN??×?????
Open(AT24Cxxx)
RDATA = Read(ADDR,LEN)
Close()
????AT88SC102??AT88SC1604??AT88SC1608??AT88SC153
????????????IC?¨??ATMEL?????¨??????CMOS?????????????????????ú?????ú?ú?ú?????????°?í?ó?????÷??????±??¤??°???±??¤??????????????·????è???????????????ó??????????????????·?????????·????????????????÷×???????±?????????????????????AT88SC??????????×??ó??????×?????????·???????·?±???2??4??8??3??·?????????????×?10??160??15??K????????·?±???1K??16K??16K??1.5K????????????????·????í??×?????·?????????AT88SC1604????·?????·????¨??????·????¨??????
1??AT88SC102?????¨
AT88SC102?????¨??·????±??????2us/????????5ms/?????¤×÷??????5V??10%????/??????????10?ò????????±???100?ê???¤×÷??????-25??70?????¨?????é·???ISO/IEC 7816-3???????é??
?????á????
????·??? ?????· ???? ×??????· ×?????
FZ ?§???ú???? 0-15 16 0-1 2
IZ ·??????? 16-79 64 2-9 8
SC ?÷?????? 80-95 16 10-11 2
SCAC ?÷?????í?ó?????? 96-111 16 12-13 2
CPZ ?ú??±??¤?? 112-175 64 14-21 8
AZ1 ???????? 176-687 512 22-85 64
EZ1 ???????????? 688-735 48 86-91 6
AZ2 ???????? 736-1247 512 92-155 64
EZ2 ???????????? 1248-1279 32 156-159 4
EAC2 ?????????????í?ó???? 1280-1407 128 160-175 16
MTZ ?????? 1408-1423 16 176-177 2
×???????????????????????×÷??????????1??×÷??????????0??×÷???????????±??????????????????????????
???????????¨FUSE2???°???????????ó?ü??±?????????????????
?????????°??±?????????
FZ????ATMEL???????§?±?è???¨FUSE1?????????????ü????ATMEL???????????ú?????§?¨?????ú??????±??¤?¨?????¨??????
IZ????????SC???????·??IZ????·?????????
SC??SC???????·?±??SC????????????SC?????????·?±??SC??????????????
SCAC??????????4??SC???????í1??SCAC??1??SCAC????0?±???¨×?????????SC???????·SCAC????????????4??SCAC??????????
CPZ???????§±ê×??????????¨????????×÷??????±ê×?????????????SC???????·?ó????????
AZ1??AZ2???°2????????±??¤??????176????AZ1??±??¤???¨1PR????177????AZ1??±??¤???¨1RD????736????AZ2??±??¤???¨2PR????737????AZ2??±??¤???¨2RD???? SC???????·?±,AZn????(n?ú±í1?ò??2??????)??????SC?????????·?±??nRD????×?AZn????????????????nRD=1?±??AZn??????????nRD=0?±??AZn????????
???????????¨FUSE2???°??nPR????×÷????????SC???????·??AZn??????????
EZ1??EZ2??SC?????????·?±??EZn??????????????SC???????·?±??EZn???????????????????????¨FUSE2???°??EZn????????×÷????
EAC2???????????¨FUSE2???°??EAC2????????×÷????
MTZ???????????¨???????????????????????ù????????
?????????ó??±?????????
FZ????ATMEL???????§?±?è???¨FUSE1?????????????ü????ATMEL???????????ú?????§?¨?????ú??????±??¤?¨?????¨??????
IZ???????????????????????¨FUSE2???óIZ????±???????IZ????????????????
SC??????????SC???????·?±??SC????????SC?????????·?±??SC??????????
SCAC??????????4??SC???????í1??SCAC??1??SCAC????0?±???¨×?????????SC???????·SCAC????????????4??SCAC??????????
CPZ???????§±ê×??????????¨????????×÷??????±ê×?????????????SC???????·?ó????????
AZ1??AZ2???°2????????±??¤??????176????AZ1??±??¤???¨1PR????177????AZ1??±??¤???¨1RD????736????AZ2??±??¤???¨2PR????737????AZ2??±??¤???¨2RD???? SC???????·?±, AZn????(n?ú±í1?ò??2??????)??????SC?????????·?±??nRD±??¤×?AZn????????????????nRD=1?±??AZn??????????nRD=0?±??AZn????????
???????????¨FUSE2???ó??????SC???????·????????nPR??·???1????????0??AZn±???±??¤????????????
EZ1??EZ2??SC?????????·?±??EZn??????????????SC???????·?±??EZn???????????????????????????¨FUSE2???ó??????EZn???????·????????AZn??????????×÷?????±??????????EZn??????????????×÷??
EAC2???????????¨FUSE2???ó??AZ2????128???????ú?á,????1????????1??
MTZ???????????¨???????????????????????ù????????
???????±?????ò??AT88SC102?¨?ê??????????×÷????????????ADDR???·??????LEN??×?????????????????
Open(AT88SC102)
IF CheckSC(Pwd) = OK THEN ???? ELSE ·?·¨?¨
WriteCPZ(CPZ) ;??????????????±ê??
UpdateSC(NewPwd)
SetZone(1)
UpdateEZ(NewEZ)
Erase(ADDR,LEN)
Write(ADDR,LEN,WDATA)
RDATA = Read(ADDR,LEN)
IF WDATA = RDATA THEN ?????? ELSE ???§°?
Fuse()
Close()
???????±?????ò????AT88SC102?¨??·???±??????§?????¨????????????ADDR???·??????LEN??×????ê????????×÷??
Open(AT88SC102)
ReadCPZ(CPZ) ;????????±ê??
if CPZ = ????±ê?? THEN ???? ELSE ·?·¨?¨
IF CheckSC(Pwd) = OK THEN ???? ELSE ·?·¨?¨
SetZone(1)
RDATA = Read(ADDR,LEN)
<???????ü??×÷>
IF CheckEZ(Pwd) = OK THEN ???? ELSE ·?·¨?¨
Erase(ADDR,LEN)
Write(ADDR,LEN,WDATA)
RDATA = Read(ADDR,LEN)
IF WDATA = RDATA THEN ?????? ELSE ???§°?
Close()
2??AT88SC1604?????¨
AT88SC1604?????¨??·????±??????2us/????????5ms/?????¤×÷??????5V??10%????/??????????10?ò????????±???10?ê???¤×÷??????0??70?????¨?????é·???ISO/IEC 7816-3???????é??
AT88SC1604????·?????·????¨??????·????¨???????ü???÷???????????·?????ù??????????????????????·????¨???????????í?ó??????????·????¨????????·????¨????????±????÷??????????????????????AT88SC1604?¨?±??×????ü??????·????¨??????·????¨??
????·????¨???????á?????¨???????????????????????????í?ó??????
????·??? ?????· ???? ×??????· ×?????
FZ ?§???ú???? 0-15 16 0-1 2
IZ ·??????? 16-79 64 2-9 8
SC ?÷?????? 80-95 16 10-11 2
SCAC ?÷?????í?ó?????? 96-103 8 12 1
CPZ ?ú??±??¤?? 104-167 64 13-20 8
SC1 ???????? 168-183 16 21-22 2
S1AC ?????????í?ó???? 184-191 8 23 1
EZ1 ???????????? 192-207 16 24-25 2
E1AC ?????????????í?ó???? 208-215 8 26 1
AZ1 ???????? 216-9775 9560 27-1221 1195
SC2 ???????? 9776-9791 16 1222-1223 2
EZ2 ???????????? 9792-9807 16 1224-1225 2
E2AC ?????????????í?ó???? 9808-9815 8 1226 1
AZ2 ???????? 9816-11863 2048 1227-1482 256
SC3 ???????? 11864-11879 16 1483-1484 2
EZ3 ???????????? 11880-11895 16 1485-1486 2
E3AC ?????????????í?ó???? 11896-11903 8 1487 1
AZ3 ???????? 11904-13951 2048 1488-1743 256
SC4 ???????? 13952-13967 16 1744-1745 2
EZ4 ???????????? 13968-13983 16 1746-1747 2
E4AC ?????????????í?ó???? 13984-13991 8 1748 1
AZ4 ???????? 13992-16039 2048 1749-2004 256
MTZ ?????? 16040-16055 16 2005-2006 2
FUSE ???? 16288-16303
×??ó???· 16383 2047
??·????¨???????á?????¨?????????????????????????í?ó??????
????·??? ?????· ???? ×??????· ×?????
FZ ?§???ú???? 0-15 16 0-1 2
IZ ·??????? 16-79 64 2-9 8
SC ?÷?????? 80-95 16 10-11 2
SCAC ?÷?????í?ó?????? 96-103 8 12 1
CPZ ?ú??±??¤?? 104-167 64 13-20 8
SC1 ???????? 168-183 16 21-22 2
S1AC ?????????í?ó???? 184-191 8 23 1
EZ1 ???????????? 192-207 16 24-25 2
E1AC ?????????????í?ó???? 208-215 8 26 1
AZ1 ???????? 216-4311 4096 27-538 512
SC2 ???????? 4312-4327 16 539-540 2
S2AC ?????????í?ó???? 4328-4335 8 541 1
EZ2 ???????????? 4336-4351 16 542-543 2
E2AC ?????????????í?ó???? 4352-4359 8 544 1
AZ2 ???????? 4360-8455 4096 545-1056 512
SC3 ???????? 8456-8471 16 1057-1058 2
S3AC ?????????í?ó???? 8472-8479 8 1059 1
EZ3 ???????????? 8480-8495 16 1060-1061 2
E3AC ?????????????í?ó???? 8496-8503 8 1062 1
AZ3 ???????? 8504-12599 4096 1063-1574 512
SC4 ???????? 12600-12615 16 1575-1576 2
S4AC ?????????í?ó???? 12616-12623 8 1577 1
EZ4 ???????????? 12624-12639 16 1578-1579 2
E4AC ?????????????í?ó???? 12640-12647 8 1580 1
AZ4 ???????? 12648-16303 3656 1581-2037 457
MTZ ?????? 16304-16319 16 2038-2039 2
FUSE ???? 16352-16367
×??ó???· 16383 2047
×???????????????????????×÷??????????1??×÷??????????0??×÷???????????±??????????????????????????
???????????¨FUSE2???°???????????ó?ü??±?????????????????
?????????°??±?????????
FZ????ATMEL???????§?±?è???¨FUSE1?????????????ü????????·??¨??°???0F0F????·??¨??°???7156??ATMEL???????????ú?????§?¨?????ú??????±??¤?¨?????¨??????
IZ????????SC???????·??IZ????·?????????
SC??SC???????·?±??SC????????????SC?????????·?±??SC??????????????
SCAC??????????8??SC???????í1??SCAC??1??SCAC????0?±???¨×?????????SC???????·SCAC????????????8??SCAC??????????
CPZ???????§±ê×??????????¨????????×÷??????±ê×?????????????SC???????·?ó????????
SC1??SC2??SC3??SC4??EZ1??EZ2??EZ3??EZ4???????????¨FUSE2???°??????????×÷????SC???????·?±??SCn??EZn??????????(n?ú±í1?ò2?ò3?ò4??????)??
S1AC??S2AC??S3AC??S4AC??E1AC??E2AC??E3AC??E4AC?????????????????????¨FUSE2???°??????????×÷????SC???????·?±??SnAC??EnAC????????
AZ1??AZ2??AZ3??AZ4???°2????AZn??????±??¤????????±??¤???¨nPR??????±??¤???¨nRD???? SC???????·?±,AZn??????????SC?????????·?±??nRD????×?AZn????????????????nRD=1?±??AZn??????????nRD=0?±??AZn????????
???????????¨FUSE2???°??nPR????×÷????????SC???????·??AZn??????????
MTZ???????????¨???????????????????????ù???????? ?????????ó??±?????????
FZ????ATMEL???????§?±?è???¨FUSE1?????????????ü????????·??¨??°???0F0F????·??¨??°???7156??ATMEL???????????ú?????§?¨?????ú??????±??¤?¨?????¨??????
IZ???????????????????????¨FUSE2???óIZ????±???????IZ????????????????
SC??????????SC???????·?±??SC????????SC?????????·?±??SC??????????
SCAC??????????8??SC???????í1??SCAC??1??SCAC????0?±???¨×?????????SC???????·SCAC????????????8??SCAC??????????
CPZ???????§±ê×??????????¨????????×÷??????±ê×?????????????SC???????·?ó????????
SC1??SC2??SC3??SC4??????????SC???????·?±??SCn????????SC?????????·?±??SCn??????????SCn???????·?±??SCn????????
S1AC??S2AC??S3AC??S4AC??????????8??SCn???????í1??SnAC??1??SnAC????0?±??n??×?????????SCn???????·SnAC????????????8??SnAC??????????
EZ1??EZ2??EZ3??EZ4??????????SCn???????·?±??EZn????????SCn?????????·?±??EZn??????????EZn???????·?±??EZn????????
E1AC??E2AC??E3AC??E4AC??????????8??EZn???????í1??EnAC??1??EnAC????0?±??n??×?????????EZn???????·EnAC????????????8??EnAC??????????
AZ1??AZ2??AZ3??AZ4???°2????AZn??????±??¤????????±??¤???¨nPR??????±??¤???¨nRD???? SCn???????·?±,AZn??????????SCn?????????·?±??nRD????×?AZn????????????????nRD=1?±??AZn??????????nRD=0?±??AZn????????
EZn???????·?±,AZn????, EZn?????????·?±,Azn????????
???????????¨FUSE2???ó??????SCn???????·????????nPR??·???1????????0??AZ±???±??¤???????????????±??????????EZ1??????????????×÷??
MTZ???????????¨???????????????????????ù????????
???????±?????ò??AT88SC1604?¨?ê??????????×÷????????????ADDR???·??????LEN??×?????????????????
Open(AT88SC1604)
IF CheckSC(Pwd) = OK THEN ???? ELSE ·?·¨?¨
WriteCPZ(CPZ) ;??????????????±ê??
UpdateSC(NewPwd)
SetZone(1)
UpdateSC(NewPwd)
UpdateEZ(NewEZ)
Erase(ADDR,LEN)
Write(ADDR,LEN,WDATA)
RDATA = Read(ADDR,LEN)
IF WDATA = RDATA THEN ?????? ELSE ???§°?
Fuse()
Close()
???????±?????ò????AT88SC1604?¨??·???±??????§?????¨????????????ADDR???·??????LEN??×????ê????????×÷??
Open(AT88SC1604)
ReadCPZ(CPZ) ;????????±ê??
if CPZ = ????±ê?? THEN ???? ELSE ·?·¨?¨
IF CheckSC(Pwd) = OK THEN ???? ELSE ·?·¨?¨
SetZone(1)
RDATA = Read(ADDR,LEN)
<???????ü??×÷>
IF CheckSC(Pwd) = OK THEN ???? ELSE ·?·¨?¨
IF CheckEZ(Pwd) = OK THEN ???? ELSE ·?·¨?¨
Erase(ADDR,LEN)
Write(ADDR,LEN,WDATA)
RDATA = Read(ADDR,LEN)
IF WDATA = RDATA THEN ?????? ELSE ???§°?
Close()
3??AT88SC1608?????¨
??????AT88SC1064????AT88SC102??AT24C16???ù????×÷?????????????°??????AT88SC1608?ò????????IC?¨?????????ì???¨??·??????????¨?à?????ü???????ü???¤?????ü??±????????????????????ì?????è????????????????????×÷??
AT88SC1608?????¨?±????????1MHz???§??????·???(16×???/??)????????????·???·??????°??·????±????10ms(×??ó)/?????¤×÷??????2.7V??5.5V????/??????????10?ò????????±???100?ê???¤×÷??????0??70?????¨?????é·???ISO/IEC 7816-3???????é??
??????AT88SC1608?????¨????±?????????·???????????????????????????????±??????¤?°·??????ú×???????64???à?????¤?°???¤?í?ó?????÷,?í?ó????8????
AT88SC1608????1??128×????è??????8??256×???????·?????8????????×?????????·?±??????????????????¨16?×???????÷3??×????????????í?ó????8????
AT88SC1608????17408???¨2176×????????????????????°16K???¨2K×????????????????ó1K???¨128×????????è??????
?????á????(×??????·??16????±í??)
????·??? $0 $1 $2 $3 $4 $5 $6 $7 ???·
????·???0?¨User0?? 256×??? $000
????·???1?¨User1?? 256×??? $100
????·???2?¨User2?? 256×??? $200
????·???3?¨User3?? 256×??? $300
????·???4?¨User4?? 256×??? $400
????·???5?¨User5?? 256×??? $500
????·???6?¨User6?? 256×??? $600
????·???7?¨User7?? 256×??? $700
?è???? 128×??? $800
?????è?????????á????(×??????·??16????±í??)
$0 $1 $2 $3 $4 $5 $6 $7 ???·
?§?????? ????????(ATR) ?ú?·?ú??(HC) $00
?§???ú??(FZ) ±??? ?¨???ú???¨CMC?? $08
·????¨?? AR0 AR1 AR2 AR3 AR4 AR5 AR6 AR7 $10
±??? $18
???¤?? AAC ??±???(Nc) $20
????(Ci) $28
???? ????(Gc) $30
?????? ??????(MTZ) $38
?????? PAC ??????0(WP0) PAC ??????0(RP0) $40
PAC ??????1(WP1) PAC ??????1(RP1) $48
PAC ??????2(WP2) PAC ??????2(RP2) $50
PAC ??????3(WP3) PAC ??????3(RP3) $58
PAC ??????4(WP4) PAC ??????4(RP4) $60
PAC ??????5(WP5) PAC ??????5(RP5) $68
PAC ??????6(WP6) PAC ??????6(RP6) $70
PAC ??????7(WP7/SC) PAC ??????7(RP7) $78
×??????????????×?????ò??·??????¤????·????¨??AR0-AR7 ?????¨??
ATR??????????????ATMEL?¨????????????
HC???ú?·?ú??????ATMEL?¨????????????
FZ???§???ú??????ATMEL?¨????????????
CMC???¨???ú???????¨?§?¨????????????
AR0-7??·????¨???????????°?¨?????¨?ê????·¨????·????¨????
Nc????±??????¨????×÷?¨???¨??±ê??--?¨???????????°?¨????
Ci???????????????°?????????ú???????¤?¨?±?????????????¤?á±?×?????????
Gc????????64????±?????×?????Nc?¨??F1???????????????????????°???????¨???????????ó????·????????¤?±×÷?????¨??F2?????????????¨?ê????·¨???????¤???é??
AAC???????¤?í?ó?????÷??????????8??
MTZ???????????¨???????????????????????ù????????
WP0-WP7,RP0-RP7??8?×??????????, ????·???????·?±????ò?¨?????????????????????ò?????×???????????ù???????????????×???????????à??·????????à??·??????????????ó??·?????????WP7??RP7??????????????????7(WP7)??×÷??????????(SC)???í?????????è???????????????±????±????????????×????????????????
SC????????????????????ATMEL?¨????·????????¨?§???????????????????????????°???±????SC?????????ó???ü???????á±???????
PAC????·????????í?ó?????÷??????????8??
????±ê???¨FUSE??
????±ê???????è??????$80???·???????á????(???·??16????±í??)
??7 ??6 ??5 ??4 ??3 ??2 ??1 ??0 ???·
0 0 0 0 0 PER CMA FAB $80
×???FAB??CMA??FAB??AT88SC1608??EEPROM??????????±??¤±ê?????°0?±±í????????????????±ê???????°1?±?±???ù????????????????????????????????×÷??????·?????
FAB??ATMEL?????????§?±??????±ê????
CMA???¨?§???¨?????§?±??????±ê????
PER???????????????°???????±??????±ê????
?±????°? AT88SC1608?¨???????????°???¨??????????×÷?ê????????×÷??
ATMEL???ê?§??????(???¨???ú??)??????????(SC)??°????à?????????????????°1?±??×?FAB??????×÷????FAB=0??
?¨?§????×??????¨???ú???ó??×?CMA??????×÷????CMA=0??
?????????¨×??????????ò?¨??·??????°??????×????????????ó×?PER??????×÷????CMA=0??
·????¨??
?????????°?ó??·????¨??±í??
?? ·??? FAB=0 CMA=0 Per=0
?§?????? (???¨???ú??) ?? ???? ???? ????
?? ???? ???? ????
?¨???ú?? ?? ???? ???? ????
?? ????????(SC) ???? ????
·????¨?? ?? ???? ???? ????
?? ????????(SC) ????????(SC) ????
???¤?? ?? ???? ???? ????
?? ????????(SC) ????????(SC) ????
???? ?? ????????(SC) ????????(SC) ????
?? ????????(SC) ????????(SC) ????
?????? ?? ???? ???? ????
?? ???? ???? ????
???? ?? ????????(SC) ????????(SC) ??????(WP)
?? ????????(SC) ????????(SC) ??????(WP)
PAC(?????÷) ?? ???? ???? ????
?? ????????(SC) ????????(SC) ??????(WP)
?????? ?? ·????¨??(AR) ·????¨??(AR) ·????¨??(AR)
?? ·????¨??(AR) ·????¨??(AR) ·????¨??(AR)
·????¨??AR0-AR7???????á????(???????°0?±?????????°1?±)
??7 ??6 ??5 ??4 ??3 ??2 ??1 ??0
WPE RPE ATE PW2 PW1 PW0 MDF PGO
WPE??????????????±ê????????0?±????????·???????????×÷?±??±????¨???????????????????ó???????????????????¨×???·?????±?????????????????
RPE??????????????±ê????????0?±???¨?????????ò????????????????????·??????????????????í?ó??·???????×???????
ATE?????¤????±ê??????0?±?????¤±????¨????????×÷?±?°????·?????
PW2??PW1??PW0????3?????¨?±?°????·????????????×????????????·???????·?±????ò?¨?????????????????????ò?????×???????????ù???????????????×???????????à??·????????à??·??????????????ó??·?????
MDF??????????????×÷±ê????????0?±???±?°????·???±???±??¤??±???±??¤????????±??????????????°??????
PGO??????±ê??????????0???±?°????·??????????????????°1?±?????°0?±???????????°0?±???????°1?±??
???¤???é
?ú?????ú??Nc(?ù?ù?±×÷?¨??)??Ci????????Gc=F1(Ks,Nc)??°?Nc??Ci??Gc?????¨??
?¨ Nc Gc Ci ???¤???é ?????÷ Ks Q0(???ú????
??±???: Nc Ci Ci+1=F2(Gc,Ci,Q0); if(Ci+1==Q1) Ci+2=F2(Gc,C1+1); Ci=Ci+2; //????Ci ???¤???·; else Ci=Ci; ???¤?í?ó; Ci ?¨???????ü???? ?¨?????????¤?ü???? ?¨???é???¤?ü???? ?¨???ü???? Gc=F1(Ks,Nc); Q0 Q1=F2(Gc,Ci,Q0); Q1 Q2=F2(Gc,Q1); if(Q2=Ci) ???¤???·; else ???¤?í?ó??
F1??·¨??64BIT ???§×??¨????·¨??
F2??·¨???¨??64BIT ??·¨(Des ??·¨??±??????á??C??????51??±à???????ò)
?????é°ü?¨?¨???????÷CPU?????à???¤?¨ELVAר?????????????¤??????????????????·????¨??????±???????
???????±?????ò??AT88SC1608?¨?ê??????????×÷????????????ADDR???·??????LEN??×?????????????????
Open(AT88SC1608)
IF CheckSC(Pwd) = OK THEN ???? ELSE ·?·¨?¨
InitAuth(Nc,Ci,Gc)
SetZone(1)
SetAR(AR)
UpdateWP(NewWP)
UpdateRP(NewRP)
Write(ADDR,LEN,WDATA)
RDATA = Read(ADDR,LEN)
IF WDATA = RDATA THEN ?????? ELSE ???§°?
Fuse()
Close()
???????±?????ò????AT88SC1608?¨??·???±??????§?????¨????????????ADDR???·??????LEN??×????ê????????×÷??
Open(AT88SC1608)
CheckAuth(Gc)
SetZone(1)
IF CheckRP(Pwd) = OK THEN ???? ELSE ·?·¨?¨
RDATA = Read(ADDR,LEN)
<???????ü??×÷>
IF CheckWP(Pwd) = OK THEN ???? ELSE ·?·¨?¨
Write(ADDR,LEN,WDATA)
RDATA = Read(ADDR,LEN)
IF WDATA = RDATA THEN ?????? ELSE ???§°?
Close()
4??AT88SC153?????¨
AT88SC153??ATMEL??AT88SC1068???ó?????????????¨?????ü??????AT88SC1608?????????????????????????°·????????ù??±????ù±????????í????????????AT88SC1608??
AT88SC153?????¨?±????????1MHz???§??????·???(8×???/??)????????????·???·??????°??·????±????10ms(×??ó)/?????¤×÷??????2.7V??5.5V????/??????????10?ò????????±???100?ê???¤×÷??????0??70?????¨?????é·???ISO/IEC 7816-3???????é??
??AT88SC1608???ù??AT88SC153?????¨????±?????????·???????????????????????????????±??????¤?°·??????ú×???????64???à?????¤?°???¤?í?ó?????÷,?í?ó????8????
AT88SC153????1??64×????è??????3??64×???????·?????3????????×?????????·?±??????????????????¨4?×???????÷3??×????????????í?ó????4/8????
AT88SC153????2048???¨256×????????????????????°1536???¨192×????????????????ó512???¨64×????????è??????
?????á????(×??????·??16????±í??)
????·??? $0 $1 $2 $3 $4 $5 $6 $7 ???·
????·???0?¨User0?? 64×??? $00
????·???1?¨User1?? 64×??? $40
????·???2?¨User2?? 64×??? $80
?è???? 64×??? $C0
?????è?????????á????(×??????·??16????±í??)
$0 $1 $2 $3 $4 $5 $6 $7 ???·
?§?????? ????????(ATR) ?ú?·?ú??(HC) $00
?§???ú??(FZ) ?¨?????¨CMC?? AR0 AR1 AR2 MTZ $08
??±??? ·?????(IC) $10
DCR ??±???(Nc) $18
AAC ????(Ci) $20
???? ????(Gc) $28
?????? PAC ??????0(WP0) PAC ??????0(RP0) $30
PAC ??????1(WP1/SC) PAC ??????1(RP1) $38
×??????????????×?????ò??·??????¤????·????¨??AR0-AR2 ?????¨??
?????????é?????¤·????±?????·$20????????×÷???é?????¤?????÷(CAR)??
ATR??????????????ATMEL?¨????????????
HC???ú?·?ú??????ATMEL?¨????????????
FZ???§???ú??????ATMEL?¨????????????
CMC???¨???ú???????¨?§?¨????????????
AR0-2??·????¨???????????°?¨?????¨?ê????·¨????·????¨????
MTZ???????????¨???????????????????????ù????????
IC??·??????????????°?¨??????
DCR???è±??è???????÷??
Nc????±??????¨????×÷?¨???¨??±ê??--?¨???????????°?¨????
Ci???????????????°?????????ú???????¤?¨?±?????????????¤?á±?×?????????
Gc????????64????±?????×?????Nc?¨??F1???????????????????????°???????¨???????????ó????·????????¤?±×÷?????¨??F2?????????????¨?ê????·¨???????¤???é??
AAC???????¤?í?ó?????÷??????????8???????????é???í??2???ù??????4?????????é???í???ú?á??????????8???¨??DCR???è??·?·¨????????×÷Ci??????·???×?????????????AAC???á?°?ì?????????¤??Ci????
CAR?????é?????¤?????÷?????????¤?ê???±????????????????×÷???á?¤?????é??·???????°????ò???????????é??×???????CAR?????±???????????é???????·?¨????×÷??·??ê????????????×÷???á?á?????é??·?????
WP0,WP1,RP0,RP1??2?×??????????, ????·???????·?±????ò?¨?????????????????????ò?????×???????????ù???????????????×???????????à??·????????à??·??????????????ó??·?????????WP1??RP1??????????????????1(WP1)??×÷??????????(SC)???í?????????è???????????????±????±????????????×????????????????
SC????????????????????ATMEL?¨????·????????¨?§???????????????????????????°???±????SC?????????ó???ü???????á±???????
PAC????·????????í?ó?????÷??????????8???????????é???í??2???ù??????4?????????é???í???ú?á??????????8?????¨??DCR???è??·?·¨??
????±ê???¨FUSE??
????±ê???????è??????$40???·???????á????(???·??16????±í??)
??7 ??6 ??5 ??4 ??3 ??2 ??1 ??0 ???·
0 0 0 0 0 PER CMA FAB $40
×???FAB??CMA??FAB??AT88SC153??EEPROM??????????±??¤±ê?????°0?±±í????????????????±ê???????°1?±?±???ù????????????????????????????????×÷??????·?????
FAB??ATMEL?????????§?±??????±ê????
CMA???¨?§???¨?????§?±??????±ê????
PER???????????????°???????±??????±ê????
?±????°? AT88SC153?¨???????????°???¨??????????×÷?ê????????×÷??
ATMEL???ê?§??????(???¨???ú????·????¨??????????)??????????(SC)??°????à?????????????????°1?±??×?FAB??????×÷????FAB=0??
?¨?§????×??????¨???ú???ó??×?CMA??????×÷????CMA=0??
?????????¨×??????????ò?¨??·??????°??????×????????????ó×?PER??????×÷????CMA=0??
·????¨??
?????????°?ó??·????¨??±í??
?? ·??? FAB=0 CMA=0 Per=0
?§?????? (??CMC??AR??MTZ) ?? ???? ???? ????
?? ???? ???? ????
?¨???ú?? ?? ???? ???? ????
?? ????????(SC) ???? ????
·????¨?? ?? ???? ???? ????
?? ????????(SC) ????????(SC) ????
?????? ?? ???? ???? ????
?? ???? ???? ????
??±??? ?? ???? ???? ????
?? ????????(SC) ????????(SC) ????
???? ?? ????????(SC) ????????(SC) ????
?? ????????(SC) ????????(SC) ????
???? ?? ????????(SC) ????????(SC) ??????(WP)
?? ????????(SC) ????????(SC) ??????(WP)
PAC(?????÷) ?? ???? ???? ????
?? ????????(SC) ????????(SC) ??????(WP)
?????? ?? ·????¨??(AR) ·????¨??(AR) ·????¨??(AR)
?? ·????¨??(AR) ·????¨??(AR) ·????¨??(AR)
·????¨??AR0-AR2???????á????(???????°0?± ?????????°1?±)
??7 ??6 ??5 ??4 ??3 ??2 ??1 ??0
WPE RPE ATE AOW PWS WLM MDF PGO
WPE??????????????±ê????????0?±????????·???????????×÷?±??±????¨???????????????????ó???????????????????¨×???·?????±?????????????????
RPE??????????????±ê????????0?±???¨?????????ò????????????????????·??????????????????í?ó??·???????×???????
ATE?????¤????±ê??????0?±?????¤±????¨????????×÷?±?°????·?????
AOW?????????±???è?????¤±ê????????????×÷?±???è?????????¤???????è?????????¤??×÷??????ATE=0???òAOW±???????
PWS?????¨?±?°????·????????????×????????????·???????·?±????ò?¨?????????????????????ò?????×???????????ù???????????????×???????????à??·????????à??·??????????????ó??·?????
WLM????????????????????????8??×???????????????WLM=0????????????????×????¨byte0??????????·?±???????8??×?????????±ê????0???????¨?????????°1?±?????°0?±???????????°0?±???????°1?±????1????????
MDF??????????????×÷±ê????????0?±???±?°????·???±???±??¤??±???±??¤????????±??????????????°??????
PGO??????±ê??????????0???±?°????·??????????????????°1?±?????°0?±???????????°0?±???????°1?±??
?è±??è???????÷?¨DCR??
?è±??è???????÷?????è??????$18???·???????á????(???????°0?±?????????°1?±)
??7 ??6 ??5 ??4 ??3 ??2 ??1 ??0
SME UCR UAT ETA CS3 CS2 CS1 CS0
CS0-CS3????±à????????ATMEL???§?±????$B?¨??1011?????ü??·????¨???ù???ü??×?????4????
ETA??8????????????ETA=0????????AAC??PAC????????????8??·??ò??4??
UAT???????¤?í?ó????????±ê????UAT=0??AAC??????·??òAAC??????
UCR?????????????é??????±ê????UCR=1?±?????????¤?????????é??·????????¨????????UCR=0?±????????????????
SME?????????í·?????SME=0?±???¨??1WP???é???????????????????????????°?????í?ó?????÷??
???¤???é
?ú?????ú??Nc(?ù?ù?±×÷?¨??)??Ci????????Gc=F1(Ks,Nc)??°?Nc??Ci??Gc?????¨??
?¨ Nc Gc Ci ???¤???é ?????÷ Ks Q0(???ú????
??±???: Nc Ci Ci+1=F2(Gc,Ci,Q0); if(Ci+1==Q1) Ci+2=F2(Gc,C1+1); Ci=Ci+2; //????Ci ???¤???·; else Ci=Ci; ???¤?í?ó; Ci ?¨???????ü???? ?¨?????????¤?ü???? ?¨???é???¤?ü???? ?¨???ü???? Gc=F1(Ks,Nc); Q0 Q1=F2(Gc,Ci,Q0); Q1 Q2=F2(Gc,Q1); if(Q2=Ci) ???¤???·; else ???¤?í?ó??
F1??·¨??64BIT ???§×??¨????·¨??
F2??·¨???¨??64BIT ??·¨(Des ??·¨??±??????á??C??????51??±à???????ò)
?????é°ü?¨?¨???????÷CPU?????à???¤?¨ELVAר?????????????¤??????????????????·????¨??????±???????
???????±?????ò??AT88SC153?¨?ê??????????×÷????????????ADDR???·??????LEN??×?????????????????
Open(AT88SC153)
IF CheckSC(Pwd) = OK THEN ???? ELSE ·?·¨?¨
WriteIC(IC) ;??·?????
WriteDCR(DCR)
InitAuth(Nc,Ci,Gc)
SetZone(1)
SetAR(AR)
UpdateWP(NewWP)
UpdateRP(NewRP)
Write(ADDR,LEN,WDATA)
RDATA = Read(ADDR,LEN)
IF WDATA = RDATA THEN ?????? ELSE ???§°?
Fuse()
Close()
???????±?????ò????AT88SC153?¨??·???±??????§?????¨????????????ADDR???·??????LEN??×????ê????????×÷??
Open(AT88SC153)
ReadIC(IC) ;????·?????
if IC = ·????? THEN ???? ELSE ·?·¨?¨
CheckAuth(Gc)
SetZone(1)
IF CheckRP(Pwd) = OK THEN ???? ELSE ·?·¨?¨
RDATA = Read(ADDR,LEN)
<???????ü??×÷>
IF CheckWP(Pwd) = OK THEN ???? ELSE ·?·¨?¨
Write(ADDR,LEN,WDATA)
RDATA = Read(ADDR,LEN)
IF WDATA = RDATA THEN ?????? ELSE ???§°?
Close()
????AT45D041
??????????IC?¨??ATMEL?????¨????????????±??????????ó??????FLASH ?????¨????????????4M?????÷????????2048???¨??????????264×??????????±???á?????????????ò?????????????¨????????????????????264×???????????·?????264×????????????±????7ms???????á???ò?????÷????????·?????±????????ó???????????????ó???????????ù?????????ò??????
AT45D041???¤×÷??????10MHz?¨×??ó?????¤×÷??????5V??10%???¤×÷???÷????25mA??????50mA??????±???100?ê???¤×÷??????0??70?????ù?????ó?????????¨?¤×÷???????¨?????é??SPI????????·???0??·???3??
??????1????????2???÷????????????·??????????ù????·?±?????
1. ?±?????÷????????????????????
2. °??÷??????????????????????????1?ò??????2??
3. °??÷????????????????????????1?ò??????2??????????±?????
4. °???????1?ò??????2???????????÷????????????(?????¨??????)??
5. °???????1?ò??????2???????????÷????????????(??6. ?????¨??????)??
7. °??????????÷??????????????
8. ×???????????
9. ????????1????????2??
10. ????????1????????2??
11. ??×???????
×??????á????
??7 ??6 ??5 ??4 ??3 ??2 ??1 ??0
???? ±??? 0 1 1 x x x
×?????7??0±í????????1±í??????????????????????????
??6??0±í???÷??????????????????±?????????·??ò??????????
??5????4????3????AT45D041???°011?±?¨??????????
???????±?????ò?¨??AT45D041?¨??????1?ü???÷??????????1????????????
OpenCard(AT45D041)
SetPage(1)
SetBuff(1)
PageToBuff()
WHILE ReadStatus() = Busy LOOP
WriteBuff(Addr,Len,cData)
BuffToPage()
WHILE ReadStatus() = Busy LOOP
AutoRWrite()
WHILE ReadStatus() = Busy LOOP
Close()
?ò
OpenCard(AT45D041)
SetPage(1)
SetBuff(1)
WritePage(Addr,Len.cData)
WHILE ReadStatus() = Busy LOOP
AutoRWrite()
WHILE ReadStatus() = Busy LOOP
Close()
???????±?????ò?¨??AT45D041?¨??????1?????÷??????????1??
OpenCard(AT45D041)
SetPage(1)
SetBuff(1)
WriteBuff(0,264,cData)
BuffToPage()
WHILE ReadStatus() = Busy LOOP
Close()
?ò
OpenCard(AT45D041)
SetPage(1)
SetBuff(1)
WritePage(0,264.cData)
WHILE ReadStatus() = Busy LOOP
Close()
×???±??????????????§????????IC?¨?????±??????
?????? ??????IC?¨??????????
IC?¨?í??????????????·??????????÷?á?????????????ù?????????í????·????????????????????????????????????????ó?????ì??????????????????????????MCS-C??????IC?¨?¨???????÷?á????FoxPro for DOS??PLB?????????????????§???????ù±???????????IC?¨???????????ù??????
??FoxPro???ò?????????°????????????SET LIBRARY TO ICFOX.PBL??FoxPro???á×?????????ICFOX.PLB????IC?¨???????ú?????ó????FoxPro?????????????ù????????????????±à????EXE?????±????ICFOX.PLB??????
1?? ??????±í(??????2? , ?ò?????÷)
1?? ?¨??????
InitComm ?????????¨?????????????????è±?
ExitComm ????????????
ErrorMsg ·????í?ó????
GetInfo ?????è±???°?±???
TestCard ?????????÷????·????¨
OpenCard ?ò?????????????¨????×÷
ReadChr ???¨?????¨???·???????¨?¤????×?·???
WriteChr ?ò?¨?????¨???·???????¨?¤????×?·???
ReadInt ???¨?????¨???·????????????????
WriteInt ?ò?¨?????¨???·????????????????
CloseCard ??±??¨??×÷
2? ATMEL AT88SC102/AT88SC1604?????¨×¨??????
ReadFZ ???§???ú??
ReadIZ ???¨???ú??
ReadCPZ ???ú??±??¤??
WriteCPZ ???ú??±??¤??
ReadMTZ ????????
WriteMTZ ????????
SetZone ??????????
CheckSC ±???????(?ò??????)
UpdateSC ?ü??????(?ò??????)
ReadSCAC ??????(?ò??????)???é?í?ó????
CheckEZ ±?????????????
UpdateEZ ?ü????????????
ReadEAC ???????????????é?í?ó????
Erase ???¨?????¨?????????????¨?¤??×???
Fuse ?????¨??????
3? ATMEL AT88SC1608?°AT88SC153?????¨×¨??????
ReadFZ ???§???ú??
ReadIZ ???¨???ú??
ReadIC ??·?????(AT88SC153ר??)
WriteIC ??·?????(AT88SC153ר??)
ReadDCR ???è±??è???????÷(AT88SC153ר??)
WriteDCR ???è±??è???????÷(AT88SC153ר??)
ReadMTZ ????????
WriteMTZ ????????
InitAuth ?????????¤×???
CheckAuth ???¤???é
ReadAAC ?????¤?í?ó????
CheckSC ±???????????
UpdateSC ?ü??????????
ReadSCAC ?????????????é?í?ó????
SetZone ??????????
ReadAR ??????????·????¨??
WriteAR ?è??????????·????¨??
CheckWP ±?????????
UpdateWP ?ü????????
ReadWPAC ???????????é?í?ó????
CheckRP ±?????????
UpdateRP ?ü????????
ReadRPAC ???????????é?í?ó????
FuseStatus ?????¨??????×???
Fuse ?????¨??????
4? ATMEL AT45D041 Flash?????¨×¨??????
SetPage ?????÷?????????±?°??
SetBuff ??????????
ReadPage ?????÷????????????×?·?
ReadBuff ??????????1/??????2????×?·?
WritePage ??×?·????÷????????
WriteBuff ??×?·?????????1/??????2
CompPB ±????÷????????????????1/??????2??????
PageToBuff ???÷?????????á??????????????1/??????2
BuffToPage ????????1/??????2?????????÷????????
ReadStatus ??×???×??¨??????
AutoRWrite ×???????
3?? ???????÷
InitComm(Port)
???÷???????????¨?????????????????è±???
??????Port----????±ê????????0,1·?±??ú±í????1??????2??
·??????? =0?????·??
<>0?????í??·??????ú±í?í?ó????
??????Ret = InitComm(0) ??????????1??
ExitComm()
???÷????????????????
??????????
·??????? =0?????·??
<>0?????í??·??????ú±í?í?ó????
??????Ret = ExitComm() ??????????
ErrorMsg(ErrNo)
???÷??·????í?ó??????
???????í?ó????
·??????? ?í?ó??????
??????Msg = ErrorMsg(0) ·????°?????±??
GetInfo()
???÷???????è±???°?±?????
??????????
·??????? ?è±???°?±?????
??????Vno = GetInfo()??
TestCard()
???÷???????????÷????·????¨??
??????????
·??????? =0?????·??
<0???????÷?????????¨??·??????ú±í?í?ó????
??????Ret = TestCard()
OpenCard(CardType)
???÷???ò?????????????¨????×÷
??????CardType----IC?¨?à??????????????????????
·??????? =0?????·??
<>0?????í??·??????ú±í?í?ó????
??????Ret = OpenCard(AT24C01A) ?????¨????AT24C01A??
ReadChr(Addr,Len)
???÷?????¨?????¨???·???????¨?¤????×?·?????
??????Addr----????×÷???¨?????????·??
Len----×?·????¤????
·??????????¨????????×?·?????
????×÷???í??·???""??
??????cData = ReadChr(0, 10) ???¨???????????·0????10??×?·???
WriteChr(Addr,Len,cData)
???÷???????¨?¤????×?·??????????¨???????¨???????·????
??????Addr----????×÷???¨?????????·??
Len----×?·????¤????
cData----???ò?¨????????×?·?????
·??????? =0?????·??
<0??????×÷???í??·??????ú±í?í?ó????
??????Ret = WriteChr(0, 14, "Testing MCS-C!") ??×?·????????¨???·0????
ReadInt(Addr)
???÷?????¨?????¨?????????·??????????????????
??????Addr----????×÷???¨?????????·??
·??????????¨??????????????????
??????iData = ReadInt(0) ???¨???????????·0??????????????
WriteInt(Addr,iData)
???÷???????????????????????¨?????¨???????·????
??????Addr----????×÷???¨?????????·??
iData----???ò?¨??????????????????
·??????? =0?????·??
<0??????×÷???í??·??????ú±í?í?ó????
??????Ret = WriteInt(0, 12345.6789) ??12345.6789???????¨?????·0????
CloseCard()
???÷????±??¨??×÷
??????????
·??????? =0?????·??
<>0?????í??·??????ú±í?í?ó????
??????Ret = CloseCard()
ReadFZ()
???÷?????§???ú????
??????????
·??????????¨???????§???ú??(16????×?·???)??
????×÷???í??·???""??
??????FZ = ReadFZ()
ReadIZ()
???÷?????¨???ú????
??????????
·??????????¨???????¨???ú??(16????×?·???)??
????×÷???í??·???""??
??????IZ = ReadIZ()
ReadCPZ()
???÷?????ú??±??¤????
??????????
·??????????¨???????ú??±??¤??(16????×?·???)??
????×÷???í??·???""??
??????CPZ = ReadCPZ()
WriteCPZ(CPZ)
???÷?????ú??±??¤????
???????¤??????16??×?????×?·???(16????×?·???)??
·??????? =0?????·??
<>0?????í??·??????ú±í?í?ó????
??????Ret = WriteCPZ("0123456789ABCDEF")
ReadMTZ()
???÷????????????
??????????
·??????????¨???????ú??±??¤??(16????×?·???)??
????×÷???í??·???""??
??????MTZ = ReadMTZ()
WriteMTZ(MTZ)
???÷????????????
??????×?·???(16????×?·???)??
·??????? =0?????·??
<>0?????í??·??????ú±í?í?ó????
??????Ret = WriteMTZ("ABCDEF")
SetZone(Zone)
???÷??????????????
??????Zone----??????????????????0-n?ú±í??????0????????n??
·??????? =0?????·??
<0?????í??·??????ú±í?í?ó????
??????Ret = SetZone(1)
CheckSC(SC)
???÷??±???????(?ò??????)??
??????×?·???(16????×?·???)??
·??????? =0?????·??
<0?????í??·??????ú±í?í?ó????
??????Ret = CheckSC("FFFF")
UpdateSC(SC)
???÷???ü??????(?ò??????)??
??????×?·???(16????×?·???)??
·??????? =0?????·??
<0?????í??·??????ú±í?í?ó????
??????Ret = UpdateSC("9999")
ReadSCAC()
???÷????????(?ò??????)???é?í?ó??????
??????????
·??????????????é?í?ó????????
??????SCAC = ReadSCAC()
CheckEZ(EZ)
???÷??±???????????(?ò??????????)??
??????×?·???(16????×?·???)??
·??????? =0?????·??
<0?????í??·??????ú±í?í?ó????
??????Ret = CheckEZ("FFFF")
UpdateEZ(EZ)
???÷???ü??????????(?ò??????????)??
??????×?·???(16????×?·???)??
·??????? =0?????·??
<0?????í??·??????ú±í?í?ó????
??????Ret = UpdateEZ("9999")
ReadEZAC()
???÷????????????(?ò??????????)???é?í?ó??????
??????????
·??????????????é?í?ó????????
??????EZAC = ReadEZAC()
Erase(Addr,Len)
???÷???????¨?????????????¨?¤????×?????
??????Addr----???????????????·??
Len----?????????¤????
·??????? =0?????·??
<0?????í??·??????ú±í?í?ó????
??????Ret = Erase(0, 10)
Fuse()
???÷???????¨????????
??????????
·??????? =0?????·??
<0?????í??·??????ú±í?í?ó????
??????Ret = Fuse()
ReadIC()
???÷????·?????(AT88SC153ר??)??
??????????
·???????·?????(16????×?·???)??
??????Ret = ReadIC()
WriteIC(IC)
???÷????·?????(AT88SC153ר??)??
??????×?·???(16????×?·???)??
·??????? =0?????·??
<0?????í??·??????ú±í?í?ó????
??????Ret = WriteIC("012456789ABCDEF")
ReadDCR()
???÷?????è±??è???????÷(AT88SC153ר??)??
??????????
·????????è±??è???????÷????(16????×?·???)??
??????Ret = ReadDCR()
WriteDCR(DCR)
???÷?????è±??è???????÷(AT88SC153ר??)??
??????×?·???(16????×?·???)??
·??????? =0?????·??
<0?????í??·??????ú±í?í?ó????
??????Ret = WriteDCR("FF")
InitAuth(Nc,Ci,Gc)
???÷???????????¤???é??
??????Nc----??±?????
Ci----??????
Gc----??????
·??????? =0?????·??
<0?????í??·??????ú±í?í?ó????
??????Ret = InitAuth(Nc,Ci,Gc)
CheckAuth(Gc)
???÷?????¤???é??
??????Gc----??????
·??????? =0?????·??
<0?????í??·??????ú±í?í?ó????
??????Ret = CheckAuth(Gc)
ReadAAC()
???÷???????¤?í?ó??????
??????????
·??????????¤???é?í?ó????????
??????AAC = ReadAAC()
ReadAR()
???÷????????????·????¨????
??????????
·????????±?°·??????¨??×???(16????×?·???)??
??????AR = ReadAR()
WriteAR(AR)
???÷???è??????????·????¨????
??????AR----?±?°·??????¨??×???(16????×?·???)??
·??????? =0?????·??
<0?????í??·??????ú±í?í?ó????
??????Ret = WriteAR("FF")
CheckWP(WP)
???÷??±????±?°??????????
??????×?·???(16????×?·???)??
·??????? =0?????·??
<0?????í??·??????ú±í?í?ó????
??????Ret = CheckWP("FFFFFF")
UpdateWP(WP)
???÷???ü???±?°??????????
??????×?·???(16????×?·???)??
·??????? =0?????·??
<0?????í??·??????ú±í?í?ó????
??????Ret = UpdateWP("999999")
ReadWPAC()
???÷?????±?°???????????é?í?ó??????
??????????
·????????±?°???????????é?í?ó????????
??????WPAC = ReadWPAC()
CheckRP(RP)
???÷??±????±?°??????????
??????×?·???(16????×?·???)??
·??????? =0?????·??
<0?????í??·??????ú±í?í?ó????
??????Ret = CheckRP("FFFFFF")
UpdateRP(RP)
???÷???ü???±?°??????????
??????×?·???(16????×?·???)??
·??????? =0?????·??
<0?????í??·??????ú±í?í?ó????
??????Ret = UpdateRP("999999")
ReadRPAC()
???÷?????±?°???????????é?í?ó??????
??????????
·????????±?°???????????é?í?ó????????
??????RPAC = ReadRPAC()
FuseStatus()
???÷???????¨??????×???
??????????
·??????? =0????????
=1????????
??????PER = FuseStatus()
SetPage(Page)
???÷???????÷?????????±?°????
??????Page----??????????????1-n?ú±í??1????n??
·??????? =0?????·??
<0?????í??·??????ú±í?í?ó????
??????Ret = SetPage(1)
SetBuff(Buff)
???÷??????????????
??????Buff----????????????????1,2?ú±í??????1,??????2??
·??????? =0?????·??
<0?????í??·??????ú±í?í?ó????
??????Ret = SetBuff(1)
ReadPage(Addr,Len)
???÷???????÷????????????×?·???
??????Addr----????????????×??????·??
Len----?????????¤????
·???????·?????????×?·?????
??????cData = ReadPage(0,10)
ReadBuff(Addr,Len)
???÷????????????????×?·???
??????Addr----????????????×??????·??
Len----?????????¤????
·???????·?????????×?·?????
??????cData = ReadBuff(0,10)
WritePage(Addr,Len,cData)
???÷????×?·????÷??????????
??????Addr----????????????×??????·??
Len----?????????¤????
cData----??????·??????¨??????????×?·?????
·??????? =0?????·??
<0??·??????ú±í?í?ó????
??????Ret = WritePage(0,10,"1234567890")
WriteBuff(Addr,Len,cData)
???÷????×?·???????????
??????Addr----????????????×??????·??
Len----?????????¤????
cData----??????·???????????????????×?·?????
·??????? =0?????·??
<0??·??????ú±í?í?ó????
??????Ret = WriteBuff(0,10,"1234567890")
CompPB()
???÷??±????÷????????????????????????
??????????
·??????? =0?????·??
<0??·??????ú±í?í?ó????
??????Ret = CompPB()
PageToBuff()
???÷???÷???????????ò????????????
??????????
·??????? =0?????·??
<0??·??????ú±í?í?ó????
??????Ret = PageToBuff()
BuffToPage()
???÷???????????????????÷??????????
??????????
·??????? =0?????·??
<0??·??????ú±í?í?ó????
??????Ret = BuffToPage()
ReadStatus()
???÷????×???×??¨??????
??????????
·??????? =0??????
<0??·??????ú±í???ò?í?ó????
??????Ret = ReadStatus()
AutoRWrite()
???÷??×?????????
??????????
·??????? =0?????·??
<0??·??????ú±í?í?ó????
??????Ret = AutoRWrite()
|