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

From Flowcode Help
Jump to navigationJump to search
(XML import - Pre 8.0 release)
 
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==
+
==Detailed description==
''<span style="color:red;">No additional examples</span>''
 
  
 +
''No detailed description exists yet for this component''
  
==Downloadable macro reference==
+
==Examples==
  
===<span style="font-weight: normal;"><u><tt>ReadRxByte</tt></u></span>===
 
Reads a single byte back from the local Rx buffer.
 
  
'''Parameters'''
+
''<span style="color:red;">No additional examples</span>''
  
:[[Variable Types|BYTE]] ''Index''
 
::Byte to read, range 0 - 31
 
  
 +
==Downloadable macro reference==
  
'''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;" | '''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''
 +
|}
  
:[[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;" | '''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''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>WriteTxByte</tt></u></span>===
 
Reads a single byte to the local Tx buffer.
 
  
'''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;" | '''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''
 +
|}
  
:[[Variable Types|BYTE]] ''Index''
 
::Byte to read, range 0 - 31
 
  
:[[Variable Types|BYTE]] ''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;" | '''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''
 +
|}
  
  
'''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;" | '''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''
 +
|}
  
:''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>FlushRx</tt></u></span>===
 
Tells the RF module to flush the contents of the receive buffer.
 
  
Returns the status from sending the command.
+
{| 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;" | '''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''
 +
|}
  
'''Parameters'''
 
  
:''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;" | '''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''
 +
|}
  
  
'''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;" | '''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''
 +
|}
  
