Difference between revisions of "Component: RF ISM (EB063, MRF49XA) (Wireless)"

From Flowcode Help
Jump to navigationJump to search
 
(14 intermediate revisions by the same user not shown)
Line 14: Line 14:
 
==RF ISM (EB063, MRF49XA) component==
 
==RF ISM (EB063, MRF49XA) component==
 
A simple RF-ISM communications module based on the Microchip Alpha MRF49XA device. Also available in the form of the EB063 RF E-block.
 
A simple RF-ISM communications module based on the Microchip Alpha MRF49XA device. Also available in the form of the EB063 RF E-block.
 +
 +
==Component Source Code==
 +
 +
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_RF-ISM.fcfx FC_Comp_Source_RF-ISM.fcfx]
 +
 +
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_RF-ISM.fcfx FC_Comp_Source_RF-ISM.fcfx]
  
 
==Detailed description==
 
==Detailed description==
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
  
 
''No detailed description exists yet for this component''
 
''No detailed description exists yet for this component''
  
 
==Examples==
 
==Examples==
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
  
  
Line 27: Line 77:
 
{{Fcfile|RF_Test.fcfx|RF Example}}
 
{{Fcfile|RF_Test.fcfx|RF Example}}
  
==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;" | '''SetSyncPattern'''
 
|-
 
| colspan="2" | Allows the sync pattern to be modified during runtime to allow for switching between several different RF connections. 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Mode
 
|-
 
| colspan="2" | Switches on or off the extended sync functionality 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Pattern
 
|-
 
| colspan="2" | The bit pattern used for the standard sync mode 
 
|-
 
| 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''
 
|}
 
  
  
{| 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;" | '''ReceiveByte'''
 
|-
 
| colspan="2" | Puts the RF module in data mode and attempts to receive a single byte from the RF connection. Only packets containing a single data byte will be accepted. 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Timeout
 
|-
 
| colspan="2" | Specifies how many milliseconds to wait for valid data before returning. 
 
|-
 
| 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;" | '''SendString'''
 
|-
 
| colspan="2" | Puts the RF module in data mode and transmits a packet containing the data string through the RF connection. A packet consists of Sync information, Data and Checksum. 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | Data
 
|-
 
| colspan="2" |  
 
|-
 
| 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''
 
|}
 
  
  
 +
 +
 +
 +
==Macro reference==
 +
 +
===ActivateRXMode===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TXTune'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ActivateRXMode'''
 
|-
 
|-
| colspan="2" | Used to specify and adjust the RF transmitter properties during runtime. 
+
| colspan="2" | Enables the receiver interface, allowing data to be received. The transmitter interface is automatically disabled. 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Deviation
 
|-
 
| colspan="2" | Specifies the transmit FSK frequency deviation - Range 0 - 15 
 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Power
 
|-
 
| colspan="2" | Specifies the transmitter power - Range 0 - 7 
 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 111: Line 103:
  
  
 +
===ActivateTXMode===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RXTune'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ActivateTXMode'''
 
|-
 
|-
| colspan="2" | Used to specify and adjust the RF receiver properties during runtime. 
+
| colspan="2" | Enables the transmitter interface, allowing data to be sent. The receiver interface is automatically disabled. 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Bandwidth
 
|-
 
| colspan="2" | Specifies the Rx bandwidth - Range 1- 6 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Gain
 
|-
 
| colspan="2" | Specifies the Rx gain - Range 0 - 3 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Threshold
 
 
|-
 
|-
| colspan="2" | Specifies the Rx signal to noise threshold - Range 0 - 5 
 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 139: Line 117:
  
  
 +
===CheckBuffer===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetBufferData'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckBuffer'''
 
|-
 
|-
| colspan="2" | Allows a value to be loaded into the transmit buffer, 
+
| colspan="2" | Checks for incoming data for a specific period of time. Returns a value greater then 250 to indicate a failure. Returns the length of the incoming data buffer to indicate success. 
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Index
+
| width="90%" | Timeout
 
|-
 
|-
| colspan="2" | The current location in the transmit buffer starting from 0 
+
| colspan="2" | Time to wait before returning no data available 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
 
|-
 
| colspan="2" | The data value to pass 
 
|-
 
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===FSKRead===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UpdateCenterFrequency'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''FSKRead'''
 
|-
 
|-
| colspan="2" | Allows the RF center frequency to be adjusted during runtime to allow multiple RF channels to be scanned or multiplexed. 
+
| colspan="2" | Reads the FSK (frequency shift key) data pin. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Frequency
 
