Component: RFID2 (Wireless)
Author | Ben Rowland and STibor |
Version | 2.0 (Release) |
Category | Wireless |
Contents
RFID2 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.
Examples
No additional examples
Downloadable macro reference
WriteBlock
Writes the contents of the 16-byte data buffer to the RFID block.
The data comes from the DataBuffer which can be set using the
WriteDataBuffer macro.
Returns 0 for a succesful write.
Parameters
- BYTE BlockAddress
Return value
ReadDataBuffer
Reads a byte from the receive data buffer.
ID locations are 0-4
Data locations are 0-15
Parameters
- BYTE Index
- Locations 0-15
Return value
AntennaOff
Switches off the RFID antenna
Parameters
- This macro has no parameters
Return value
- This call does not return a value
ReadBlock
Reads the contents of the 16-byte data buffer block on the RFID.
The receive data is stored in the data buffer and read back using the ReadDataBuffer macro.
Returns 0 for a succesful read.
Parameters
- BYTE BlockAddress
Return value
SelectTag
No additional information
Parameters
- BYTE Ser0
- BYTE Ser1
- BYTE Ser2
- BYTE Ser3
- BYTE Ser4
Return value
WriteDataBuffer
Writes a value to the 16-byte data buffer
ID locations are 0-4
Data locations are 0-15
Parameters
- BYTE Index
- 0-15
- BYTE Data
Return value
- This call does not return a value
Auth
No additional information
Parameters
- BYTE AuthMode
- BYTE BlockAddress
- BYTE Key0
- BYTE Key1
- BYTE Key2
- BYTE Key3
- BYTE Key4
- BYTE Key5
- BYTE Ser0
- BYTE Ser1
- BYTE Ser2
- BYTE Ser3
Return value
AntennaOn
Switches on the RFID antenna
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Compare
Compares the read address from the Check macro with a fixed 5 bytes address.
Returns 0 if the addresses match.
Parameters
- BYTE Add0
- BYTE Add1
- BYTE Add2
- BYTE Add3
- BYTE Add4
Return value
Initialise
Initialises the RFID module ready for interaction with RFID tags.
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Check
No additional information
Parameters
- This macro has no parameters
Return value
Simulation macro reference
This component does not contain any simulation macros
Property reference
Channel
This property is of type Fixed list of ints and can be referenced with the variable name CHANNEL.
No additional information
MISO / SDI
This property is of type Single digital pin and can be referenced with the variable name MISO.
SPI Data In Pin
MOSI / SDO
This property is of type Single digital pin and can be referenced with the variable name MOSI.
SPI Data Out Pin
SCK
This property is of type Single digital pin and can be referenced with the variable name CLK.
SPI Serial Clock Pin
SS
This property is of type Single digital pin and can be referenced with the variable name CS.
SPI Chip Select Pin
Reset
This property is of type Single digital pin and can be referenced with the variable name reset.
MFRC522 Reset Pin