久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 2673|回復: 0
打印 上一主題 下一主題
收起左側(cè)

RC522飛利浦原廠代碼下載

[復制鏈接]
跳轉(zhuǎn)到指定樓層
樓主
ID:219602 發(fā)表于 2017-7-14 10:36 | 只看該作者 |只看大圖 回帖獎勵 |倒序瀏覽 |閱讀模式
RC522飛利浦原廠代碼 提供給有需要的朋友下載



單片機源程序如下:
  1. #include <string.h>
  2. #include <stdio.h>
  3. #include <absacc.h>
  4. #include <intrins.h>

  5. #include "RegCtrl.h"
  6. #include "reg52.h"
  7. #include "main.h"
  8. #include "Mifare.h"
  9. #include "Rc522Reg.h"
  10. #include "OpCtrl.h"

  11. /*Initialize the processor and RC522*/
  12. void SysInit(void)
  13. {
  14.         T2CON = 0x04;
  15.     PCON = 0x80;
  16.     SCON = 0x70;
  17.     TMOD = 0x22;
  18.         TH1   = BAUD_9600;  //set serial port baudrate to 9600bps
  19.         TL1   = TH1;
  20.         TR1   = 1;
  21.         EA=0;           //disable all interrupt
  22.         Rc522Init();
  23. }

  24. //Just for test
  25. void main(void)
  26. {
  27.     short status;
  28.     unsigned char idata tmp[16],i,key[6];
  29.     SysInit();
  30.     memset(key,0xff,6);

  31.     /* Request */
  32.     status = Request(ISO14443_3_REQALL, tmp);
  33.     if(status)
  34.       goto end;

  35.     /*anticollision and select the card*/
  36.     status = AnticollSelect(0, tmp);
  37.     if(status)
  38.       goto end;

  39.     /*authenticaiton the key A of sector 1 (block 4~block 7)*/
  40.     status = Authentication(MIFARE_AUTHENT_A,key, tmp, 6);
  41.     if(status)
  42.       goto end;

  43.     /*if passed authenticaiton you can read the data in this sector*/
  44.     status = Read(6, tmp);
  45.     if(status)
  46.       goto end;
  47.     memset(tmp,0x33,16);

  48.     /*write function test*/
  49.     status = Write(6, tmp);
  50.     if(status)
  51.       goto end;
  52.     memset(tmp,0,16);

  53.     /*to check if the data has been writen successfully*/
  54.     status = Read(6, tmp);
  55.     if(status)
  56.       goto end;

  57.     /*Initialize a block value, then you can do increment and decrement operation*/
  58.     memset(tmp,0xff,4);
  59.     status = InitBlock(6,tmp);
  60.     if(status)
  61.       goto end;

  62.     /*to check if the data has been initialized successfully*/
  63.     status = Read(6, tmp);
  64.     if(status)
  65.       goto end;

  66.     /*decrement operation test*/
  67.     tmp[0]=2;
  68.     tmp[1]=0;
  69.     tmp[2]=0;
  70.     tmp[3]=0;
  71.     status = ValueOper(MIFARE_DECREMENT, 6, tmp, 6);
  72.     if(status)
  73.       goto end;

  74.     /*check if the decrement operation is ok*/
  75.     status = Read(6, tmp);
  76.     if(status)
  77.       goto end;

  78.     /*Increment operation test*/
  79.     tmp[0]=2;
  80. ……………………

  81. …………限于本文篇幅 余下代碼請從51黑下載附件…………
復制代碼

所有資料51hei提供下載:
RC522飛利浦原廠代碼.zip (23.25 KB, 下載次數(shù): 29)




分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏1 分享淘帖 頂 踩
回復

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規(guī)則

小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術交流QQ群281945664

Powered by 單片機教程網(wǎng)

快速回復 返回頂部 返回列表
主站蜘蛛池模板: 免费一级欧美在线观看视频 | 五月激情六月婷婷 | 午夜视频在线免费观看 | 男女黄网站 | 国产精品国产三级国产aⅴ无密码 | 国产精品资源在线观看 | 免费黄色的视频 | 国产一区二区三区四区 | 午夜免费福利片 | 在线观看h视频 | 国产婷婷精品 | 很黄很污的网站 | 337p日本欧洲亚洲大胆精蜜臀 | 久久精品在线 | 亚洲国产精品99久久久久久久久 | 亚洲一区二区三区久久 | 亚洲一区二区免费视频 | 一区二区精品 | 91视频精选 | 99久久日韩精品免费热麻豆美女 | 久久久久亚洲 | 中文字幕国产 | 日本久久精 | 视频一区中文字幕 | 成人免费视频观看视频 | 国产精品美女一区二区 | 国产精品视频网 | 国产做a爱片久久毛片 | 欧美 视频| 国产精品久久久久久久久久免费看 | 成人免费xxxxx在线视频 | 国产美女一区二区 | 中文字幕欧美日韩 | 狠狠色综合久久婷婷 | 精品国产一区二区三区成人影院 | 国产精品欧美一区二区三区不卡 | 久久久99精品免费观看 | 免费看欧美一级片 | 精品久久香蕉国产线看观看亚洲 | 久草在线免费资源 | 9191在线播放 |