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

From Flowcode Help
Jump to navigationJump to search
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{| width="50%"
+
{| style="width:50%"
 
|-
 
|-
| width="20%" style="color: gray;" | Author
+
| width="20%" style="color:gray;" | Author
 
| Matrix Ltd.
 
| Matrix Ltd.
 
|-
 
|-
| width="20%" style="color: gray;" | Version
+
| width="20%" style="color:gray;" | Version
| 1.2
+
| 2.0
 
|-
 
|-
| width="20%" style="color: gray;" | Category
+
| width="20%" style="color:gray;" | Category
 
| Wireless
 
| 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.
  
==[[File:Component Icon 74423151_1bf4_48b8_8ba8_a70c170ef2de.png|Image]] RFID (EB052, RWD_MICODE) component==
+
==Component Pack==
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==
+
COMMSB
  
===Reading the status===
+
==Detailed description==
  
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]]
+
''No detailed description exists yet for this component''
  
 +
==Examples==
  
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==
 
  
===<span style="font-weight: normal;"><u><tt>GetRFIDTypeID</tt></u></span>===
+
===Reading the status===
''<span style="color:red;">No additional information</span>''
 
  
 +
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]]
  
'''Parameters'''
 
  
:''This macro has no parameters''
+
Status byte breakdown for ICode.
  
 +
[[File:RFID_IC.jpg]]
  
'''Return value'''
 
  
:[[Variable Types|BYTE]]
+
Status byte breakdown for HiTag.
  
 +
[[File:RFID_HI.jpg]]
  
===<span style="font-weight: normal;"><u><tt>WriteRFIDBlock</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
  
 +
Status byte breakdown for EM Marin.
  
 +
[[File:RFID_EM.jpg]]
  
'''Parameters'''
 
  
:[[Variable Types|BYTE]] ''Address''
+
===Reading and Writing Data===
  
:[[Variable Types|BYTE]] ''Key_Type''
+
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.
  
'''Return value'''
+
[[File:RFID_macr.jpg]]
  
:[[Variable Types|BYTE]]
+
==Downloadable macro reference==
  
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRFIDTypeID'''
 +
|-
 +
| colspan="2" | 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.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>WriteRFIDModule</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
  
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteRFIDBlock'''
 +
|-
 +
| colspan="2" | Writes a block of information to the RFID device.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Address
 +
|-
 +
| colspan="2" | Remote RFID Block Address.&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Key_Type
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
'''Parameters'''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteRFIDModule'''
 +
|-
 +
| colspan="2" | Stores a byte of data to the internal EEPROM of the RFID module at the address specified.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Address
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Data
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
:[[Variable Types|BYTE]] ''Address''
 
  
:[[Variable Types|BYTE]] ''Data''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DecrementRFIDValue'''
 +
|-
 +
| colspan="2" | Perfoms a 32-bit decrement on the number held in location page or block.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Src
 +
|-
 +
| colspan="2" | Page / Block&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Dst
 +
|-
 +
| colspan="2" | Page / Block&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Key_Type
 +
|-
 +
| colspan="2" | Needed for MIFARE Commands&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
'''Return value'''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''FormatRFIDValue'''
 +
|-
 +
| colspan="2" | Initialises the internal buffer of the Microcontroller so that it is ready to perform a Increment, Decrement or Transfer command.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
:[[Variable Types|BYTE]]
 
  
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IncrementRFIDValue'''
 +
|-
 +
| colspan="2" | Perfoms a 32-bit increment on the number held in location page or block.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Src
 +
|-
 +
| colspan="2" | Page / Block&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Dst
 +
|-
 +
| colspan="2" | Page / Block&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Key_Type
 +
|-
 +
| colspan="2" | Needed for MIFARE Commands&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>DecrementRFIDValue</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
  
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''StoreRFIDKey'''
 +
|-
 +
| colspan="2" | Stores a 6 byte key for use with MIFARE type devices that require authorisation.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Key
 +
|-
 +
| colspan="2" | Key Location 0 - 31&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | D0
 +
|-
 +
| colspan="2" | Least significant byte of key&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | D1
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | D2
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | D3
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | D4
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | D5
 +
|-
 +
| colspan="2" | Most significant byte of key&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
'''Parameters'''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteRFIDBuffer'''
 +
