Difference between revisions of "Component: RF ISM (EB063, MRF49XA) (Wireless)"
From Flowcode Help
Jump to navigationJump to search(10 intermediate revisions by the same user not shown) | |||
Line 15: | Line 15: | ||
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 | + | ==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== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
Line 32: | Line 48: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
Line 47: | Line 77: | ||
{{Fcfile|RF_Test.fcfx|RF Example}} | {{Fcfile|RF_Test.fcfx|RF Example}} | ||
− | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==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;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ActivateRXMode''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Enables the receiver interface, allowing data to be received. The transmitter interface is automatically disabled. |
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:Fc9- | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
− | | width="90%" | | + | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
+ | |} | ||
+ | |||
+ | |||
+ | ===ActivateTXMode=== | ||
+ | {| 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;" | '''ActivateTXMode''' | ||
|- | |- | ||
− | | | + | | colspan="2" | Enables the transmitter interface, allowing data to be sent. The receiver interface is automatically disabled. |
− | |||
|- | |- | ||
− | |||
|- | |- | ||
| 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 72: | 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;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckBuffer''' |
|- | |- | ||
− | | colspan="2" | | + | | 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 83: | Line 129: | ||
| width="90%" | Timeout | | width="90%" | Timeout | ||
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Time to wait before returning no data available |
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | ===FSKRead=== | ||
+ | {| 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;" | '''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="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | ||
Line 90: | Line 150: | ||
+ | ===FSKWrite=== | ||
{| 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;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''FSKWrite''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Writes to the FSK (frequency shift key) data pin. |
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:Fc9- | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
− | | width="90%" | | + | | width="90%" | State |
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
Line 108: | 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;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetBufferData''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Returns a value from the incoming receive data buffer. |
|- | |- | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
− | | width="90%" | | + | | 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="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | ===GetDataCount=== | ||
+ | {| 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;" | '''GetDataCount''' | ||
+ | |- | ||
+ | | colspan="2" | Returns the number of bytes in the received 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'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | ===Initialise=== | ||
+ | {| 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" | 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- | + | | 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;" | ||
|- | |- | ||
Line 159: | Line 245: | ||
+ | ===ReadRXSignalStrength=== | ||
{| 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;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadRXSignalStrength''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Returns the current received signal strength. |
|- | |- | ||
|- | |- | ||
− | + | | 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- | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
+ | ===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;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveByte''' |
|- | |- | ||
− | | colspan="2" | | + | | 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- | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
− | | width="90%" | | + | | width="90%" | Timeout |
|- | |- | ||
− | | colspan="2" | Specifies | + | | 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- | + | | 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'' | ||
|} | |} | ||
+ | ===ReceiveString=== | ||
{| 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;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveString''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Puts the RF module in data mode and attempts to receive a string of bytes from the RF connection. |
|- | |- | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
− | | width="90%" | | + | | width="90%" | Length |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Specifies the maximum number of bytes to try and receive |
|- | |- | ||
− | | width="10%" align="center | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
− | | width="90% | + | | 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-string-icon.png]] - STRING | |
− | |||
− | |||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
+ | ===SendBuffer=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 249: | Line 321: | ||
+ | ===SendByte=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 267: | 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;" | ''' | + | | 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="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
Line 280: | 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;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetBufferData''' |
+ | |- | ||
+ | | colspan="2" | Allows a value to be loaded into the transmit buffer, | ||
+ | |- | ||
|- | |- | ||
− | | | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
+ | | width="90%" | Index | ||
|- | |- | ||
+ | | 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%" | | + | | width="90%" | Data |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | The data value to pass |
|- | |- | ||
| 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 298: | 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;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetDataRate''' |
+ | |- | ||
+ | | colspan="2" | Allows the RF data rate to be adjusted during runtime. | ||
|- | |- | ||
− | |||
|- | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Rate | ||
+ | |- | ||
+ | | 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 311: | 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;" | ''' | + | | 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- | + | | 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;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TXTune''' |
+ | |- | ||
+ | | colspan="2" | Used to specify and adjust the RF transmitter properties during runtime. | ||
+ | |- | ||
+ | |- | ||
+ | | 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- | + | | 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'' | ||
|} | |} | ||
+ | ===Uninitialise=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 350: | 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;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UpdateCenterFrequency''' |
|- | |- | ||
− | | colspan="2" | | + | | 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- | + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
− | | width="90%" | | + | | 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- | + | | 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'' | ||
|} | |} | ||
+ | |||
+ | ==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; | + | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' |
|- | |- | ||
− | |||
|- | |- | ||
+ | | 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-type-16-icon.png]] |
+ | | width="90%" | Channel | ||
|- | |- | ||
− | | | + | | colspan="2" | SPI Channel selector |
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | width="10% | + | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] |
− | | width="90% | + | | width="90%" | MOSI |
|- | |- | ||
− | | colspan="2" | | + | | 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% | + | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] |
− | | width="90% | + | | width="90%" | FSEL Pin |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | RF Mode selection pin |
|- | |- | ||
− | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | |
− | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | RF Settings | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | width="10%" align="center" style="background-color:# | ||
− | | width="90%" style="background-color:# | ||
|- | |- | ||
|- | |- | ||
Line 486: | 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 501: | 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 512: | 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:# | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] |
− | | width="90%" style="background-color:# | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
|- | |- |
Latest revision as of 13:12, 7 February 2023
Author | Matrix Ltd. |
Version | 2.0 |
Category | Wireless |
Contents
- 1 RF ISM (EB063, MRF49XA) component
- 2 Component Source Code
- 3 Detailed description
- 4 Examples
- 5 Macro reference
- 5.1 ActivateRXMode
- 5.2 ActivateTXMode
- 5.3 CheckBuffer
- 5.4 FSKRead
- 5.5 FSKWrite
- 5.6 GetBufferData
- 5.7 GetDataCount
- 5.8 Initialise
- 5.9 RXTune
- 5.10 ReadRXSignalStrength
- 5.11 ReceiveByte
- 5.12 ReceiveString
- 5.13 SendBuffer
- 5.14 SendByte
- 5.15 SendString
- 5.16 SetBufferData
- 5.17 SetDataRate
- 5.18 SetSyncPattern
- 5.19 TXTune
- 5.20 Uninitialise
- 5.21 UpdateCenterFrequency
- 6 Property reference
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.
RF Example
Macro reference
ActivateRXMode
![]() |
ActivateRXMode |
Enables the receiver interface, allowing data to be received. The transmitter interface is automatically disabled. | |
![]() |
Return |
ActivateTXMode
![]() |
ActivateTXMode |
Enables the transmitter interface, allowing data to be sent. The receiver interface is automatically disabled. | |
![]() |
Return |
CheckBuffer
FSKRead
![]() |
FSKRead |
Reads the FSK (frequency shift key) data pin. | |
![]() |
Return |
FSKWrite
![]() |
FSKWrite |
Writes to the FSK (frequency shift key) data pin. | |
![]() |
State |
![]() |
Return |
GetBufferData
![]() |
GetBufferData |
Returns a value from the incoming receive data buffer. | |
![]() |
Index |
Specifies which position in the buffer to read data from | |
![]() |
Return |
GetDataCount
![]() |
GetDataCount |
Returns the number of bytes in the received data buffer. | |
![]() |
Return |
Initialise
RXTune
ReadRXSignalStrength
![]() |
ReadRXSignalStrength |
Returns the current received signal strength. | |
![]() |
Return |
ReceiveByte
ReceiveString
SendBuffer
![]() |
SendBuffer |
Sends the contents of the transmit buffer. | |
![]() |
Count |
Specifies how many bytes to transfer from the transmit buffer | |
![]() |
Return |
SendByte
SendString
SetBufferData
![]() |
SetBufferData |
Allows a value to be loaded into the transmit buffer, | |
![]() |
Index |
The current location in the transmit buffer starting from 0 | |
![]() |
Data |
The data value to pass | |
![]() |
Return |
SetDataRate
![]() |
SetDataRate |
Allows the RF data rate to be adjusted during runtime. | |
![]() |
Rate |
Specifies the new data rate | |
![]() |
Return |
SetSyncPattern
TXTune
Uninitialise
![]() |
Uninitialise |
Powers down the RF module. The module must be re-initialised before it can be used again. | |
![]() |
Return |
UpdateCenterFrequency