|-
 
| colspan="2" | Specifies the new center frequency value - Range 96 - 3903 
 
|-
 
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===FSKWrite===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 198: Line 169:
  
  
 +
===GetBufferData===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetDataCount'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetBufferData'''
 
|-
 
|-
| colspan="2" | Returns the number of bytes in the received data buffer. 
+
| colspan="2" | Returns a value from the incoming receive data buffer. 
|-
 
|-
 
| 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;" | '''SendBuffer'''
 
|-
 
| colspan="2" | Sends the contents of the transmit buffer. 
 
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Count
+
| width="90%" | Index
 
|-
 
|-
| colspan="2" | Specifies how many bytes to transfer from the transmit buffer 
+
| colspan="2" | Specifies which position in the buffer to read data from 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===GetDataCount===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendByte'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetDataCount'''
 
|-
 
|-
| colspan="2" | Puts the RF module in data mode and transmits a packet containing a single data byte through the RF connection. A packet consists of Sync information, Data and Checksum. 
+
| colspan="2" | Returns the number of bytes in the received data buffer. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
 
|-
 
| colspan="2" |  
 
|-
 
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===Initialise===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ActivateTXMode'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 
|-
 
|-
| colspan="2" | Enables the transmitter interface, allowing data to be sent. The receiver interface is automatically disabled. 
+
| colspan="2" | Starts up and configures the RF module ready for use. The macro will return a value greater then 0 if the module has been started correctly, otherwise the macro will return a 0. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===RXTune===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetDataRate'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RXTune'''
 
|-
 
|-
| colspan="2" | Allows the RF data rate to be adjusted during runtime. 
+
| colspan="2" | Used to specify and adjust the RF receiver properties during runtime. 
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Rate
+
| width="90%" | Bandwidth
 
|-
 
|-
| colspan="2" | Specifies the new data rate 
+
| colspan="2" | Specifies the Rx bandwidth - Range 1- 6 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
+
| width="90%" | Gain
|}
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| colspan="2" | Specifies the Rx gain - Range 0 - 3 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ActivateRXMode'''
 
 
|-
 
|-
| colspan="2" | Enables the receiver interface, allowing data to be received. The transmitter interface is automatically disabled. 
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Threshold
 
|-
 
|-
 +
| colspan="2" | Specifies the Rx signal to noise threshold - Range 0 - 5 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 291: Line 245:
  
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
+
===ReadRXSignalStrength===
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''FSKRead'''
 
|-
 
| colspan="2" | Reads the FSK (frequency shift key) data pin. 
 
|-
 
|-
 
| 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;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 317: Line 259:
  
  
 +
===ReceiveByte===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Uninitialise'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveByte'''
 
|-
 
|-
| colspan="2" | Powers down the RF module. The module must be re-initialised before it can be used again. 
+
| colspan="2" | Puts the RF module in data mode and attempts to receive a single byte from the RF connection. Only packets containing a single data byte will be accepted. 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''CheckBuffer'''
 
|-
 
| colspan="2" | Checks for incoming data for a specific period of time. Returns a value greater then 250 to indicate a failure. Returns the length of the incoming data buffer to indicate success. 
 
 
|-
 
|-
 
|-
 
|-
Line 341: Line 271:
 
| width="90%" | Timeout
 
| width="90%" | Timeout
 
|-
 
|-
| colspan="2" | Time to wait before returning no data available 
+
| colspan="2" | Specifies how many milliseconds to wait for valid data before returning. 
|-
 
| 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;" | '''GetBufferData'''
 
|-
 
| colspan="2" | Returns a value from the incoming receive data buffer. 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Index
 
|-
 
| colspan="2" | Specifies which position in the buffer to read data from 
 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
Line 366: Line 278:
  
  
 +
===ReceiveString===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 389: Line 302:
  
  
 +
===SendBuffer===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendBuffer'''
 
|-
 
|-
| colspan="2" | Starts up and configures the RF module ready for use. The macro will return a value greater then 0 if the module has been started correctly, otherwise the macro will return a 0. 
+
| colspan="2" | Sends the contents of the transmit buffer. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
+
| width="90%" | Count
|}
 
 
 
 
 