|-
 +
| colspan="2" | Writes a byte of data to the outgoing buffer.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Address
 +
|-
 +
| colspan="2" | The address of the buffer 0 - 15&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Data
 +
|-
 +
| colspan="2" | The data to be stored in the buffer location 0 - 255.&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
:[[Variable Types|BYTE]] ''Src''
 
  
:[[Variable Types|BYTE]] ''Dst''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRFIDStatus'''
 +
|-
 +
| colspan="2" | Collect the status of the RFID device (see help for the explaination of the status byte).&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
:[[Variable Types|BYTE]] ''Key_Type''
 
  
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadRFIDBuffer'''
 +
|-
 +
| colspan="2" | Reads a byte of data from the incoming buffer.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Address
 +
|-
 +
| colspan="2" | The address of the buffer 0 - 15&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
'''Return value'''
 
  
:[[Variable Types|BYTE]]
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TransferRFIDValue'''
 +
|-
 +
| colspan="2" | Perfoms a 32-bit block data transfer on the number held in location page or block.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Src
 +
|-
 +
| colspan="2" | Page / Block&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Dst
 +
|-
 +
| colspan="2" | Page / Block&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Key_Type
 +
|-
 +
| colspan="2" | Needed for MIFARE Commands&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
===<span style="font-weight: normal;"><u><tt>FormatRFIDValue</tt></u></span>===
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
''<span style="color:red;">No additional information</span>''
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRFIDUID'''
 +
|-
 +
| colspan="2" | Collects the UID from a RFID device. Stores the result into the UID buffer and returns the response of the module.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadRFIDUID'''
 +
|-
 +
| colspan="2" | Reads a byte of data from the UID buffer.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Address
 +
|-
 +
| colspan="2" | The address of the buffer 0 - 7&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
'''Parameters'''
 
  
:''This macro has no parameters''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadRFIDBlock'''
 +
|-
 +
| colspan="2" | Reads a block of information from the RFID device.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Address
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Key_Type
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
'''Return value'''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
:''This call does not return a value''
+
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 
+
|-
===<span style="font-weight: normal;"><u><tt>IncrementRFIDValue</tt></u></span>===
+
| colspan="2" | Configures the RFID device by presetting the Osc type and Mode via the Flowcode component properties.&nbsp;
''<span style="color:red;">No additional information</span>''
+
|-
 
+
|-
 
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 
+
| width="90%" style="border-top: 2px solid #000;" | ''Return''
'''Parameters'''
+
|}
 
 
:[[Variable Types|BYTE]] ''Src''
 
 
 
:[[Variable Types|BYTE]] ''Dst''
 
 
 
:[[Variable Types|BYTE]] ''Key_Type''
 
 
 
 
 
'''Return value'''
 
 
 
:[[Variable Types|BYTE]]
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>StoreRFIDKey</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|BYTE]] ''Key''
 
 
 
:[[Variable Types|BYTE]] ''D0''
 
 
 
:[[Variable Types|BYTE]] ''D1''
 
 
 
:[[Variable Types|BYTE]] ''D2''
 
 
 
:[[Variable Types|BYTE]] ''D3''
 
 
 
:[[Variable Types|BYTE]] ''D4''
 
 
 
:[[Variable Types|BYTE]] ''D5''
 
 
 
 
 
'''Return value'''
 
 
 
:[[Variable Types|BYTE]]
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>WriteRFIDBuffer</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|BYTE]] ''Address''
 
 
 
:[[Variable Types|BYTE]] ''Data''
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>GetRFIDStatus</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
 
 
'''Parameters'''
 
 
 
:''This macro has no parameters''
 
 
 
  
'''Return value'''
 
  
:[[Variable Types|UINT]]
 
 
 
===<span style="font-weight: normal;"><u><tt>ReadRFIDBuffer</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
'''Parameters'''
 
 
:[[Variable Types|BYTE]] ''Address''
 
 
 
'''Return value'''
 
 
:[[Variable Types|BYTE]]
 
 
 
