Difference between revisions of "Component: RF 2.4GHz (nRF24L01) (Wireless)"

From Flowcode Help
Jump to navigationJump to search
(XML import - Pre 8.0 release)
 
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
+
{| style="width:50%"
 
 
{| 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 (Release)
+
| 2.0
 
|-
 
|-
| width="20%" style="color: gray;" | Category
+
| width="20%" style="color:gray;" | Category
 
| Wireless
 
| Wireless
 
|}
 
|}
  
  
 
+
==RF 2.4GHz component==
==[[File:Component Icon 882b6951_9944_48cc_8989_6ebd3d91956f.png|Image]] RF 2.4GHz (nRF24L01) component==
 
 
A simple RF communications module based on the 2.4GHz nRF24L01 modules.
 
A simple RF communications module based on the 2.4GHz nRF24L01 modules.
  
==Examples==
+
==Component Pack==
''<span style="color:red;">No additional examples</span>''
 
  
 +
COMMSB
  
==Downloadable macro reference==
+
==Detailed description==
  
===<span style="font-weight: normal;"><u><tt>ReadRxByte</tt></u></span>===
 
Reads a single byte back from the local Rx buffer.
 
  
'''Parameters'''
 
  
:[[Variable Types|BYTE]] ''Index''
 
::Byte to read, range 0 - 31
 
  
  
'''Return value'''
 
  
:[[Variable Types|BYTE]]
 
  
  
===<span style="font-weight: normal;"><u><tt>WriteTxByte</tt></u></span>===
 
Reads a single byte to the local Tx buffer.
 
  
'''Parameters'''
 
  
:[[Variable Types|BYTE]] ''Index''
 
::Byte to read, range 0 - 31
 
  
:[[Variable Types|BYTE]] ''Value''
+
''No detailed description exists yet for this component''
  
 +
==Examples==
  
'''Return value'''
 
  
:''This call does not return a value''
 
  
  
===<span style="font-weight: normal;"><u><tt>FlushRx</tt></u></span>===
 
Tells the RF module to flush the contents of the receive buffer.
 
  
Returns the status from sending the command.
 
  
'''Parameters'''
 
  
:''This macro has no parameters''
 
  
  
'''Return value'''
 
  
:[[Variable Types|BYTE]]
 
  
  
===<span style="font-weight: normal;"><u><tt>ReadRxFifo</tt></u></span>===
+
''<span style="color:red;">No additional examples</span>''
Reads the Rx FIFO buffer into a local buffer.
 
  
Use the ReadBuffer macro to collect the individual data bytes.
 
  
'''Parameters'''
+
==Downloadable macro reference==
  
:[[Variable Types|BYTE]] ''NumBytes''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
::Number of bytes to try and read from the FIFO Range 1-32
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadRxByte'''
 +
|-
 +
| colspan="2" | Reads a single byte back from the local Rx buffer.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Index
 +
|-
 +
| colspan="2" | Byte to read, range 0 - 31&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
'''Return value'''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteTxByte'''
 +
|-
 +
| colspan="2" | Reads a single byte to the local Tx buffer.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Index
 +
|-
 +
| colspan="2" | Byte to read, range 0 - 31&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Value
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
:''This call does not return a value''
 
  
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''FlushRx'''
 +
|-
 +
| colspan="2" | Tells the RF module to flush the contents of the receive buffer. Returns the status from sending the command.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>WriteTxFifo</tt></u></span>===
 
Writes the contents of the local Tx buffer to the Transmit FIFO.
 
  
'''Parameters'''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadRxFifo'''
 +
|-
 +
| colspan="2" | Reads the Rx FIFO buffer into a local buffer. Use the ReadBuffer macro to collect the individual data bytes.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | NumBytes
 +
|-
 +
| colspan="2" | Number of bytes to try and read from the FIFO Range 1-32&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
:[[Variable Types|BYTE]] ''NumBytes''
 
