Difference between revisions of "Component: RFID (EB052, RWD MICODE) (Wireless)"

From Flowcode Help
Jump to navigationJump to search
(XML import)
 
(XML import)
 
(5 intermediate revisions by 3 users not shown)
Line 7: Line 7:
 
|-
 
|-
 
| width="20%" style="color: gray;" | Version
 
| width="20%" style="color: gray;" | Version
| 1.2
+
| 1.3 (Release)
 
|-
 
|-
 
| width="20%" style="color: gray;" | Category
 
| width="20%" style="color: gray;" | Category
Line 15: Line 15:
  
  
==[[Media:Component Icon 74423151_1bf4_48b8_8ba8_a70c170ef2de.png|Image]] RFID (EB052, RWD_MICODE) component==
+
==[[File:Component Icon 74423151_1bf4_48b8_8ba8_a70c170ef2de.png|Image]] RFID (EB052, RWD_MICODE) component==
 
Low level routines for controlling a RF Solutions RFID interface
 
Low level routines for controlling a RF Solutions RFID interface
 
Allows communications between Mifare, ICode and HiTag type RFID tags.
 
Allows communications between Mifare, ICode and HiTag type RFID tags.
Line 21: Line 21:
  
 
==Examples==
 
==Examples==
''<span style="color:red;">No additional examples</span>''
+
===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.
 +
{{Fcfile|RFID_ex1.fcfx|RFID Status}}
 +
Status byte breakdown for Mifare.
 +
 +
[[File:RFID_MF.jpg]]
 +
 +
 +
Status byte breakdown for ICode.
 +
 +
[[File:RFID_IC.jpg]]
 +
 +
 +
Status byte breakdown for HiTag.
 +
 +
[[File:RFID_HI.jpg]]
 +
 +
 +
Status byte breakdown for EM Marin.
 +
 +