===<span style="font-weight: normal;"><u><tt>TransferRFIDValue</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
'''Parameters'''
 
 
:[[Variable Types|BYTE]] ''Src''
 
 
:[[Variable Types|BYTE]] ''Dst''
 
 
:[[Variable Types|BYTE]] ''Key_Type''
 
 
 
'''Return value'''
 
 
:[[Variable Types|BYTE]]
 
 
 
===<span style="font-weight: normal;"><u><tt>GetRFIDUID</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
'''Parameters'''
 
 
:''This macro has no parameters''
 
 
 
'''Return value'''
 
 
:[[Variable Types|BYTE]]
 
 
 
===<span style="font-weight: normal;"><u><tt>ReadRFIDUID</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
'''Parameters'''
 
 
:[[Variable Types|BYTE]] ''Address''
 
 
 
'''Return value'''
 
 
:[[Variable Types|BYTE]]
 
 
 
===<span style="font-weight: normal;"><u><tt>ReadRFIDBlock</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
'''Parameters'''
 
 
:[[Variable Types|BYTE]] ''Address''
 
 
:[[Variable Types|BYTE]] ''Key_Type''
 
 
 
'''Return value'''
 
 
:[[Variable Types|BYTE]]
 
 
 
===<span style="font-weight: normal;"><u><tt>Initialise</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
'''Parameters'''
 
 
:''This macro has no parameters''
 
 
 
'''Return value'''
 
 
:[[Variable Types|BYTE]]
 
 
 
 
==Simulation macro reference==
 
 
''This component does not contain any simulation macros''
 
  
  
 
==Property reference==
 
==Property reference==
<span style="font-weight: normal;"><u>CHANNEL</u></span>
 
  
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''CHANNEL''.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
''<span style="color:red;">No additional information</span>''
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
 
+
|-
 
+
|-
<span style="font-weight: normal;"><u>Card_Type</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
+
| width="90%" | Card_Type
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''Card_Type''.
+
|-
 
+
| colspan="2" | &nbsp;
''<span style="color:red;">No additional information</span>''
+
|-
 
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
 
+
|-
<span style="font-weight: normal;"><u>Label</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
This property is of type ''Line of text'' and can be referenced with the variable name ''label''.
+
| width="90%" | Channel
 
+
|-
''<span style="color:red;">No additional information</span>''
+
| colspan="2" | 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.&nbsp;
 
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
+
| width="90%" | Baud Options
<span style="font-weight: normal;"><u>CTS</u></span>
+
|-
 
+
| colspan="2" | Baud rate option selector&nbsp;
This property is of type ''Single digital pin'' and can be referenced with the variable name ''CTS''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
''<span style="color:red;">No additional information</span>''
+
| width="90%" | Baud Rate
 
+
|-
 
+
| colspan="2" | &nbsp;
 
+
|-
<span style="font-weight: normal;"><u>TX</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
+
| width="90%" | TX
This property is of type ''Single digital pin'' and can be referenced with the variable name ''TX''.
+
|-
 
+
| colspan="2" | Pin to be used for Transmit data&nbsp;
''<span style="color:red;">No additional information</span>''
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
+
| width="90%" | RX
 
+
|-
<span style="font-weight: normal;"><u>RX</u></span>
+
| colspan="2" | Pin to be used for Receive data&nbsp;
 
+
|-
This property is of type ''Single digital pin'' and can be referenced with the variable name ''RX''.
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
+
| width="90%" | CTS
''<span style="color:red;">No additional information</span>''
+
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 +
| width="90%" | Label
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 +
| width="90%" | Scope Traces
 +
|-
 +
| colspan="2" | 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.&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 +
| width="90%" | Console Data
 +
|-
 +
| colspan="2" | Selects if the console data is automatically generated or not&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 +
| width="90%" | Console Columns
 +
|-
 +
| colspan="2" | Number of characters that can be displayed on a single line of the console.&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Data Source
 +
|-
 +
| colspan="2" | 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.&nbsp;
 +
|}

Latest revision as of 17:22, 9 November 2022

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 Pack

COMMSB

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

Downloadable macro reference

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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



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.