::Number of bytes to write to the FIFO, Range 1 - 32
 
  
 +
{| 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;" | '''WriteTxFifo'''
 +
|-
 +
| colspan="2" | Writes the contents of the local Tx buffer to the Transmit FIFO.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | NumBytes
 +
|-
 +
| colspan="2" | Number of bytes to write to the FIFO, Range 1 - 32&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
'''Return value'''
 
  
:''This call does not return a value''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''FlushTx'''
 +
|-
 +
| colspan="2" | Tells the RF module to flush the contents of the transmit buffer. Returns the status from sending the command.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
===<span style="font-weight: normal;"><u><tt>FlushTx</tt></u></span>===
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Tells the RF module to flush the contents of the transmit buffer.
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckRX'''
 +
|-
 +
| colspan="2" | Check the Rx FIFO status register for any new data. Returns 0 = No data  Returns 1 = New data available&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
Returns the status from sending the command.
 
  
'''Parameters'''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadRegister'''
 +
|-
 +
| colspan="2" | Reads a single bytes from the selected register. Directly returns the value read back from the register.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Reg
 +
|-
 +
| colspan="2" | Register address to access&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
:''This macro has no parameters''
 
  
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTxMode'''
 +
|-
 +
| colspan="2" | Sets the module up ready to transmit data.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | PA0
 +
|-
 +
| colspan="2" | Pipe Address Bytes&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | PA1
 +
|-
 +
| colspan="2" | Pipe Address Bytes&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | PA2
 +
|-
 +
| colspan="2" | Pipe Address Bytes&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | PA3
 +
|-
 +
| colspan="2" | Pipe Address Bytes&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | PA4
 +
|-
 +
| colspan="2" | Pipe Address Bytes&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
'''Return value'''
 
  
:[[Variable Types|BYTE]]
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetRxMode'''
 +
|-
 +
| colspan="2" | Sets the module up ready to receive data.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | PA0
 +
|-
 +
| colspan="2" | Pipe Address Bytes&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | PA1
 +
|-
 +
| colspan="2" | Pipe Address Bytes&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | PA2
 +
|-
 +
| colspan="2" | Pipe Address Bytes&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | PA3
 +
|-
 +
| colspan="2" | Pipe Address Bytes&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | PA4
 +
|-
 +
| colspan="2" | Pipe Address Bytes&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
===<span style="font-weight: normal;"><u><tt>CheckRX</tt></u></span>===
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Check the Rx FIFO status register for any new data.
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteRegister'''
 +
|-
 +
| colspan="2" | Writes a single byte to the selected register. Returns the status of the write command.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Reg
 +
|-
 +
| colspan="2" | Register address to access&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Value
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
Returns 0 = No data
 
 
Returns 1 = New data available
 
 
'''Parameters'''
 
 
:''This macro has no parameters''
 
 
 
'''Return value'''
 
 
:[[Variable Types|BYTE]]
 
  
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>ReadRegister</tt></u></span>===
 
Reads a single bytes from the selected register.
 
  
Directly returns the value read back from the register.
 
 
'''Parameters'''
 
 
:[[Variable Types|BYTE]] ''Reg''
 
::Register address to access
 
 
 
'''Return value'''
 
 
:[[Variable Types|BYTE]]
 
 
 
===<span style="font-weight: normal;"><u><tt>SetTxMode</tt></u></span>===
 
Sets the module up ready to transmit data.
 
 
'''Parameters'''
 
 
:[[Variable Types|BYTE]] ''PA0''
 
::Pipe Address Bytes
 
 
:[[Variable Types|BYTE]] ''PA1''
 
::Pipe Address Bytes
 
 
:[[Variable Types|BYTE]] ''PA2''
 
::Pipe Address Bytes
 
 
:[[Variable Types|BYTE]] ''PA3''
 
::Pipe Address Bytes
 
 
:[[Variable Types|BYTE]] ''PA4''
 
::Pipe Address Bytes
 
 
 
'''Return value'''
 
 
:''This call does not return a value''
 
 
 
===<span style="font-weight: normal;"><u><tt>SetRxMode</tt></u></span>===
 
Sets the module up ready to receive data.
 
 
'''Parameters'''
 
 
:[[Variable Types|BYTE]] ''PA0''
 
::Pipe Address Bytes
 
 
:[[Variable Types|BYTE]] ''PA1''
 
::Pipe Address Bytes
 
 
:[[Variable Types|BYTE]] ''PA2''
 
::Pipe Address Bytes
 
 
:[[Variable Types|BYTE]] ''PA3''
 
::Pipe Address Bytes
 
 
:[[Variable Types|BYTE]] ''PA4''
 
::Pipe Address Bytes
 
 
 
'''Return value'''
 
 
:''This call does not return a value''
 
 
 
===<span style="font-weight: normal;"><u><tt>WriteRegister</tt></u></span>===
 
Writes a single byte to the selected register.
 
 
Returns the status of the write command.
 
 
'''Parameters'''
 
 
:[[Variable Types|BYTE]] ''Reg''
 
::Register address to access
 
 
:[[Variable Types|BYTE]] ''Value''
 
 
 
'''Return value'''
 
 
:[[Variable Types|BYTE]]
 
 
 
===<span style="font-weight: normal;"><u><tt>Initialise</tt></u></span>===
 
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.
 
 
'''Parameters'''
 
 
:''This macro has no parameters''
 
 
 
'''Return value'''
 
 
:[[Variable Types|UINT]]
 
 
 
 
==Simulation macro reference==
 
 
''This component does not contain any simulation macros''
 
  
  
 
==Property reference==
 
==Property reference==
<span style="font-weight: normal;"><u>RF Channel</u></span>
 
  
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''RFChannel''.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
Sets the RF channel from 0 - 127 = 2.4000GHz - 2.525GHz
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
Both the transmitter and receiver should be on the same channel to receive data.
+
|-
 
+
|-
<span style="font-weight: normal;"><u>Channel</u></span>
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | RF Settings
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_spi::CHANNEL''.
+
|-
 
+
|-
SPI Channel selector
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
+
| width="90%" | RF Channel
<span style="font-weight: normal;"><u>Prescale</u></span>
+
|-
 
+
| colspan="2" | Sets the RF channel from 0 - 127 = 2.4000GHz - 2.525GHz Both the transmitter and receiver should be on the same channel to receive data. &nbsp;
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_spi::PR_SCALE''.
+
|-
 
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
Prescale option selector
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
 
+
|-
<span style="font-weight: normal;"><u>MOSI</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
This property is of type ''Single digital pin'' and can be referenced with the variable name ''cal_spi::MOSI''.
+
| width="90%" | Channel
 
+
|-
SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode.
+
| colspan="2" | SPI Channel selector&nbsp;
 
+
|-
<span style="font-weight: normal;"><u>MISO</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
+
| width="90%" | Prescale
This property is of type ''Single digital pin'' and can be referenced with the variable name ''cal_spi::MISO''.
+
|-
 
+
| colspan="2" | Prescale option selector&nbsp;
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]]
<span style="font-weight: normal;"><u>CLK</u></span>
+
| width="90%" | MOSI
 
