Component: RF Transceiver (nRF24L01) (Wireless): Difference between revisions
Appearance
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;"" to "width="10%" align="center" class="mtx-class-macrohead"" |
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead"" |
||
| Line 69: | Line 69: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''CheckRX''' | ||
|- | |- | ||
| colspan="2" | Check the Rx FIFO status register for any new data. Returns 0 = No data Returns 1 = New data available | | colspan="2" | Check the Rx FIFO status register for any new data. Returns 0 = No data Returns 1 = New data available | ||
| Line 83: | Line 83: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''FlushRx''' | ||
|- | |- | ||
| colspan="2" | Tells the RF module to flush the contents of the receive buffer. Returns the status from sending the command. | | colspan="2" | Tells the RF module to flush the contents of the receive buffer. Returns the status from sending the command. | ||
| Line 97: | Line 97: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''FlushTx''' | ||
|- | |- | ||
| colspan="2" | Tells the RF module to flush the contents of the transmit buffer. Returns the status from sending the command. | | colspan="2" | Tells the RF module to flush the contents of the transmit buffer. Returns the status from sending the command. | ||
| Line 111: | Line 111: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''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. | | 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. | ||
| Line 125: | Line 125: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadRegister''' | ||
|- | |- | ||
| colspan="2" | Reads a single bytes from the selected register. Directly returns the value read back from the register. | | colspan="2" | Reads a single bytes from the selected register. Directly returns the value read back from the register. | ||
| Line 144: | Line 144: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadRxArray''' | ||
|- | |- | ||
| colspan="2" | Reads an array of bytes back from the local Rx buffer. | | colspan="2" | Reads an array of bytes back from the local Rx buffer. | ||
| Line 168: | Line 168: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadRxByte''' | ||
|- | |- | ||
| colspan="2" | Reads a single byte back from the local Rx buffer. | | colspan="2" | Reads a single byte back from the local Rx buffer. | ||
| Line 187: | Line 187: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadRxFifo''' | ||
|- | |- | ||
| colspan="2" | Reads the Rx FIFO buffer into a local buffer. Use the ReadBuffer/ReadArray macros to collect the individual data bytes. | | colspan="2" | Reads the Rx FIFO buffer into a local buffer. Use the ReadBuffer/ReadArray macros to collect the individual data bytes. | ||
| Line 201: | Line 201: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetRxMode''' | ||
|- | |- | ||
| colspan="2" | Sets up the module up ready to receive data. Assigns the 5-byte pipe listen address. | | colspan="2" | Sets up the module up ready to receive data. Assigns the 5-byte pipe listen address. | ||
| Line 240: | Line 240: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetTxMode''' | ||
|- | |- | ||
| colspan="2" | Sets the module up ready to transmit data. Assigns the 5-byte pipe transmit address. | | colspan="2" | Sets the module up ready to transmit data. Assigns the 5-byte pipe transmit address. | ||
| Line 279: | Line 279: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''WriteRegister''' | ||
|- | |- | ||
| colspan="2" | Writes a single byte to the selected register. Returns the status of the write command. | | colspan="2" | Writes a single byte to the selected register. Returns the status of the write command. | ||
| Line 303: | Line 303: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''WriteTxArray''' | ||
|- | |- | ||
| colspan="2" | Writes an array of bytes to the local Tx buffer. | | colspan="2" | Writes an array of bytes to the local Tx buffer. | ||
| Line 327: | Line 327: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''WriteTxByte''' | ||
|- | |- | ||
| colspan="2" | Writes a single byte to the local Tx buffer. | | colspan="2" | Writes a single byte to the local Tx buffer. | ||
| Line 351: | Line 351: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''WriteTxFifo''' | ||
|- | |- | ||
| colspan="2" | Writes the contents of the local Tx buffer to the Transmit FIFO and transmits. Returns 1 if transmission was sucessful. | | colspan="2" | Writes the contents of the local Tx buffer to the Transmit FIFO and transmits. Returns 1 if transmission was sucessful. | ||
| Line 366: | Line 366: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
Revision as of 14:23, 13 July 2026
| Author | Matrix Ltd. |
| Version | 9.0 |
| Category | Wireless |
RF Transceiver (nRF24L01) component
A simple RF communications module based on the 2.4GHz nRF24L01 transceivermodules.
Version information
Library Version, Component Version, Date, Author, Info 9, 9.0, 08-11-24, MW, added missing icon
Detailed description
No detailed description exists yet for this component
Examples
Example program transmitting a count value, echoing the count and TX status to the UART for debugging.
Example program receiving a value, echoing any received values to the UART for debugging.
Macro reference
CheckRX
| CheckRX | |
| Check the Rx FIFO status register for any new data. Returns 0 = No data Returns 1 = New data available | |
| Return | |
FlushRx
| FlushRx | |
| Tells the RF module to flush the contents of the receive buffer. Returns the status from sending the command. | |
| Return | |
FlushTx
| FlushTx | |
| Tells the RF module to flush the contents of the transmit buffer. Returns the status from sending the command. | |
| Return | |
Initialise
ReadRegister
| ReadRegister | |
| Reads a single bytes from the selected register. Directly returns the value read back from the register. | |
| Reg | |
| Register address to access | |
| Return | |
ReadRxArray
| ReadRxArray | |
| Reads an array of bytes back from the local Rx buffer. | |
| Data | |
| Byte array to store the received data | |
| NumBytes | |
| Range: 1-32 | |
| Return | |
ReadRxByte
| ReadRxByte | |
| Reads a single byte back from the local Rx buffer. | |
| Index | |
| Byte to read, range 0 - 31 | |
| Return | |
ReadRxFifo
| ReadRxFifo | |
| Reads the Rx FIFO buffer into a local buffer. Use the ReadBuffer/ReadArray macros to collect the individual data bytes. | |
| Return | |
SetRxMode
SetTxMode
WriteRegister
| WriteRegister | |
| Writes a single byte to the selected register. Returns the status of the write command. | |
| Reg | |
| Register address to access | |
| Value | |
| Return | |
WriteTxArray
| WriteTxArray | |
| Writes an array of bytes to the local Tx buffer. | |
| Data | |
| Byte array to write. | |
| NumBytes | |
| Range: 1-32 | |
| Return | |
WriteTxByte
| WriteTxByte | |
| Writes a single byte to the local Tx buffer. | |
| Index | |
| Byte to read, range 0 - 31 | |
| Value | |
| Return | |
WriteTxFifo
| WriteTxFifo | |
| Writes the contents of the local Tx buffer to the Transmit FIFO and transmits. Returns 1 if transmission was sucessful. | |
| Return | |
Property reference
Component Source Code
Please click here to download the component source project: FC_Comp_Source_nRF24L01.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_nRF24L01.fcfx