{| 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;" | '''Initialise'''
 
|-
 
| colspan="2" | Sets up the 1-Wire output pin ready for communications. 
 
 
|-
 
|-
 +
| colspan="2" | Specifies how many bytes to transfer from the transmit buffer 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 415: Line 321:
  
  
 +
===SendByte===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendByte'''
 
|-
 
|-
| colspan="2" | Starts up the UART to allow communications and initialises the states of the various  Modbus Coils, Inputs and Registers to 0. 
+
| colspan="2" | Puts the RF module in data mode and transmits a packet containing a single data byte through the RF connection. A packet consists of Sync information, Data and Checksum. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
+
| width="90%" | 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;" | '''Initialise'''
 
|-
 
| colspan="2" | Initialises the MIDI component and sets up the UART. 
 
 
|-
 
|-
 +
| colspan="2" |  
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 441: Line 340:
  
  
 +
===SendString===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CommsBaud'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendString'''
 
|-
 
|-
| colspan="2" | Sets the Baud rate of the alt communications channel 
+
| colspan="2" | Puts the RF module in data mode and transmits a packet containing the data string through the RF connection. A packet consists of Sync information, Data and Checksum. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Baud
+
| width="90%" | Data
 
|-
 
|-
| colspan="2" | Range: 0-7 : 0=1200 / 7=115200 
+
| colspan="2" |  
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 459: Line 359:
  
  
 +
===SetBufferData===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LCDOptions'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetBufferData'''
 
|-
 
|-
| colspan="2" | Controls some of the LCD options 
+
| colspan="2" | Allows a value to be loaded into the transmit buffer, 
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Foreground
+
| width="90%" | Index
 
|-
 
|-
| colspan="2" | Range: 0-1 
+
| colspan="2" | The current location in the transmit buffer starting from 0 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Background
+
| width="90%" | Data
 
|-
 
|-
| colspan="2" | Range: 0-1 
+
| colspan="2" | The data value to pass 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Transparent
 
|-
 
| colspan="2" | Range: 0-1 
 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 487: Line 383:
  
  
 +
===SetDataRate===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LCDVerbose'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetDataRate'''
 
|-
 
|-
| colspan="2" | Controls the Verbose mode.  When enabled the LCD automatically displays an account of the incoming API commands and parameters. When switched off the LCD is free for the user to control as required. 
+
| colspan="2" | Allows the RF data rate to be adjusted during runtime. 
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Mode
+
| width="90%" | Rate
 
|-
 
|-
| colspan="2" | Range: 0-1 : 0=Off or User Mode / 1=API Verbose Mode 
+
| colspan="2" | Specifies the new data rate 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 505: Line 402:
  
  
 +
===SetSyncPattern===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadDigitalInput'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetSyncPattern'''
 
|-
 
|-
| colspan="2" | Reads a single digital input. 
+
| colspan="2" | Allows the sync pattern to be modified during runtime to allow for switching between several different RF connections. 
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
+
| width="90%" | Mode
 +
|-
 +
| colspan="2" | Switches on or off the extended sync functionality 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Pattern
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | The bit pattern used for the standard sync mode 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
+
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===TXTune===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMConfig'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TXTune'''
 
|-
 
|-
| colspan="2" | Sets the PWM configuration. Channel = 0 - 1 : 0 = EN_AB, A, B / 1 = EN_CD, C, D Period = 0 - 65535 Scaler = 0 - 3 :  0=1:1 1=1:8 2=1:64 3=1:256 
+
| colspan="2" | Used to specify and adjust the RF transmitter properties during runtime. 
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
+
| width="90%" | Deviation
 
|-
 
|-
| colspan="2" | Range 0-1 
+
| colspan="2" | Specifies the transmit FSK frequency deviation - Range 0 - 15 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Period
 
|-
 
| colspan="2" | Range: 0-65535 
 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Scaler
+
| width="90%" | Power
 
|-
 
|-
| colspan="2" | Range: 0-3 
+
| colspan="2" | Specifies the transmitter power - Range 0 - 7 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 551: Line 450:
  
  
 +
===Uninitialise===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMEnable'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Uninitialise'''
 
|-
 
|-
| colspan="2" | Allows pulse width modulated transistor outputs to be switched on or off. Bit 0 = Enable AB Bit 1 = A / Bit 2 = B Bit 3 = C / Bit 4 = D Bit 5 = Enable CD 
+
| colspan="2" | Powers down the RF module. The module must be re-initialised before it can be used again. 
 
|-
 
|-
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | EnableMask
 
|-
 
| colspan="2" | Range 0-63 or 0b00000 to 0b111111 
 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 569: Line 464:
  
  
 +
===UpdateCenterFrequency===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMDuty'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UpdateCenterFrequency'''
|-
 
| colspan="2" | Sets a single PWM channel duty. Channel = 0 - 5 : 0=EN_AB, 1=A, 2=B, 3=C, 4=D, 5=EN_CD Duty = 0 - 65535 
 
 
|-
 
|-
 +
| colspan="2" | Allows the RF center frequency to be adjusted during runtime to allow multiple RF channels to be scanned or multiplexed. 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Channel
 
|-
 
| colspan="2" | Range 0-5 
 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Duty
+
| width="90%" | Frequency
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Specifies the new center frequency value - Range 96 - 3903 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 591: Line 482:
 
|}
 