[[File: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.
 +
{{Fcfile|RFID_ex4.fcfx|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.
 +
 +
[[File:RFID_macr.jpg]]
  
 
==Downloadable macro reference==
 
==Downloadable macro reference==
  
 
===<span style="font-weight: normal;"><u><tt>GetRFIDTypeID</tt></u></span>===
 
===<span style="font-weight: normal;"><u><tt>GetRFIDTypeID</tt></u></span>===
''<span style="color:red;">No additional information</span>''
+
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'''
 
'''Parameters'''
Line 42: Line 71:
  
 
===<span style="font-weight: normal;"><u><tt>WriteRFIDBlock</tt></u></span>===
 
===<span style="font-weight: normal;"><u><tt>WriteRFIDBlock</tt></u></span>===
''<span style="color:red;">No additional information</span>''
+
Writes a block of information to the RFID device.
 
 
 
 
  
 
'''Parameters'''
 
'''Parameters'''
  
 
:[[Variable Types|BYTE]] ''Address''
 
:[[Variable Types|BYTE]] ''Address''
 +
::Remote RFID Block Address.
  
 
:[[Variable Types|BYTE]] ''Key_Type''
 
:[[Variable Types|BYTE]] ''Key_Type''
Line 59: Line 87:
  
 
===<span style="font-weight: normal;"><u><tt>WriteRFIDModule</tt></u></span>===
 
===<span style="font-weight: normal;"><u><tt>WriteRFIDModule</tt></u></span>===
''<span style="color:red;">No additional information</span>''
+
Stores a byte of data to the internal EEPROM of the RFID module at the address specified.
 
 
 
 
  
 
'''Parameters'''
 
'''Parameters'''
Line 76: Line 102:
  
 
===<span style="font-weight: normal;"><u><tt>DecrementRFIDValue</tt></u></span>===
 
===<span style="font-weight: normal;"><u><tt>DecrementRFIDValue</tt></u></span>===
''<span style="color:red;">No additional information</span>''
+
Perfoms a 32-bit decrement on the number held in location page or block.
 
 
 
 
  
 
'''Parameters'''
 
'''Parameters'''
  
 
:[[Variable Types|BYTE]] ''Src''
 
:[[Variable Types|BYTE]] ''Src''
 +
::Page / Block
  
 
:[[Variable Types|BYTE]] ''Dst''
 
:[[Variable Types|BYTE]] ''Dst''
 +
::Page / Block
  
 
:[[Variable Types|BYTE]] ''Key_Type''
 
:[[Variable Types|BYTE]] ''Key_Type''
 +
::Needed for MIFARE Commands
  
  
Line 95: Line 122:
  
 
===<span style="font-weight: normal;"><u><tt>FormatRFIDValue</tt></u></span>===
 
===<span style="font-weight: normal;"><u><tt>FormatRFIDValue</tt></u></span>===
''<span style="color:red;">No additional information</span>''
+
Initialises the internal buffer of the Microcontroller so that it is ready to perform a Increment, Decrement or Transfer command.
 
 
 
 
  
 
'''Parameters'''
 
'''Parameters'''
Line 110: Line 135:
  
 
===<span style="font-weight: normal;"><u><tt>IncrementRFIDValue</tt></u></span>===
 
===<span style="font-weight: normal;"><u><tt>IncrementRFIDValue</tt></u></span>===
''<span style="color:red;">No additional information</span>''
+
Perfoms a 32-bit increment on the number held in location page or block.
 
 
 
 
  
 
'''Parameters'''
 
'''Parameters'''
  
 
:[[Variable Types|BYTE]] ''Src''
 
:[[Variable Types|BYTE]] ''Src''
 +
::Page / Block
  
 
:[[Variable Types|BYTE]] ''Dst''
 
:[[Variable Types|BYTE]] ''Dst''
 +
::Page / Block
  
 
:[[Variable Types|BYTE]] ''Key_Type''
 
:[[Variable Types|BYTE]] ''Key_Type''
 +
::Needed for MIFARE Commands
  
  
Line 129: Line 155:
  
 
===<span style="font-weight: normal;"><u><tt>StoreRFIDKey</tt></u></span>===
 
===<span style="font-weight: normal;"><u><tt>StoreRFIDKey</tt></u></span>===
''<span style="color:red;">No additional information</span>''
+
Stores a 6 byte key for use with MIFARE type devices that require authorisation.
 
 
 
 
  
 
'''Parameters'''
 
'''Parameters'''
  
 
:[[Variable Types|BYTE]] ''Key''
 
:[[Variable Types|BYTE]] ''Key''
 +
::Key Location 0 - 31
  
 
:[[Variable Types|BYTE]] ''D0''
 
:[[Variable Types|BYTE]] ''D0''
 +
::Least significant byte of key
  
 
:[[Variable Types|BYTE]] ''D1''
 
:[[Variable Types|BYTE]] ''D1''
Line 148: Line 174:
  
 
:[[Variable Types|BYTE]] ''D5''
 
:[[Variable Types|BYTE]] ''D5''
 +
::Most significant byte of key
  
  
Line 156: Line 183:
  
 
===<span style="font-weight: normal;"><u><tt>WriteRFIDBuffer</tt></u></span>===
 
===<span style="font-weight: normal;"><u><tt>WriteRFIDBuffer</tt></u></span>===
''<span style="color:red;">No additional information</span>''
+
Writes a byte of data to the outgoing buffer.
 
 
 
 
  
 
'''Parameters'''
 
'''Parameters'''
  
 
:[[Variable Types|BYTE]] ''Address''
 
:[[Variable Types|BYTE]] ''Address''
 +
::The address of the buffer 0 - 15
  
 
:[[Variable Types|BYTE]] ''Data''
 
:[[Variable Types|BYTE]] ''Data''
 +
::The data to be stored in the buffer location 0 - 255.
  
  
Line 173: Line 200:
  
 
===<span style="font-weight: normal;"><u><tt>GetRFIDStatus</tt></u></span>===
 
===<span style="font-weight: normal;"><u><tt>GetRFIDStatus</tt></u></span>===
''<span style="color:red;">No additional information</span>''
+
Collect the status of the RFID device (see help for the explaination of the status byte).
 
 
 
 
  
 
'''Parameters'''
 
'''Parameters'''
Line 188: Line 213:
  
 
===<span style="font-weight: normal;"><u><tt>ReadRFIDBuffer</tt></u></span>===
 
===<span style="font-weight: normal;"><u><tt>ReadRFIDBuffer</tt></u></span>===
''<span style="color:red;">No additional information</span>''
+
Reads a byte of data from the incoming buffer.
 
 
 
 
  
 
'''Parameters'''
 
'''Parameters'''
  
 
:[[Variable Types|BYTE]] ''Address''
 
:[[Variable Types|BYTE]] ''Address''
 +
::The address of the buffer 0 - 15
  
  
Line 203: Line 227:
  
 
===<span style="font-weight: normal;"><u><tt>TransferRFIDValue</tt></u></span>===
 
===<span style="font-weight: normal;"><u><tt>TransferRFIDValue</tt></u></span>===
''<span style="color:red;">No additional information</span>''
+
Perfoms a 32-bit block data transfer on the number held in location page or block.
 
 
 
 
  
 
'''Parameters'''
 
'''Parameters'''
  
 
:[[Variable Types|BYTE]] ''Src''
 
:[[Variable Types|BYTE]] ''Src''
 +
::Page / Block
  
 
:[[Variable Types|BYTE]] ''Dst''
 
:[[Variable Types|BYTE]] ''Dst''
 +
::Page / Block
  
 
:[[Variable Types|BYTE]] ''Key_Type''
 
:[[Variable Types|BYTE]] ''Key_Type''
 +
::Needed for MIFARE Commands
  
  
Line 222: Line 247:
  
 
===<span style="font-weight: normal;"><u><tt>GetRFIDUID</tt></u></span>===
 
===<span style="font-weight: normal;"><u><tt>GetRFIDUID</tt></u></span>===
''<span style="color:red;">No additional information</span>''
+
Collects the UID from a RFID device. Stores the result into the UID buffer and returns the response of the module.
 
 
 
 
  
 
'''Parameters'''
 
'''Parameters'''
Line 237: Line 260:
  
 
===<span style="font-weight: normal;"><u><tt>ReadRFIDUID</tt></u></span>===
 
===<span style="font-weight: normal;"><u><tt>ReadRFIDUID</tt></u></span>===
''<span style="color:red;">No additional information</span>''
+
Reads a byte of data from the UID buffer.
 
 
 
 
  
 
'''Parameters'''
 
'''Parameters'''
  
 
:[[Variable Types|BYTE]] ''Address''
 
:[[Variable Types|BYTE]] ''Address''
 +
::The address of the buffer 0 - 7
  
  
Line 252: Line 274:
  
 
===<span style="font-weight: normal;"><u><tt>ReadRFIDBlock</tt></u></span>===
 
===<span style="font-weight: normal;"><u><tt>ReadRFIDBlock</tt></u></span>===
''<span style="color:red;">No additional information</span>''
+
Reads a block of information from the RFID device.
 
 
 
 
  
 
'''Parameters'''
 
'''Parameters'''
Line 269: Line 289:
  
 
===<span style="font-weight: normal;"><u><tt>Initialise</tt></u></span>===
 
===<span style="font-weight: normal;"><u><tt>Initialise</tt></u></span>===
''<span style="color:red;">No additional information</span>''
+
Configures the RFID device by presetting the Osc type and Mode via the Flowcode component properties.
 
 
 
 
  
 
'''Parameters'''
 
'''Parameters'''

Latest revision as of 17:59, 18 March 2016


Author Matrix Ltd.
Version 1.3 (Release)
Category Wireless


Image 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.

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

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


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


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

CHANNEL

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

No additional information


Card_Type

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

No additional information


Label

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

No additional information


CTS

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

No additional information


TX

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

No additional information


RX

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

No additional information