Component: RFID2 (Wireless)

From Flowcode Help
Jump to navigationJump to search


Author Ben Rowland and STibor
Version 2.0 (Release)
Category Wireless


Image 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

BYTE


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

BYTE


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

BYTE


SelectTag

No additional information


Parameters

BYTE Ser0
BYTE Ser1
BYTE Ser2
BYTE Ser3
BYTE Ser4


Return value

BYTE


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

BYTE


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

BYTE


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

BYTE


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