|}
  
 +
 +
==Property reference==
  
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LCDCursor'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
 
|-
 
|-
| colspan="2" | Sets the cursor position for the MIAC display 
 
 
|-
 
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | X
 
 
|-
 
|-
| colspan="2" | Range: 0-21 
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Y
 
|-
 
| colspan="2" | Range: 0-4 
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''WriteTran'''
 
|-
 
| colspan="2" | Allows a single transistor output to be switched on or off. 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
 
| width="90%" | Channel
 
| width="90%" | Channel
 
|-
 
|-
| colspan="2" | Range 1-4 
+
| colspan="2" | SPI Channel selector 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | Value
+
| width="90%" | MOSI
 
|-
 
|-
| colspan="2" | 0 = Off, 1 = On 
+
| colspan="2" | SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode. 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" style="border-top: 2px solid #000;" | ''Return''
+
| width="90%" | MISO
|}
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| colspan="2" | SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode. 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 
 
|-
 
|-
| colspan="2" |  
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 +
| width="90%" | CLK
 
|-
 
|-
 +
| colspan="2" | SPI Clock Pin CLK - The Clock signal is driven by the SPI master. 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" style="border-top: 2px solid #000;" | ''Return''
+
| width="90%" | CS / SS
|}
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| colspan="2" | Chip Select / Slave Select Pin  Master Mode: General purpose output pin used to select the remote SPI device. Slave Mode: Hardware chip select pin input used to select the SPI device.  
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LCDClear'''
 
 
|-
 
|-
| colspan="2" | Clears the MIAC display 
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 +
| width="90%" | FSEL Pin
 
|-
 
|-
 +
| colspan="2" | RF Mode selection pin 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="border-top: 2px solid #000;" | ''Return''
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | RF Settings
|}
 
 
 
 
 
 
 
 
 
==Property reference==
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
 
 
|-
 
|-
 
|-
 
|-
Line 728: Line 583:
 
|-
 
|-
 
| colspan="2" | Selects if an additional fixed sync byte is to be used. 
 
| colspan="2" | Selects if an additional fixed sync byte is to be used. 
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Receiver Settings
 +
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
Line 743: Line 602:
 
|-
 
|-
 
| colspan="2" | The signal to noise threshold used to control the sensitivity 
 
| colspan="2" | The signal to noise threshold used to control the sensitivity 
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Transmitter Settings
 +
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
Line 754: Line 617:
 
| colspan="2" | The amount of power to use when transmitting 
 
| colspan="2" | The amount of power to use when transmitting 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Channel
 
|-
 
| colspan="2" | SPI Channel selector 
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
| width="90%" | MOSI
 
|-
 
| colspan="2" | SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode. 
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
| width="90%" | MISO
 
|-
 
| colspan="2" | SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode. 
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
| width="90%" | CLK
 
|-
 
| colspan="2" | SPI Clock Pin CLK - The Clock signal is driven by the SPI master. 
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
| width="90%" | CS / SS
 
|-
 
| colspan="2" | Chip Select / Slave Select Pin  Master Mode: General purpose output pin used to select the remote SPI device. Slave Mode: Hardware chip select pin input used to select the SPI device.  
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
| width="90%" | FSEL Pin
 
|-
 
| colspan="2" | RF Mode selection pin 
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''
 
 
|-
 
|-
 
|-
 
|-

Latest revision as of 13:12, 7 February 2023

Author Matrix Ltd.
Version 2.0
Category Wireless


RF ISM (EB063, MRF49XA) component

A simple RF-ISM communications module based on the Microchip Alpha MRF49XA device. Also available in the form of the EB063 RF E-block.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_RF-ISM.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_RF-ISM.fcfx

Detailed description

No detailed description exists yet for this component

Examples

The example attempts to send and receive data from a remote board. You will need two RF modules to allow the communications to work.

