Component: RFID (EB052, RWD-MICODE) (Wireless)

From Flowcode Help
Jump to navigationJump to search
Author Matrix Ltd.
Version 2.0
Category Wireless


RFID (EB052, RWD-MICODE) component

Low level routines for controlling a RF Solutions RFID interface Allows communications between Mifare, ICode and HiTag type RFID tags. Also available in the form of the EB052 RFID E-block.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_RFID.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_RFID.fcfx

Detailed description

No detailed description exists yet for this component

Examples

Reading the status

The status of the RFID module is read using the "GetRFIDStatus" macro which returns a byte which is then displayed using the PORTB pins. FC6 Icon.png RFID Status Status byte breakdown for Mifare.

RFID MF.jpg


Status byte breakdown for ICode.

RFID IC.jpg


Status byte breakdown for HiTag.

RFID HI.jpg


Status byte breakdown for EM Marin.

RFID EM.jpg


Reading and Writing Data

Example which talks to a ICode type card and allows the data to be read and written via a keypad. FC6 Icon.png RFID Read/Write

Macro compatibility

Not all the macros can be used with all card types, here is a list of RFID transponder types and the macros that are compatible.

RFID macr.jpg






Macro reference

DecrementRFIDValue

Fc9-comp-macro.png DecrementRFIDValue
Perfoms a 32-bit decrement on the number held in location page or block. 
Fc9-u8-icon.png - BYTE Src
Page / Block 
Fc9-u8-icon.png - BYTE Dst
Page / Block 
Fc9-u8-icon.png - BYTE Key_Type
Needed for MIFARE Commands 
Fc9-u8-icon.png - BYTE Return


FormatRFIDValue

Fc9-comp-macro.png FormatRFIDValue
Initialises the internal buffer of the Microcontroller so that it is ready to perform a Increment, Decrement or Transfer command. 
Fc9-void-icon.png - VOID Return


GetRFIDStatus

Fc9-comp-macro.png GetRFIDStatus
Collect the status of the RFID device (see help for the explaination of the status byte). 
Fc9-u16-icon.png - UINT Return


GetRFIDTypeID

Fc9-comp-macro.png GetRFIDTypeID
Collects the 3 bytes required to determine which kind of MIFARE device is present. Stores the result into the local buffer 0 - 2 and returns the response of the module. 
Fc9-u8-icon.png - BYTE Return


GetRFIDUID

Fc9-comp-macro.png GetRFIDUID
Collects the UID from a RFID device. Stores the result into the UID buffer and returns the response of the module. 
Fc9-u8-icon.png - BYTE Return


IncrementRFIDValue

Fc9-comp-macro.png IncrementRFIDValue
Perfoms a 32-bit increment on the number held in location page or block. 
Fc9-u8-icon.png - BYTE Src
Page / Block 
Fc9-u8-icon.png - BYTE Dst
Page / Block 
Fc9-u8-icon.png - BYTE Key_Type
Needed for MIFARE Commands 
Fc9-u8-icon.png - BYTE Return


Initialise

Fc9-comp-macro.png Initialise
Configures the RFID device by presetting the Osc type and Mode via the Flowcode component properties. 
Fc9-u8-icon.png - BYTE Return


ReadRFIDBlock

Fc9-comp-macro.png ReadRFIDBlock
Reads a block of information from the RFID device. 
Fc9-u8-icon.png - BYTE Address
 
Fc9-u8-icon.png - BYTE Key_Type
 
Fc9-u8-icon.png - BYTE Return


ReadRFIDBuffer

Fc9-comp-macro.png ReadRFIDBuffer
Reads a byte of data from the incoming buffer. 
Fc9-u8-icon.png - BYTE Address
The address of the buffer 0 - 15 
Fc9-u8-icon.png - BYTE Return


ReadRFIDUID

Fc9-comp-macro.png ReadRFIDUID
Reads a byte of data from the UID buffer. 
Fc9-u8-icon.png - BYTE Address
The address of the buffer 0 - 7 
Fc9-u8-icon.png - BYTE Return


StoreRFIDKey

Fc9-comp-macro.png StoreRFIDKey
Stores a 6 byte key for use with MIFARE type devices that require authorisation. 
Fc9-u8-icon.png - BYTE Key
Key Location 0 - 31 
Fc9-u8-icon.png - BYTE D0
Least significant byte of key 
Fc9-u8-icon.png - BYTE D1
 
Fc9-u8-icon.png - BYTE D2
 
Fc9-u8-icon.png - BYTE D3
 
Fc9-u8-icon.png - BYTE D4
 
Fc9-u8-icon.png - BYTE D5
Most significant byte of key 
Fc9-u8-icon.png - BYTE Return


TransferRFIDValue

Fc9-comp-macro.png TransferRFIDValue
Perfoms a 32-bit block data transfer on the number held in location page or block. 
Fc9-u8-icon.png - BYTE Src
Page / Block 
Fc9-u8-icon.png - BYTE Dst
Page / Block 
Fc9-u8-icon.png - BYTE Key_Type
Needed for MIFARE Commands 
Fc9-u8-icon.png - BYTE Return


WriteRFIDBlock

Fc9-comp-macro.png WriteRFIDBlock
Writes a block of information to the RFID device. 
Fc9-u8-icon.png - BYTE Address
Remote RFID Block Address. 
Fc9-u8-icon.png - BYTE Key_Type
 
Fc9-u8-icon.png - BYTE Return


WriteRFIDBuffer

Fc9-comp-macro.png WriteRFIDBuffer
Writes a byte of data to the outgoing buffer. 
Fc9-u8-icon.png - BYTE Address
The address of the buffer 0 - 15 
Fc9-u8-icon.png - BYTE Data
The data to be stored in the buffer location 0 - 255. 
Fc9-void-icon.png - VOID Return


WriteRFIDModule

Fc9-comp-macro.png WriteRFIDModule
Stores a byte of data to the internal EEPROM of the RFID module at the address specified. 
Fc9-u8-icon.png - BYTE Address
 
Fc9-u8-icon.png - BYTE Data
 
Fc9-u8-icon.png - BYTE Return


Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png Card_Type
 
Fc9-conn-icon.png Connections
Fc9-type-16-icon.png Channel
UART Channel selector Software channels are bit banged using generic I/O pins but are not as reliable as hardware channels. Hardware channels use the selected peripheral on-board the target microcontroller. 
Fc9-type-16-icon.png Baud Options
Baud rate option selector 
Fc9-type-14-icon.png Baud Rate
 
Fc9-type-5-icon.png TX
Pin to be used for Transmit data 
Fc9-type-5-icon.png RX
Pin to be used for Receive data 
Fc9-type-5-icon.png CTS
 
Fc9-conn-icon.png Simulation
Fc9-type-10-icon.png Label
 
Fc9-type-7-icon.png Scope Traces
Selects if the scope traces are automatically added to the data recorder window or not. Simulation - draws an approximation of the UART data onto the scope trace. ICT - sets up the scope trace for incoming data and adds UART packet decoding at the correct BAUD. 
Fc9-type-7-icon.png Console Data
Selects if the console data is automatically generated or not 
Fc9-type-21-icon.png Console Columns
Number of characters that can be displayed on a single line of the console. 
Fc9-type-16-icon.png Data Source
Simulation data source used to allow the component to connect to various remote devices Nothing - Simulation data is ignored COM port - Routes the communication data to and from a physical or virtual COM port Injector - Routes the communication data via a data injector component on the Panel.