:[[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>ReadRxFifo</tt></u></span>===
 
Reads the Rx FIFO buffer into a local buffer.
 
  
Use the ReadBuffer macro to collect the individual data bytes.
+
{| 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;" | '''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''
 +
|}
  
'''Parameters'''
 
  
:[[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;" | '''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''
 +
|}
  
  
'''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;" | '''AutoMoveToPositionInt'''
 +
|-
 +
| colspan="2" | Automatically moves towards the new 16-bit position at a fixed rate determined by the AutoMoveSpeed.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Channel
 +
|-
 +
| colspan="2" | The channel to assign the new position. Range: 0-7&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | Position
 +
|-
 +
| colspan="2" | Position to automatically move to. Range: 0-65535&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;" | '''Initialise'''
 +
|-
 +
| colspan="2" | Sets up the servo motor interrupts&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>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;" | '''WriteLEDs'''
 +
|-
 +
| colspan="2" | Allows control of all 8-LEDs on the front of the Formula Flowcode.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | LED_Byte
 +
|-
 +
| 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''
 +
|}
  
:[[Variable Types|BYTE]] ''NumBytes''
 
::Number of bytes to write to the FIFO, Range 1 - 32
 
  
 
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
'''Return value'''
+
|-
 
+
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
:''This call does not return a value''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 +
|-
 +
| colspan="2" | Starts up the formula flowcode PWM for motor control and performs the wait for button press&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>FlushTx</tt></u></span>===
 
Tells the RF module to flush the contents of the transmit 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>CheckRX</tt></u></span>===
 
Check the Rx FIFO status register for any new data.
 
 
Returns 0 = No data
 
 
Returns 1 = New data available
 
 
'''Parameters'''
 
 
:''This macro has no parameters''
 
 
 
'''Return value'''
 
 
:[[Variable Types|BYTE]]
 
 
 
===<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" | [[File:Fc9-type-21-icon.png]]
 
+
| width="90%" | RF Channel
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_spi::CHANNEL''.
+
|-
 
+
| 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;
SPI Channel selector
+
|-
 
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
<span style="font-weight: normal;"><u>Prescale</u></span>
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''  
 
+
|-
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" | [[File:Fc9-type-16-icon.png]]
Prescale option selector
+
| width="90%" | Channel
 
+
|-
<span style="font-weight: normal;"><u>MOSI</u></span>
+
| colspan="2" | SPI Channel selector&nbsp;
 
+
|-
This property is of type ''Single digital pin'' and can be referenced with the variable name ''cal_spi::MOSI''.
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
+
| width="90%" | Prescale
SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode.
+
|-
 
+
| colspan="2" | Prescale option selector&nbsp;
<span style="font-weight: normal;"><u>MISO</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
This property is of type ''Single digital pin'' and can be referenced with the variable name ''cal_spi::MISO''.
+
| width="90%" | MOSI
 
+
|-
SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode.
+
| colspan="2" | SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode.&nbsp;
 
+
|-
<span style="font-weight: normal;"><u>CLK</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
+
| width="90%" | MISO
This property is of type ''Single digital pin'' and can be referenced with the variable name ''cal_spi::CLK''.
+
|-
 
+
| colspan="2" | SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) 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]]
<span style="font-weight: normal;"><u>CS / SS</u></span>
+
| width="90%" | CLK
 
+
|-
This property is of type ''Single digital pin'' and can be referenced with the variable name ''cal_spi::SS''.
+
| colspan="2" | SPI Clock Pin CLK - The Clock signal is driven by the SPI master.&nbsp;
 
+
|-
Chip Select / Slave Select Pin  
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
+
| width="90%" | CS / SS
Master Mode: General purpose output pin used to select the remote SPI device.
+
|-
 
+
| 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;
Slave Mode: Hardware chip select pin input used to select the SPI device.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
<span style="font-weight: normal;"><u>CE Pin</u></span>
+
| width="90%" | CE Pin
 
+
|-
This property is of type ''Single digital pin'' and can be referenced with the variable name ''ce_pin''.
+
| colspan="2" | Chip enable, configures RX or TX mode&nbsp;
 
+
|-
Chip enable, configures RX or TX mode
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''  
<span style="font-weight: normal;"><u>Label</u></span>
+
|-
 
+
|-
This property is of type ''Line of text'' and can be referenced with the variable name ''label''.
+
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 
+
| width="90%" | Label
Label used to help identify the component on the panel.
+
|-
 
+
| colspan="2" | Label used to help identify the component on the panel.&nbsp;
<span style="font-weight: normal;"><u>Scope Traces</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
This property is of type ''True or false'' and can be referenced with the variable name ''cal_spi::ScopeTraces''.
+
| width="90%" | Scope Traces
 
+
|-
Selects if the scope traces are automatically generated or not
+
| colspan="2" | Selects if the scope traces are automatically generated or not&nbsp;
 
+
|-
<span style="font-weight: normal;"><u>Console Data</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
+
| width="90%" | Console Data
This property is of type ''True or false'' and can be referenced with the variable name ''cal_spi::ConsoleData''.
+
|-
 
+
| colspan="2" | Selects if the console data is automatically generated or not&nbsp;
Selects if the console data is automatically generated or not
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
<span style="font-weight: normal;"><u>Injector</u></span>
+
| width="90%" | API
 
+
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_spi::Injector''.
+
| colspan="2" | &nbsp;
 
+
|}
''<span style="color:red;">No additional information</span>''
 

Revision as of 21:05, 16 November 2021

Author Matrix Ltd.
Version 2.0
Category Wireless


RF 2.4GHz component

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

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


Fc9-comp-macro.png AutoMoveToPositionInt
Automatically moves towards the new 16-bit position at a fixed rate determined by the AutoMoveSpeed. 
Fc9-u8-icon.png - BYTE Channel
The channel to assign the new position. Range: 0-7 
Fc9-u16-icon.png - UINT Position
Position to automatically move to. Range: 0-65535 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Initialise
Sets up the servo motor interrupts 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png WriteLEDs
Allows control of all 8-LEDs on the front of the Formula Flowcode. 
Fc9-u8-icon.png - BYTE LED_Byte
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Initialise
Starts up the formula flowcode PWM for motor control and performs the wait for button press 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
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 Simulations
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