+
|-
This property is of type ''Single digital pin'' and can be referenced with the variable name ''cal_spi::CLK''.
+
| colspan="2" | SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode.&nbsp;
 
+
|-
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%" | MISO
<span style="font-weight: normal;"><u>CS / SS</u></span>
+
|-
 
+
| colspan="2" | SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode.&nbsp;
This property is of type ''Single digital pin'' and can be referenced with the variable name ''cal_spi::SS''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
Chip Select / Slave Select Pin  
+
| width="90%" | CLK
 
+
|-
Master Mode: General purpose output pin used to select the remote SPI device.
+
| colspan="2" | SPI Clock Pin CLK - The Clock signal is driven by the SPI master.&nbsp;
 
+
|-
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%" | CS / SS
<span style="font-weight: normal;"><u>CE Pin</u></span>
+
|-
 
+
| 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. &nbsp;
This property is of type ''Single digital pin'' and can be referenced with the variable name ''ce_pin''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
Chip enable, configures RX or TX mode
+
| width="90%" | CE Pin
 
+
|-
<span style="font-weight: normal;"><u>Label</u></span>
+
| colspan="2" | Chip enable, configures RX or TX mode&nbsp;
 
+
|-
This property is of type ''Line of text'' and can be referenced with the variable name ''label''.
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
Label used to help identify the component on the panel.
+
|-
 
+
|-
<span style="font-weight: normal;"><u>Scope Traces</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 
+
| width="90%" | Label
This property is of type ''True or false'' and can be referenced with the variable name ''cal_spi::ScopeTraces''.
+
|-
 
