NFC click
1
NFC click
NFC click
NFC click
IC/Module
PN7120 datasheet
[1]
Interface
I2C
Power supply
3.3V
Product page
www.mikroe.com/click/NFC
Schematic
NFC click schematic
[2]
[3]
NFC click is a an add-on board with a versatile near field communications controller from NXP — the PN7120 IC.
NFC devices are used in contactless payment systems, electronic ticketing, smartcards, but also in retail and
advertising — inexpensive NFC tags can be embedded into packaging labels, flyers or posters.
This board has full compliancy with NFC Forum specifications which means that you will be able to use the full
potential of NFC and its three distinct operating modes.
Features and usage notes
NFC is designed to be intuitive for users. Communication between two devices is established in the simplest way
possible — by bringing them close to each other. The standards are dictated by the NFC Forum. NFC frontends, like
the one on this click, can operate in three distinct modes:
1. Card emulation mode — where NFC click behaves like a smartcard or a tag
In this mode, NFC click emulates an NFC tag. It doesn’t initiate the communication, it only responds to an NFC
reader. A typical application of the card emulation mode is how people use NFC in their smartphones to replace
several cards, badges and tags at once (using the same phone for tollgate checkins, contactless payments and so on).
Card emulation mode, however, is not useful just for smartphones, but for any type of portable device.
2. Read/Write — where NFC click behaves as an NFC Reader
Here, NFC click communicates with a passive tag, smartcard, or an NFC device operating in card emulation mode. It
can both read or write to a tag (although reading is a more common use-case because tags will often be write
protected). In this mode, it is NFC click that generates the RF field, while a tag or card only modulates it.
NFC click
3. Peer-to-peer — for more complex interactions
Peer-to-peer mode establishes a two-way communication channel between a pair of NFC-enabled devices. More
complex interactions are possible in this mode, such as simplifying bluetooth pairing. When a user brings two
devices close to each other, the two NFC chips establish a P2P connection and exchange data that facilitates the
Bluetooth pairing, seamlessly — the user doesn’t have to type passwords or set configurations.
The following diagram shows the protocols that correspond to each operating mode:
RF protocols supported:
• NFCIP-1, NFCIP-2 protocol
• ISO/IEC 14443A, ISO/IEC 14443B PICC mode via host interface
• ISO/IEC 14443A, ISO/IEC 14443B PCD designed according to NFC Forum digital protocol T4T platform and
ISO-DEP
• FeliCa PCD mode
• MIFARE PCD encryption mechanism (MIFARE 1K/4K)
• NFC Forum tag 1 to 4 (MIFARE Ultralight, Jewel, Open FeliCa tag, DESFire)
• ISO/IEC 15693/ICODE VCD mode
Supported host interfaces:
• NCI protocol interface according to NFC Forum standardization
• I2C-bus High-speed mode
Additional notes
Note that NFC is a subset of RFID working on 13.54 MHz. Therefore, an NFC IC can read/write ISO14443 RFID
tags, and vice verca — compatible RFID readers (such as RFID click can read NFC tags or NFC devices functioning
in card emulation mode.
The board has one SMD Jumper (ADDR SEL.) which is used to determine the I2C address. By default is on 0.
2
NFC click
3
Pinout diagram
This table shows how the pinout on NFC click corresponds to the pinout on the mikroBUS™ socket (the latter
shown in the two middle columns).
Notes
Pin
Pin
Notes
mikroBUStm
NC
Reset of the PN7120 RST
1 AN
X PWM 16 NC
2 RST
INT
15 INT
NC
3 CS
RX
14 NC
NC
4 SCK
TX
13 NC
NC
5 MISO
SCL
12 SCL
NC
6 MOSI
SDA
11 SDA I2C-bus serial data
+3.3V power input
+3.3V 7 +3.3V
+5V
10 NC
Ground
GND
GND 9
8 GND
Interrupt request output
I2C-bus serial clock input
This click supports 3.3V only
GND Ground
Programming
The Libstock example shows the Read/Write and Card Emulation modes of NFC click. A tag or phone is detected
when it approaches the field of NFC click (2-3cm). The example is available for both clicker 2 and Hexiwear.
const char NDEF_RECORD[] = { 0xD1,
// MB / ME / CF / 1 /
IL / TNF
0x01,
// TYPE LENGTH
51,
// PAYLOAD LENTGH
'T',
// TYPE
0x02,
// Status
'e', 'n',
// Language
13, 10, 13, 10, 32, 32, 32, 32, 32,
'M', 'i', 'k', 'r', 'o', 'E', 'l', 'e',
'k', 't', 'r', 'o', 'n', 'i', 'k', 'a',
13, 10, 13, 10, 32, 32, 32, 32, 32, 32,
32, 32, 32, 32,
'N', 'F', 'C', ' ', 'c', 'l', 'i', 'c',
'k'
};
Code examples for NFC click, written for MikroElektronika hardware and compilers are available on Libstock [4].
NFC click
Resources
•
•
•
•
PN7120 data sheet [1]
Demo code / Library [4]
RFID tutorial (relevant to NFC as well) [5]
mikroBUS™ standard specifications [6]
References
[1]
[2]
[3]
[4]
[5]
[6]
http:/ / www. nxp. com/ documents/ data_sheet/ PN7120. pdf
http:/ / www. mikroe. com/ click/ nfc/
http:/ / cdn-docs. mikroe. com/ images/ f/ ff/ Nfc-click-schematic_v101. pdf
http:/ / libstock. mikroe. com/ projects/ view/ 1943/ nfc-click
http:/ / learn. mikroe. com/ what-is-rfid/
http:/ / www. mikroe. com/ mikrobus/
4
Article Sources and Contributors
Article Sources and Contributors
NFC click Source: http://docs.mikroe.com/index.php?oldid=1894 Contributors: Andrea.galizia, Srdjan.misic
Image Sources, Licenses and Contributors
File:Nfc-click-front-shop-crop.jpg Source: http://docs.mikroe.com/index.php?title=File:Nfc-click-front-shop-crop.jpg License: unknown Contributors: Vojislav.gvozdic
File:PN7120 modes.png Source: http://docs.mikroe.com/index.php?title=File:PN7120_modes.png License: unknown Contributors: Srdjan.misic
File:mikrobus logo.png Source: http://docs.mikroe.com/index.php?title=File:Mikrobus_logo.png License: unknown Contributors: Vojislav.gvozdic
License
Creative Commons Attribution
https:/ / creativecommons. org/ licenses/ by/ 4. 0/
5