szpapas 发表于 2013-7-2 01:13:23

不错,我也去搞一套来试试。

enzotim 发表于 2013-7-3 20:26:52

楼主。。。引脚怎么接你没说清楚。,

qq286983897 发表于 2013-7-9 10:49:38

:)不错,试了能调通

shiow1984 发表于 2013-8-30 14:11:35

qq286983897 发表于 2013-7-9 10:49 static/image/common/back.gif
不错,试了能调通

管脚是怎么接的啊,就接4个引脚可以了吗?

若神 发表于 2013-9-7 11:42:17

楼主,第二个代码只能读取卡号啊?:'(是不是只要刷一下就行了?还是有别的操作?

bg1lsy 发表于 2013-9-7 17:20:40

有读有扇区的函数啊

万马奔腾 发表于 2013-9-10 00:19:08

//D10--读卡器MOSI引脚、 这个应该是片选引脚吧

秋刀鱼z 发表于 2013-11-10 15:41:44

怎么调不通啊,楼主把管脚说一下拜

bg1lsy 发表于 2013-11-10 19:40:35

秋刀鱼z 发表于 2013-11-10 15:41 static/image/common/back.gif
怎么调不通啊,楼主把管脚说一下拜

RFID -> Arduino UNO
-------------------
GND -> GND
VIN -> 5V
SS -> D10
SCK -> D13
MISI -> D11
MISO -> D12
3V# ->
RST -> D5

秋刀鱼z 发表于 2013-11-16 22:53:27

按照楼主接法调试成功,太感谢了!!:lol

【__す__】 发表于 2014-3-13 10:56:35

一个板子 可以连接 多个 RC 522么   通过什么进行选择是那个 RC522 啊

melodynn03 发表于 2014-3-18 21:36:57

好贴,学习了,应该赞一下~

Damn_intuition 发表于 2014-3-19 11:11:43

纠结与不知道怎么读取CPU卡。。

melodynn03 发表于 2014-3-19 16:32:30

楼主我有点不太明白程序...

blockAddr = 7;                //数据块7
if (rfid.auth(PICC_AUTHENT1A, blockAddr, sectorKeyA, rfid.serNum) == MI_OK)//认证
{
    //写数据
    status = rfid.write(blockAddr, sectorNewKeyA);
    Serial.print("set the new card password, and can modify the data of the Sector: ");
    Serial.println(blockAddr/4,DEC);
    //写数据
    blockAddr = blockAddr - 3 ; //数据块4
    status = rfid.write(blockAddr, writeDate);
    if(status == MI_OK)
    {
      Serial.println("Write card OK!");
    }
}
选择数据块7,然后在函数里是blockAddr/4,为什么写密码数据块地址要除于4啊?
还有就是写入数据的地址为什么是blockAddr - 3 //写在数据块4?

想问的就是,这个卡,到底有多少个数据块呀?可以分多少个部分存数据和对应的密码呢?不是很了解这些

问的有些傻,希望楼主能给我好好说说,小白感激不尽!!!!

kc87654321 发表于 2014-4-15 10:40:11

楼主
blockAddr = 7;                //数据块7
if (rfid.auth(PICC_AUTHENT1A, blockAddr, sectorKeyA, rfid.serNum) == MI_OK)//认证
{
    //写数据
    status = rfid.write(blockAddr, sectorNewKeyA);
    Serial.print("set the new card password, and can modify the data of the Sector: ");
    Serial.println(blockAddr/4,DEC);
    //写数据
    blockAddr = blockAddr - 3 ; //数据块4
    status = rfid.write(blockAddr, writeDate);
    if(status == MI_OK)
    {
      Serial.println("Write card OK!");
    }
}
这里也不明白status = rfid.write(blockAddr, sectorNewKeyA);是写到    控制块        7吗,然后我改了unsigned char sectorNewKeyAAA = 的{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xff,0x07,0x80,0x69, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},为{0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xff,0x07,0x80,0x69, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}就不能读出来了,就是密码改了一下就不行了,这么改密码呢?
页: 1 [2] 3 4 5 6
查看完整版本: 分享一个整理并测试好用的MFRC522 RFID库