Difference between revisions of "Component: RF ISM (EB063, MRF49XA) (Wireless)"
From Flowcode Help
Jump to navigationJump to search (XML import) |
|||
(19 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {| 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 |
− | | | + | | 2.0 |
|- | |- | ||
− | | width="20%" style="color: gray;" | Category | + | | width="20%" style="color:gray;" | Category |
| Wireless | | 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: [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== | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | ''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. | ||
+ | {{Fcfile|RF_Test.fcfx|RF Example}} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | ==Macro reference== | ||
− | '''Return | + | ===ActivateRXMode=== |
+ | {| 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;" | '''ActivateRXMode''' | ||
+ | |- | ||
+ | | colspan="2" | Enables the receiver interface, allowing data to be received. The transmitter interface is automatically disabled. | ||
+ | |- | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
− | |||
+ | ===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="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | |||
− | ''' | + | ===CheckBuffer=== |
+ | {| 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. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Timeout | ||
+ | |- | ||
+ | | 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="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | :[[ | + | ===FSKWrite=== |
+ | {| 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;" | '''FSKWrite''' | ||
+ | |- | ||
+ | | colspan="2" | Writes to the FSK (frequency shift key) data pin. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | State | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
− | === | + | ===GetBufferData=== |
− | + | {| 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="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-u8-icon.png]] - BYTE | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
+ | ===RXTune=== | ||
+ | {| 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;" | '''RXTune''' | ||
+ | |- | ||
+ | | colspan="2" | Used to specify and adjust the RF receiver properties during runtime. | ||
+ | |- | ||
+ | |- | ||
+ | | 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="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | |||
− | + | ===ReadRXSignalStrength=== | |
+ | {| 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;" | '''ReadRXSignalStrength''' | ||
+ | |- | ||
+ | | 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="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | :[[ | + | ===ReceiveByte=== |
+ | {| 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'' | ||
+ | |} | ||
− | '''Return | + | ===ReceiveString=== |
+ | {| 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;" | '''ReceiveString''' | ||
+ | |- | ||
+ | | 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="90%" | Length | ||
+ | |- | ||
+ | | colspan="2" | Specifies the maximum number of bytes to try and receive | ||
+ | |- | ||
+ | | 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-string-icon.png]] - STRING | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
+ | ===SendBuffer=== | ||
+ | {| 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="90%" | Count | ||
+ | |- | ||
+ | | 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="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | |||
− | + | ===SendByte=== | |
+ | {| 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;" | '''SendByte''' | ||
+ | |- | ||
+ | | 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" | [[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'' | ||
+ | |} | ||
− | |||
− | :'' | + | ===SendString=== |
+ | {| 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'' | ||
+ | |} | ||
− | ''' | + | ===SetBufferData=== |
+ | {| 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;" | '''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="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'' | ||
+ | |} | ||
− | |||
+ | ===SetDataRate=== | ||
+ | {| 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;" | '''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="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | |||
− | ''' | + | ===SetSyncPattern=== |
+ | {| 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'' | ||
+ | |} | ||
− | |||
− | |||
+ | ===TXTune=== | ||
+ | {| 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;" | '''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-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | :'' | + | ===Uninitialise=== |
+ | {| 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;" | '''Uninitialise''' | ||
+ | |- | ||
+ | | colspan="2" | Powers down the RF module. The module must be re-initialised before it can be used again. | ||
+ | |- | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
− | === | + | ===UpdateCenterFrequency=== |
− | + | {| 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;" | '''UpdateCenterFrequency''' | |
− | + | |- | |
− | + | | 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-u16-icon.png]] - UINT | |
− | + | | 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'' |
− | + | |} | |
− | |||
− | |||
− | |||
− | : | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | = | ||
− | |||
− | |||
− | ''' | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | = | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | == | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | : | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | = | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Property reference== | ==Property reference== | ||
− | |||
− | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |
− | + | |- | |
− | Module frequency - must be matched with the specific RF transciever being used. | + | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] |
− | + | | 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 | |
− | Specifies the default RF center frequency | + | |- |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | width="90%" | Channel | |
− | + | |- | |
− | + | | colspan="2" | SPI Channel selector | |
− | Calculation to work out the approx actual frequency | + | |- |
− | + | | 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. | |
− | + | |- | |
− | Specifies if the module will send data packets (Byte) or FSK bits (Bit) | + | | 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]] | |
− | Maximum number of bytes that can be loaded into a single data packet | + | | 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 | |
− | Data rate prescaler 1 - Coarse control | + | |- |
− | + | | 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 | |
− | + | |- | |
− | Data rate prescaler 2 - Fine control | + | | 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 | |
− | + | |- | |
− | + | |- | |
− | Calculated max data throughput if the data is 100% active | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] |
− | + | | width="90%" | Module Frequency | |
− | + | |- | |
− | + | | colspan="2" | Module frequency - must be matched with the specific RF transciever being used. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | Actual default value passed to the data rate control | + | | width="90%" | Center Frequency (96-3903) |
− | + | |- | |
− | + | | colspan="2" | Specifies the default RF center frequency | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-15-icon.png]] | |
− | + | | width="90%" | Center Frequency (MHz) | |
− | Default sync pattern used by the standard sync in byte data mode. | + | |- |
− | + | | colspan="2" | Calculation to work out the approx actual frequency | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | width="90%" | Data Mode | |
− | + | |- | |
− | Selects if an additional fixed sync byte is to be used. | + | | colspan="2" | Specifies if the module will send data packets (Byte) or FSK bits (Bit) |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | Data Buffer Size (Max) | |
− | + | |- | |
− | + | | colspan="2" | Maximum number of bytes that can be loaded into a single data packet | |
− | Controls the receiver bandwidth, the higher the value the bigger the datarate that can be acheived but the fewer channels that can co-exist | + | |- |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | width="90%" | Rate Divider 1 | |
− | + | |- | |
− | + | | colspan="2" | Data rate prescaler 1 - Coarse control | |
− | + | |- | |
− | Controls the receiver gain - the amount to amplify the incoming signal before processing | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] |
− | + | | width="90%" | Rate Divider 2 (0-127) | |
− | + | |- | |
− | + | | colspan="2" | Data rate prescaler 2 - Fine control | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-15-icon.png]] | |
− | The signal to noise threshold used to control the sensitivity | + | | width="90%" | Max Throughput (Kb/s) |
− | + | |- | |
− | + | | colspan="2" | Calculated max data throughput if the data is 100% active | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | |
− | + | | width="90%" | Data Rate Value | |
− | Controls the transmitter bandwidth, i.e. the frequency either side of the center frequency to use for the RF communications | + | |- |
− | + | | colspan="2" | Actual default value passed to the data rate control | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | Sync Pattern | |
− | + | |- | |
− | The amount of power to use when transmitting | + | | colspan="2" | Default sync pattern used by the standard sync in byte data mode. |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | width="90%" | Extended Sync | |
− | + | |- | |
− | + | | 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="90%" | Bandwidth | |
− | + | |- | |
− | + | | colspan="2" | Controls the receiver bandwidth, the higher the value the bigger the datarate that can be acheived but the fewer channels that can co-exist | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | width="90%" | Gain | |
− | + | |- | |
− | + | | colspan="2" | Controls the receiver gain - the amount to amplify the incoming signal before processing | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | width="90%" | Threshold | |
− | + | |- | |
− | + | | 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="90%" | Bandwidth | |
− | + | |- | |
− | + | | colspan="2" | Controls the transmitter bandwidth, i.e. the frequency either side of the center frequency to use for the RF communications | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | width="90%" | Power | |
− | + | |- | |
− | + | | colspan="2" | The amount of power to use when transmitting | |
− | + | |- | |
− | + | | 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" | Label used to help identify the component on the panel. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | ||
+ | | width="90%" | Scope Traces | ||
+ | |- | ||
+ | | colspan="2" | Selects if the scope traces are automatically generated or not | ||
+ | |- | ||
+ | | 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 | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | API | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |} |
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