+
| colspan="2" | Label used to help identify the component on the panel.&nbsp;
Selects if the scope traces are automatically generated or not
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
<span style="font-weight: normal;"><u>Console Data</u></span>
+
| width="90%" | Scope Traces
 
+
|-
This property is of type ''True or false'' and can be referenced with the variable name ''cal_spi::ConsoleData''.
+
| colspan="2" | Selects if the scope traces are automatically generated or not&nbsp;
 
+
|-
Selects if the console data is automatically generated or not
+
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
+
| width="90%" | Console Data
<span style="font-weight: normal;"><u>Injector</u></span>
+
|-
 
+
| colspan="2" | Selects if the console data is automatically generated or not&nbsp;
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_spi::Injector''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
''<span style="color:red;">No additional information</span>''
+
| width="90%" | API
 +
|-
 +
| colspan="2" | &nbsp;
 +
|}

Latest revision as of 17:27, 9 November 2022

Author Matrix Ltd.
Version 2.0
Category Wireless


RF 2.4GHz component

A simple RF communications module based on the 2.4GHz nRF24L01 modules.

Component Pack

COMMSB

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable macro reference

Fc9-comp-macro.png ReadRxByte
Reads a single byte back from the local Rx buffer. 
Fc9-u8-icon.png - BYTE Index
Byte to read, range 0 - 31 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png WriteTxByte
Reads a single byte to the local Tx buffer. 
Fc9-u8-icon.png - BYTE Index
Byte to read, range 0 - 31 
Fc9-u8-icon.png - BYTE Value
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png FlushRx
Tells the RF module to flush the contents of the receive buffer. Returns the status from sending the command. 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png ReadRxFifo
Reads the Rx FIFO buffer into a local buffer. Use the ReadBuffer macro to collect the individual data bytes. 
Fc9-u8-icon.png - BYTE NumBytes
Number of bytes to try and read from the FIFO Range 1-32 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png WriteTxFifo
Writes the contents of the local Tx buffer to the Transmit FIFO. 
Fc9-u8-icon.png - BYTE NumBytes
Number of bytes to write to the FIFO, Range 1 - 32 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png FlushTx
Tells the RF module to flush the contents of the transmit buffer. Returns the status from sending the command. 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png CheckRX
Check the Rx FIFO status register for any new data. Returns 0 = No data Returns 1 = New data available 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png ReadRegister
Reads a single bytes from the selected register. Directly returns the value read back from the register. 
Fc9-u8-icon.png - BYTE Reg
Register address to access 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png SetTxMode
Sets the module up ready to transmit data. 
Fc9-u8-icon.png - BYTE PA0
Pipe Address Bytes 
Fc9-u8-icon.png - BYTE PA1
Pipe Address Bytes 
Fc9-u8-icon.png - BYTE PA2
Pipe Address Bytes 
Fc9-u8-icon.png - BYTE PA3
Pipe Address Bytes 
Fc9-u8-icon.png - BYTE PA4
Pipe Address Bytes 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetRxMode
Sets the module up ready to receive data. 
Fc9-u8-icon.png - BYTE PA0
Pipe Address Bytes 
Fc9-u8-icon.png - BYTE PA1
Pipe Address Bytes 
Fc9-u8-icon.png - BYTE PA2
Pipe Address Bytes 
Fc9-u8-icon.png - BYTE PA3
Pipe Address Bytes 
Fc9-u8-icon.png - BYTE PA4
Pipe Address Bytes 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png WriteRegister
Writes a single byte to the selected register. Returns the status of the write command. 
Fc9-u8-icon.png - BYTE Reg
Register address to access 
Fc9-u8-icon.png - BYTE Value
 
Fc9-u8-icon.png - BYTE Return


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-u16-icon.png - UINT Return



Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png RF Settings
Fc9-type-21-icon.png RF Channel
Sets the RF channel from 0 - 127 = 2.4000GHz - 2.525GHz Both the transmitter and receiver should be on the same channel to receive data.  
Fc9-conn-icon.png Connections
Fc9-type-16-icon.png Channel
SPI Channel selector 
Fc9-type-16-icon.png Prescale
Prescale option 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 CE Pin
Chip enable, configures RX or TX mode 
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