PN532開發板,評估板
產品介紹:
PN532是NXP最近推出的一款NFC芯片,支持讀卡器模式和卡模式(需要卡芯片Smart MX),支持TypeA、TypeB、TypeC三個標準,內部帶一個MCU51,支持命令方式,可以直接跟PC機串口連接就成為一個RFID讀卡器,簡單方便,成本低,性能好,是RFID發展的一個趨勢。
讀卡器通過串口和電腦連接,上位機可以使用libnfc,libnfc是一個開源的軟件,功能特別強大,實現了很多nfc的功能。
電路板全部採用機器焊接,外觀整齊漂亮,質量穩定可靠。
絕對不會出現虛焊和短路。市面上一些採用手工焊接的PN532(QFN封裝)電路板,由於QFN封裝的原因經常發生虛焊和短路現象。
電路板將PN532的所有引腳都引出來,方便二次開發評估,包括smartMX芯片的接口也引出來。
電路板天線經過數學公式的計算,達到最佳的匹配效果,3.3v供電,最遠的讀卡距離可以達到5CM!!!
裝箱清單:
FT232RL USB轉串口小板和PN532的連接:
詳細資訊請點入
軟件資料:
- pn532電路板使用說明書。
- 電路原理圖、芯片和卡片的datasheet。
- SCRTester軟件和libnfc(1.5.0版本)軟件。
libnfc的應用,讀取mifare卡片:
沒有放卡片的時候出來:
p2p通信:
兩個pn532之間可以進行p2p通信,該功能是nfc的一個重要應用,把兩個pn532接到電腦,並且放在一起,用libnfc軟件測試,一個做initiator,一個做target:
SCRtest讀卡器效果:
Mask讀取:
// =========================================================== //
// T A M A **** S E T O F C O M M A N D S //
// //
// For all the TAMA command refer to UM0301 document //
// =========================================================== //
//=============================================================================//
// Example use of TAMA as a Mifare Standard reader
// ============================================================================//
// Activate a target in passive mode
// =================================
PC -> IFD : INITIATOR : LIST PASSIVE TARGETS
00 00 FF 04 FC D4 4A 01 00 E1 00
IFD -> PC : ACK
00 00 FF 00 FF 00
IFD -> PC : INITIATOR : LIST PASSIVE TARGETS EXECUTED
00 00 FF 0C F4 D5 4B 01 01 00 04 08 04 9C 28 76
03 91 00
**** Place a Mifare Standard card close to the ANTENNA
// Exchange data with the Mifare Standard card
// ===========================================
// Authentication sector 1 (addresse 4 to 7)
// Replace the 4 bytes XX XX XX XX below by the Mifare ID number (NFCID1).
// This number is returned by InListPassiveTarget call (bytes 14 to 17)
//40 01 60 07 FF FF FF FF FF FF XX XX XX XX;
PC -> IFD : INITIATOR : DATA EXCHANGE
00 00 FF 0F F1 D4 40 01 60 07 FF FF FF FF FF FF
42 58 58 32 66 00
IFD -> PC : ACK
00 00 FF 00 FF 00
IFD -> PC : INITIATOR : DATA EXCHANGE EXECUTED
00 00 FF 03 FD D5 41 14 D6 00
//
// Read/Write command
//
// Read 16 bytes from block address 0x04
PC -> IFD : INITIATOR : DATA EXCHANGE
00 00 FF 05 FB D4 40 01 30 04 B7 00
IFD -> PC : ACK
00 00 FF 00 FF 00
IFD -> PC : INITIATOR : DATA EXCHANGE EXECUTED
00 00 FF 03 FD D5 41 01 E9 00
// Write 16 bytes to block address 0x04
PC -> IFD : INITIATOR : DATA EXCHANGE
00 00 FF 15 EB D4 40 01 A0 04 00 11 22 33 44 55
66 77 88 99 AA BB CC DD EE FF 4F 00
IFD -> PC : ACK
00 00 FF 00 FF 00
IFD -> PC : INITIATOR : DATA EXCHANGE EXECUTED
00 00 FF 03 FD D5 41 01 E9 00
// Read 16 bytes from block address 0x04
PC -> IFD : INITIATOR : DATA EXCHANGE
00 00 FF 05 FB D4 40 01 30 04 B7 00
IFD -> PC : ACK
00 00 FF 00 FF 00
IFD -> PC : INITIATOR : DATA EXCHANGE EXECUTED
00 00 FF 03 FD D5 41 01 E9 00
// Write 16 bytes to block address 0x04
PC -> IFD : INITIATOR : DATA EXCHANGE
00 00 FF 15 EB D4 40 01 A0 04 FF EE DD CC BB AA
99 88 77 66 55 44 33 22 11 00 4F 00
IFD -> PC : ACK
00 00 FF 00 FF 00
IFD -> PC : INITIATOR : DATA EXCHANGE EXECUTED
00 00 FF 03 FD D5 41 01 E9 00
// Read 16 bytes from block address 0x04
PC -> IFD : INITIATOR : DATA EXCHANGE
00 00 FF 05 FB D4 40 01 30 04 B7 00
IFD -> PC : ACK
00 00 FF 00 FF 00
IFD -> PC : INITIATOR : DATA EXCHANGE EXECUTED
00 00 FF 03 FD D5 41 01 E9 00
//
// Increment/Decrement/Transsfert command
//
// Write 16 bytes to block address 0x05 in order to format
// the block before the Incr/Decr operation
// * Value(lsb first)* 1's compl * Value *Adr!AdrAdr!Adr
PC -> IFD : INITIATOR : DATA EXCHANGE
00 00 FF 15 EB D4 40 01 A0 05 01 00 00 00 FE FF
FF FF 01 00 00 00 05 FA 05 FA 4B 00
IFD -> PC : ACK
00 00 FF 00 FF 00
IFD -> PC : INITIATOR : DATA EXCHANGE EXECUTED
00 00 FF 03 FD D5 41 01 E9 00
// Read 16 bytes from block address 0x05
PC -> IFD : INITIATOR : DATA EXCHANGE
00 00 FF 05 FB D4 40 01 30 05 B6 00
IFD -> PC : ACK
00 00 FF 00 FF 00
IFD -> PC : INITIATOR : DATA EXCHANGE EXECUTED
00 00 FF 03 FD D5 41 01 E9 00
// Write 16 bytes to block address 0x06 in order to format
// the block before the Incr/Decr operation
PC -> IFD : INITIATOR : DATA EXCHANGE
00 00 FF 15 EB D4 40 01 A0 06 04 00 00 00 FB FF
FF FF 04 00 00 00 06 F9 06 F9 47 00
IFD -> PC : ACK
00 00 FF 00 FF 00
IFD -> PC : INITIATOR : DATA EXCHANGE EXECUTED
00 00 FF 03 FD D5 41 01 E9 00
// Read 16 bytes from block address 0x06
PC -> IFD : INITIATOR : DATA EXCHANGE
00 00 FF 05 FB D4 40 01 30 06 B5 00
IFD -> PC : ACK
00 00 FF 00 FF 00
IFD -> PC : INITIATOR : DATA EXCHANGE EXECUTED
00 00 FF 03 FD D5 41 01 E9 00
// Increment (plus 1 lsb first)
PC -> IFD : INITIATOR : DATA EXCHANGE
00 00 FF 09 F7 D4 40 01 C1 05 01 00 00 00 24 00
IFD -> PC : ACK
00 00 FF 00 FF 00
IFD -> PC : INITIATOR : DATA EXCHANGE EXECUTED
00 00 FF 03 FD D5 41 01 E9 00
// Read 16 bytes from block address 0x05 (No change until transfert command)
PC -> IFD : INITIATOR : DATA EXCHANGE
00 00 FF 05 FB D4 40 01 30 05 B6 00
IFD -> PC : ACK
00 00 FF 00 FF 00
IFD -> PC : INITIATOR : DATA EXCHANGE EXECUTED
00 00 FF 03 FD D5 41 01 E9 00
// Transfert (need to be done to store the decrement value)
PC -> IFD : INITIATOR : DATA EXCHANGE
00 00 FF 05 FB D4 40 01 B0 05 36 00
IFD -> PC : ACK
00 00 FF 00 FF 00
IFD -> PC : INITIATOR : DATA EXCHANGE EXECUTED
00 00 FF 03 FD D5 41 01 E9 00
// Read 16 bytes from block address 0x05
PC -> IFD : INITIATOR : DATA EXCHANGE
00 00 FF 05 FB D4 40 01 30 05 B6 00
IFD -> PC : ACK
00 00 FF 00 FF 00
IFD -> PC : INITIATOR : DATA EXCHANGE EXECUTED
00 00 FF 03 FD D5 41 01 E9 00
// Decrement (minus 2)
PC -> IFD : INITIATOR : DATA EXCHANGE
00 00 FF 09 F7 D4 40 01 C0 06 02 00 00 00 23 00
IFD -> PC : ACK
00 00 FF 00 FF 00
IFD -> PC : INITIATOR : DATA EXCHANGE EXECUTED
00 00 FF 03 FD D5 41 01 E9 00
// Read 16 bytes from block address 0x06 (No change until transfert command)
PC -> IFD : INITIATOR : DATA EXCHANGE
00 00 FF 05 FB D4 40 01 30 06 B5 00
IFD -> PC : ACK
00 00 FF 00 FF 00
IFD -> PC : INITIATOR : DATA EXCHANGE EXECUTED
00 00 FF 03 FD D5 41 01 E9 00
// Transfert (need to be done to store the decrement value)
PC -> IFD : INITIATOR : DATA EXCHANGE
00 00 FF 05 FB D4 40 01 B0 06 35 00
IFD -> PC : ACK
00 00 FF 00 FF 00
IFD -> PC : INITIATOR : DATA EXCHANGE EXECUTED
00 00 FF 03 FD D5 41 01 E9 00
// Read 16 bytes from block address 0x06
PC -> IFD : INITIATOR : DATA EXCHANGE
00 00 FF 05 FB D4 40 01 30 06 B5 00
IFD -> PC : ACK
00 00 FF 00 FF 00
IFD -> PC : INITIATOR : DATA EXCHANGE EXECUTED
00 00 FF 03 FD D5 41 01 E9 00
// Switch off the RF field
// =======================
// RFConfiguration
PC -> IFD : RF CONFIGURATION
00 00 FF 04 FC D4 32 01 00 F9 00
IFD -> PC : ACK
00 00 FF 00 FF 00
IFD -> PC : RF CONFIGURATION EXECUTED
00 00 FF 02 FE D5 33 F8 00