The example can be used to drive both ends of the RF communications as it will send out data but also print out any data received onto the LCD. Pins RA0 and RA1 can be used for diagnostics on the program. FC6 Icon.png RF Example






Macro reference

ActivateRXMode

Fc9-comp-macro.png ActivateRXMode
Enables the receiver interface, allowing data to be received. The transmitter interface is automatically disabled. 
Fc9-void-icon.png - VOID Return


ActivateTXMode

Fc9-comp-macro.png ActivateTXMode
Enables the transmitter interface, allowing data to be sent. The receiver interface is automatically disabled. 
Fc9-void-icon.png - VOID Return


CheckBuffer

Fc9-comp-macro.png CheckBuffer
Checks for incoming data for a specific period of time. Returns a value greater then 250 to indicate a failure. Returns the length of the incoming data buffer to indicate success. 
Fc9-u8-icon.png - BYTE Timeout
Time to wait before returning no data available 
Fc9-u8-icon.png - BYTE Return


FSKRead

Fc9-comp-macro.png FSKRead
Reads the FSK (frequency shift key) data pin. 
Fc9-u8-icon.png - BYTE Return


FSKWrite

Fc9-comp-macro.png FSKWrite
Writes to the FSK (frequency shift key) data pin. 
Fc9-u8-icon.png - BYTE State
 
Fc9-void-icon.png - VOID Return


GetBufferData

Fc9-comp-macro.png GetBufferData
Returns a value from the incoming receive data buffer. 
Fc9-u8-icon.png - BYTE Index
Specifies which position in the buffer to read data from 
Fc9-u8-icon.png - BYTE Return


GetDataCount

Fc9-comp-macro.png GetDataCount
Returns the number of bytes in the received data buffer. 
Fc9-u8-icon.png - BYTE Return


Initialise

Fc9-comp-macro.png Initialise
Starts up and configures the RF module ready for use. The macro will return a value greater then 0 if the module has been started correctly, otherwise the macro will return a 0. 
Fc9-u8-icon.png - BYTE Return


RXTune

Fc9-comp-macro.png RXTune
Used to specify and adjust the RF receiver properties during runtime. 
Fc9-u8-icon.png - BYTE Bandwidth
Specifies the Rx bandwidth - Range 1- 6 
Fc9-u8-icon.png - BYTE Gain
Specifies the Rx gain - Range 0 - 3 
Fc9-u8-icon.png - BYTE Threshold
Specifies the Rx signal to noise threshold - Range 0 - 5 
Fc9-void-icon.png - VOID Return


ReadRXSignalStrength

Fc9-comp-macro.png ReadRXSignalStrength
Returns the current received signal strength. 
Fc9-u8-icon.png - BYTE Return


ReceiveByte

Fc9-comp-macro.png ReceiveByte
Puts the RF module in data mode and attempts to receive a single byte from the RF connection. Only packets containing a single data byte will be accepted. 
Fc9-u8-icon.png - BYTE Timeout
Specifies how many milliseconds to wait for valid data before returning. 
Fc9-u8-icon.png - BYTE Return


ReceiveString

Fc9-comp-macro.png ReceiveString
Puts the RF module in data mode and attempts to receive a string of bytes from the RF connection. 
Fc9-u8-icon.png - BYTE Length
Specifies the maximum number of bytes to try and receive 
Fc9-u8-icon.png - BYTE Timeout
Specifies how many milliseconds to wait for valid data before returning. 
Fc9-string-icon.png - STRING Return


SendBuffer

Fc9-comp-macro.png SendBuffer
Sends the contents of the transmit buffer. 
Fc9-u8-icon.png - BYTE Count
Specifies how many bytes to transfer from the transmit buffer 
Fc9-void-icon.png - VOID Return


SendByte

Fc9-comp-macro.png SendByte
Puts the RF module in data mode and transmits a packet containing a single data byte through the RF connection. A packet consists of Sync information, Data and Checksum. 
Fc9-u8-icon.png - BYTE Data
 
Fc9-void-icon.png - VOID Return


SendString

Fc9-comp-macro.png SendString
Puts the RF module in data mode and transmits a packet containing the data string through the RF connection. A packet consists of Sync information, Data and Checksum. 
Fc9-string-icon.png - STRING Data
 
Fc9-void-icon.png - VOID Return


SetBufferData

Fc9-comp-macro.png SetBufferData
Allows a value to be loaded into the transmit buffer, 
Fc9-u8-icon.png - BYTE Index
The current location in the transmit buffer starting from 0 
Fc9-u8-icon.png - BYTE Data
The data value to pass 
Fc9-void-icon.png - VOID Return


