Component: RFID (BL0197) (E-blocks 2)

From Flowcode Help
Revision as of 09:11, 12 October 2020 by BenR (talk | contribs) (XML import)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


Author Matrix Ltd.
Version 2.0 (Release)
Category E-blocks 2


Image RFID (BL0197) component

Low level routines for controlling a BL0197 RFID E-block 2 board. Complete with macros to control the tag type and buzzer parameters.

Examples

No additional examples


Downloadable macro reference

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.

Parameters

This macro has no parameters


Return value

BYTE


SetCardType

Allows the RFID tag type to be configured

Parameters

BYTE TagType
0 = MIFARE, 1 = ICODE, 2 = ISO14443B


Return value

BYTE


WriteRFIDBlock

Writes a block of information to the RFID device.

Parameters

BYTE Address
Remote RFID Block Address.
BYTE Key_Type


Return value

BYTE


WriteRFIDModule

Stores a byte of data to the internal EEPROM of the RFID module at the address specified.

Parameters

BYTE Address
BYTE Data


Return value

BYTE


DecrementRFIDValue

Perfoms a 32-bit decrement on the number held in location page or block.

Parameters

BYTE Src
Page / Block
BYTE Dst
Page / Block
BYTE Key_Type
Needed for MIFARE Commands


Return value

BYTE


FormatRFIDValue

Initialises the internal buffer of the Microcontroller so that it is ready to perform a Increment, Decrement or Transfer command.

Parameters

This macro has no parameters


Return value

This call does not return a value


IncrementRFIDValue

Perfoms a 32-bit increment on the number held in location page or block.

Parameters

BYTE Src
Page / Block
BYTE Dst
Page / Block
BYTE Key_Type
Needed for MIFARE Commands


Return value

BYTE


StoreRFIDKey

Stores a 6 byte key for use with MIFARE type devices that require authorisation.

Parameters

BYTE Key
Key Location 0 - 31
BYTE D0
Least significant byte of key
BYTE D1
BYTE D2
BYTE D3
BYTE D4
BYTE D5
Most significant byte of key


Return value

BYTE


WriteRFIDBuffer

Writes a byte of data to the outgoing buffer.

Parameters

BYTE Address
The address of the buffer 0 - 15
BYTE Data
The data to be stored in the buffer location 0 - 255.


Return value

This call does not return a value


GetRFIDStatus

Collect the status of the RFID device (see help for the explaination of the status byte).

Parameters

This macro has no parameters


Return value

UINT


ReadRFIDBuffer

Reads a byte of data from the incoming buffer.

Parameters

BYTE Address
The address of the buffer 0 - 15


Return value

BYTE


TransferRFIDValue

Perfoms a 32-bit block data transfer on the number held in location page or block.

Parameters

BYTE Src
Page / Block
BYTE Dst
Page / Block
BYTE Key_Type
Needed for MIFARE Commands


Return value

BYTE


GetRFIDUID

Collects the UID from a RFID device. Stores the result into the UID buffer and returns the response of the module.

Parameters

This macro has no parameters


Return value

BYTE


ReadRFIDUID

Reads a byte of data from the UID buffer.

Parameters

BYTE Address
The address of the buffer 0 - 7


Return value

BYTE


IsTagPresent

Checks to see if a card is present.

Returns 0 if no tag is present.

Returns 1 if a valid tag is present.

Parameters

This macro has no parameters


Return value

BOOL : Returns true if the operation is a success, else false


SetBeep

Allows the buzzer output to be configured

Parameters

BYTE BeepDelay
0 = Off, 1 = 40mS, 2 = 80mS, 3 = 120mS etc.


Return value

BYTE


ReadRFIDBlock

Reads a block of information from the RFID device.

Parameters

BYTE Address
BYTE Key_Type


Return value

BYTE


Initialise

Configures the RFID device by presetting the Osc type and Mode via the Flowcode component properties.

Parameters

This macro has no parameters


Return value

BYTE


Simulation macro reference

This component does not contain any simulation macros


Property reference

Card_Type

This property is of type Fixed list of ints and can be referenced with the variable name Card_Type.

No additional information


Beep Delay

This property is of type Fixed list of ints and can be referenced with the variable name BeepDelay.

Amount of time to activate the buzzer when detecting a new RFID tag.

Channel

This property is of type Fixed list of ints and can be referenced with the variable name cal_uart::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.

Baud Options

This property is of type Fixed list of ints and can be referenced with the variable name cal_uart::BAUD_LIST.

Baud rate option selector

Baud Rate

This property is of type Signed integer and can be referenced with the variable name cal_uart::BAUD.

No additional information


TX

This property is of type Single digital pin and can be referenced with the variable name cal_uart::TX.

Pin to be used for Transmit data

RX

This property is of type Single digital pin and can be referenced with the variable name cal_uart::RX.

Pin to be used for Receive data

Card Detect (LED)

This property is of type Single digital pin and can be referenced with the variable name CardDetect.

No additional information


CTS

This property is of type Single digital pin and can be referenced with the variable name CTS.

No additional information


Label

This property is of type Line of text and can be referenced with the variable name label.

No additional information


Scope Traces

This property is of type True or false and can be referenced with the variable name cal_uart::ScopeTraces.

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.

Console Data

This property is of type True or false and can be referenced with the variable name cal_uart::ConsoleData.

Selects if the console data is automatically generated or not

Console Columns

This property is of type Unsigned integer and can be referenced with the variable name cal_uart::ConsoleColumns.

Number of characters that can be displayed on a single line of the console.

Data Source

This property is of type Fixed list of ints and can be referenced with the variable name cal_uart::DataSource.

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.