Component: RF ISM (EB063, MRF49XA) (Wireless)

From Flowcode Help
Jump to navigationJump to search
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