SetDataRate

Fc9-comp-macro.png SetDataRate
Allows the RF data rate to be adjusted during runtime. 
Fc9-u8-icon.png - BYTE Rate
Specifies the new data rate 
Fc9-void-icon.png - VOID Return


SetSyncPattern

Fc9-comp-macro.png SetSyncPattern
Allows the sync pattern to be modified during runtime to allow for switching between several different RF connections. 
Fc9-u8-icon.png - BYTE Mode
Switches on or off the extended sync functionality 
Fc9-u8-icon.png - BYTE Pattern
The bit pattern used for the standard sync mode 
Fc9-void-icon.png - VOID Return


TXTune

Fc9-comp-macro.png TXTune
Used to specify and adjust the RF transmitter properties during runtime. 
Fc9-u8-icon.png - BYTE Deviation
Specifies the transmit FSK frequency deviation - Range 0 - 15 
Fc9-u8-icon.png - BYTE Power
Specifies the transmitter power - Range 0 - 7 
Fc9-void-icon.png - VOID Return


Uninitialise

Fc9-comp-macro.png Uninitialise
Powers down the RF module. The module must be re-initialised before it can be used again. 
Fc9-void-icon.png - VOID Return


UpdateCenterFrequency

Fc9-comp-macro.png UpdateCenterFrequency
Allows the RF center frequency to be adjusted during runtime to allow multiple RF channels to be scanned or multiplexed. 
Fc9-u16-icon.png - UINT Frequency
Specifies the new center frequency value - Range 96 - 3903 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Connections
Fc9-type-16-icon.png Channel
SPI Channel selector 
Fc9-type-5-icon.png MOSI
SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode. 
Fc9-type-5-icon.png MISO
SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode. 
Fc9-type-5-icon.png CLK
SPI Clock Pin CLK - The Clock signal is driven by the SPI master. 
Fc9-type-5-icon.png CS / SS
Chip Select / Slave Select Pin Master Mode: General purpose output pin used to select the remote SPI device. Slave Mode: Hardware chip select pin input used to select the SPI device.  
Fc9-type-5-icon.png FSEL Pin
RF Mode selection pin 
Fc9-conn-icon.png RF Settings
Fc9-type-16-icon.png Module Frequency
Module frequency - must be matched with the specific RF transciever being used. 
Fc9-type-14-icon.png Center Frequency (96-3903)
Specifies the default RF center frequency 
Fc9-type-15-icon.png Center Frequency (MHz)
Calculation to work out the approx actual frequency 
Fc9-type-16-icon.png Data Mode
Specifies if the module will send data packets (Byte) or FSK bits (Bit) 
Fc9-type-14-icon.png Data Buffer Size (Max)
Maximum number of bytes that can be loaded into a single data packet 
Fc9-type-16-icon.png Rate Divider 1
Data rate prescaler 1 - Coarse control 
Fc9-type-14-icon.png Rate Divider 2 (0-127)
Data rate prescaler 2 - Fine control 
Fc9-type-15-icon.png Max Throughput (Kb/s)
Calculated max data throughput if the data is 100% active 
Fc9-type-21-icon.png Data Rate Value
Actual default value passed to the data rate control 
Fc9-type-14-icon.png Sync Pattern
Default sync pattern used by the standard sync in byte data mode. 
Fc9-type-16-icon.png Extended Sync
Selects if an additional fixed sync byte is to be used. 
Fc9-conn-icon.png Receiver Settings
Fc9-type-16-icon.png Bandwidth
Controls the receiver bandwidth, the higher the value the bigger the datarate that can be acheived but the fewer channels that can co-exist 
Fc9-type-16-icon.png Gain
Controls the receiver gain - the amount to amplify the incoming signal before processing 
Fc9-type-16-icon.png Threshold
The signal to noise threshold used to control the sensitivity 
Fc9-conn-icon.png Transmitter Settings
Fc9-type-16-icon.png Bandwidth
Controls the transmitter bandwidth, i.e. the frequency either side of the center frequency to use for the RF communications 
Fc9-type-16-icon.png Power
The amount of power to use when transmitting 
Fc9-conn-icon.png Simulation
Fc9-type-10-icon.png Label
Label used to help identify the component on the panel. 
Fc9-type-7-icon.png Scope Traces
Selects if the scope traces are automatically generated or not 
Fc9-type-7-icon.png Console Data
Selects if the console data is automatically generated or not 
Fc9-type-16-icon.png API