Difference between revisions of "Component: RFID (MFRC522) (Wireless)"
Line 16: | Line 16: | ||
==Component Source Code== | ==Component Source Code== | ||
+ | |||
+ | Please click here to download the component source project: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_MFRC522.fcfx FC_Comp_Source_MFRC522.fcfx] | ||
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_MFRC522.fcfx FC_Comp_Source_MFRC522.fcfx] | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_MFRC522.fcfx FC_Comp_Source_MFRC522.fcfx] | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
Line 40: | Line 44: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
Line 68: | Line 74: | ||
==Macro reference== | ==Macro reference== | ||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CompareUID''' | ||
+ | |- | ||
+ | | colspan="2" | Compares the UID from the ReadCardSerial macro with 4 byte UID. Returns 0 if the addresses match. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Add0 | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Add1 | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Add2 | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Add3 | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IsNewCardPresent''' | ||
+ | |- | ||
+ | | colspan="2" | Is there a card present for us to communicate with. Returns 0 for no card and 1 for valid card present. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetType''' | ||
+ | |- | ||
+ | | colspan="2" | Translates the SAK (Select Acknowledge) to a PICC type | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | sak | ||
+ | |- | ||
+ | | colspan="2" | The SAK byte returned from PICC_Select | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AntennaOff''' | ||
+ | |- | ||
+ | | colspan="2" | Switches off the RFID antenna to save power. The antenna must be switched on again before communicating with an RFID tag. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadCardSerial''' | ||
+ | |- | ||
+ | | colspan="2" | Simple wrapper around PICC_Select. Returns true if a UID could be read. Remember to call PICC_IsNewCardPresent(), PICC_RequestA() or PICC_WakeupA() first. The read UID is available in the class variable uid. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MifareWrite''' | ||
+ | |- | ||
+ | | colspan="2" | Writes to a block of data on a MIFARE type tag | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | BlockAddress | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Buffer | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | BufferSize | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Select''' | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | ValidBits | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''StopCrypto''' | ||
+ | |- | ||
+ | | colspan="2" | Used to exit the PCD from its authenticated state. Remember to call this function after communicating with an authenticated PICC - otherwise no new communications can start. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MifareRead''' | ||
+ | |- | ||
+ | | colspan="2" | Reads from a block of data on a MIFARE type tag | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | BlockAddress | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Buffer | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | BufferSize | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Authenticate''' | ||
+ | |- | ||
+ | | colspan="2" | This command manages MIFARE authentication to enable a secure communication to any MIFARE Mini, MIFARE 1K and MIFARE 4K card. All keys are set to FFFFFFFFFFFFh at chip delivery. The authentication is described in the MFRC522 datasheet section 10.3.1.9. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Command | ||
+ | |- | ||
+ | | colspan="2" | PICC_CMD_MF_AUTH_KEY_A or PICC_CMD_MF_AUTH_KEY_B | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | BlockAddress | ||
+ | |- | ||
+ | | colspan="2" | The block number | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Key | ||
+ | |- | ||
+ | | colspan="2" | Crypteo key to use | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''HaltA''' | ||
+ | |- | ||
+ | | colspan="2" | Instructs a PICC in state ACTIVE(*) to go to state HALT | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadUIDByte''' | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Index | ||
+ | |- | ||
+ | | colspan="2" | 0-9 = UID Data Bytes, 10 = UID Length, 11 = UID SAK | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AntennaOn''' | ||
+ | |- | ||
+ | | colspan="2" | Switches on the RFID antenna. Called as part of the Initialise macro. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' | ||
+ | |- | ||
+ | | colspan="2" | Initialises the RFID module ready for interaction with RFID tags. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==Property reference== | ||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Channel | ||
+ | |- | ||
+ | | colspan="2" | SPI Channel selector | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Prescale | ||
+ | |- | ||
+ | | colspan="2" | Prescale option selector | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | MOSI | ||
+ | |- | ||
+ | | colspan="2" | SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | MISO | ||
+ | |- | ||
+ | | colspan="2" | SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | CLK | ||
+ | |- | ||
+ | | colspan="2" | SPI Clock Pin CLK - The Clock signal is driven by the SPI master. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | CS / SS | ||
+ | |- | ||
+ | | colspan="2" | Chip Select / Slave Select Pin Master Mode: General purpose output pin used to select the remote SPI device. Slave Mode: Hardware chip select pin input used to select the SPI device. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | Reset | ||
+ | |- | ||
+ | | colspan="2" | MFRC522 Reset Pin | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]] | ||
+ | | width="90%" | Label | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | ||
+ | | width="90%" | Scope Traces | ||
+ | |- | ||
+ | | colspan="2" | Selects if the scope traces are automatically generated or not | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | ||
+ | | width="90%" | Console Data | ||
+ | |- | ||
+ | | colspan="2" | Selects if the console data is automatically generated or not | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | API | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |}==Macro reference== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
Revision as of 15:23, 20 January 2023
Author | Ben Rowland and STibor |
Version | 3.0 |
Category | Wireless |
Contents
RFID (MFRC522) component
Functions designed to work with the MFRC522 contactless reader IC. The MFRC522 supports all variants of the MIFARE Mini, MIFARE 1K, MIFARE 4K, MIFARE Ultralight, MIFARE DESFire EV1 and MIFARE Plus RF identification protocols.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_MFRC522.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_MFRC522.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Here is a basic example program that reads the UID from a Mifare RFID tag and displays on an LCD. If the UID matches the UID stored in memory then a solenoid will fire allowing a door to be unlocked etc.
Here is a basic example program to read and modify data stored on a Mifare RFID tag.
Macro reference
![]() |
CompareUID |
Compares the UID from the ReadCardSerial macro with 4 byte UID. Returns 0 if the addresses match. | |
![]() |
Add0 |
![]() |
Add1 |
![]() |
Add2 |
![]() |
Add3 |
![]() |
Return |
![]() |
IsNewCardPresent |
Is there a card present for us to communicate with. Returns 0 for no card and 1 for valid card present. | |
![]() |
Return |
![]() |
GetType |
Translates the SAK (Select Acknowledge) to a PICC type | |
![]() |
sak |
The SAK byte returned from PICC_Select | |
![]() |
Return |
![]() |
AntennaOff |
Switches off the RFID antenna to save power. The antenna must be switched on again before communicating with an RFID tag. | |
![]() |
Return |
![]() |
MifareWrite |
Writes to a block of data on a MIFARE type tag | |
![]() |
BlockAddress |
![]() |
Buffer |
![]() |
BufferSize |
![]() |
Return |
![]() |
Select |
![]() |
ValidBits |
![]() |
Return |
![]() |
StopCrypto |
Used to exit the PCD from its authenticated state. Remember to call this function after communicating with an authenticated PICC - otherwise no new communications can start. | |
![]() |
Return |
![]() |
MifareRead |
Reads from a block of data on a MIFARE type tag | |
![]() |
BlockAddress |
![]() |
Buffer |
![]() |
BufferSize |
![]() |
Return |
![]() |
HaltA |
Instructs a PICC in state ACTIVE(*) to go to state HALT | |
![]() |
Return |
![]() |
ReadUIDByte |
![]() |
Index |
0-9 = UID Data Bytes, 10 = UID Length, 11 = UID SAK | |
![]() |
Return |
![]() |
AntennaOn |
Switches on the RFID antenna. Called as part of the Initialise macro. | |
![]() |
Return |
![]() |
Initialise |
Initialises the RFID module ready for interaction with RFID tags. | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
CompareUID |
Compares the UID from the ReadCardSerial macro with 4 byte UID. Returns 0 if the addresses match. | |
![]() |
Add0 |
![]() |
Add1 |
![]() |
Add2 |
![]() |
Add3 |
![]() |
Return |
![]() |
IsNewCardPresent |
Is there a card present for us to communicate with. Returns 0 for no card and 1 for valid card present. | |
![]() |
Return |
![]() |
GetType |
Translates the SAK (Select Acknowledge) to a PICC type | |
![]() |
sak |
The SAK byte returned from PICC_Select | |
![]() |
Return |
![]() |
AntennaOff |
Switches off the RFID antenna to save power. The antenna must be switched on again before communicating with an RFID tag. | |
![]() |
Return |
![]() |
MifareWrite |
Writes to a block of data on a MIFARE type tag | |
![]() |
BlockAddress |
![]() |
Buffer |
![]() |
BufferSize |
![]() |
Return |
![]() |
Select |
![]() |
ValidBits |
![]() |
Return |
![]() |
StopCrypto |
Used to exit the PCD from its authenticated state. Remember to call this function after communicating with an authenticated PICC - otherwise no new communications can start. | |
![]() |
Return |
![]() |
MifareRead |
Reads from a block of data on a MIFARE type tag | |
![]() |
BlockAddress |
![]() |
Buffer |
![]() |
BufferSize |
![]() |
Return |
![]() |
HaltA |
Instructs a PICC in state ACTIVE(*) to go to state HALT | |
![]() |
Return |
![]() |
ReadUIDByte |
![]() |
Index |
0-9 = UID Data Bytes, 10 = UID Length, 11 = UID SAK | |
![]() |
Return |
![]() |
AntennaOn |
Switches on the RFID antenna. Called as part of the Initialise macro. | |
![]() |
Return |
![]() |
Initialise |
Initialises the RFID module ready for interaction with RFID tags. | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
CompareUID |
Compares the UID from the ReadCardSerial macro with 4 byte UID. Returns 0 if the addresses match. | |
![]() |
Add0 |
![]() |
Add1 |
![]() |
Add2 |
![]() |
Add3 |
![]() |
Return |
![]() |
IsNewCardPresent |
Is there a card present for us to communicate with. Returns 0 for no card and 1 for valid card present. | |
![]() |
Return |
![]() |
GetType |
Translates the SAK (Select Acknowledge) to a PICC type | |
![]() |
sak |
The SAK byte returned from PICC_Select | |
![]() |
Return |
![]() |
AntennaOff |
Switches off the RFID antenna to save power. The antenna must be switched on again before communicating with an RFID tag. | |
![]() |
Return |
![]() |
MifareWrite |
Writes to a block of data on a MIFARE type tag | |
![]() |
BlockAddress |
![]() |
Buffer |
![]() |
BufferSize |
![]() |
Return |
![]() |
Select |
![]() |
ValidBits |
![]() |
Return |
![]() |
StopCrypto |
Used to exit the PCD from its authenticated state. Remember to call this function after communicating with an authenticated PICC - otherwise no new communications can start. | |
![]() |
Return |
![]() |
MifareRead |
Reads from a block of data on a MIFARE type tag | |
![]() |
BlockAddress |
![]() |
Buffer |
![]() |
BufferSize |
![]() |
Return |
![]() |
HaltA |
Instructs a PICC in state ACTIVE(*) to go to state HALT | |
![]() |
Return |
![]() |
ReadUIDByte |
![]() |
Index |
0-9 = UID Data Bytes, 10 = UID Length, 11 = UID SAK | |
![]() |
Return |
![]() |
AntennaOn |
Switches on the RFID antenna. Called as part of the Initialise macro. | |
![]() |
Return |
![]() |
Initialise |
Initialises the RFID module ready for interaction with RFID tags. | |
![]() |
Return |