User Tools

Site Tools


en:pfw:wireless_communication_nrf24l01

nRF24L01+ 2.4GHz transceiver

The nRF24L01+ is a cheap 2.4GHz transceiver module with a low level part of the communication layer already in hardware available. Features of the nRF24L01+ are, adjustable auto retransmit, RF ACK handshake, a 1 to 32 byte payload with variable length (Dynamic Payload), Fifo of 3 deep, 125 selectable frequencies, adjustable output power, CRC, etc.

Bidirectional transmit & receive in action on the Egel kit nRF24 bidirectional test

Software

File load order for a test

  • SPI driver for your MPU on two boards
  • Adapted version of: basic 24L01dn G2553-01a.f file on two boards
  • One MPU board with: Transmit test.f See demo commands
  • And one MPU board with: Receive test.f

Load the Range checker G2553 usci.f on the boards when you want to check out busy channels or the placing of transceivers.
See here for a description of the words.

Basic nRF24L01+ commands

Command Stack Function
SPI-SETUP ( – ) Activate whole nRF24 SPI interface
SETUP24L01( – ) Initialise nRF24l01
TRON ( – ) Tracer active
TROFF ( – ) Tracer inactive
>RF ( db rate – )Set transmit strength & bitrate
>LENGTH ( +n – ) Set size of current payload
>PAY ( b +n – ) Store byte b at location +n of the payload
PAY> ( +n – b ) Read byte b from location +n of the payload
IRQ? ( – flag ) Leave true when an nRF24 interrupt has gone off
RESPONSE? ( – flag ) Wait a bit, exit & leave true when an IRQ was received
CE-HIGH ( – ) nRF24 to transmit modus
CE-LOW ( – ) nRF24 to receive or standby modus
XEMIT? ( c – +n ) Send byte c, +n are the transmit retries (max=10)
XEMIT ( c – ) Send byte c to addressed nRF24
XKEY ( – c ) Receive byte c that is addressed to me
SET-DEST ( +n – ) Set address of destination nRF24 to +n

Bidirectional demo commands

Command Stack Function
TRANSMIT1( +n – )Send a T every +n milliseconds, display answer
TEST1 ( – ) Send a T every 50 milliseconds, display answer
RECEIVER ( – ) Receive command, incr. counter & send it back

Range & disturbance test commands

Command Stack Function
CHECK ( – ) Check all available frequency channels
CARRIER( +n – ) Check only frequency channel +n
WAVE ( +n pwr – ) Send carrier on channel +n with strength pwr
PULSE ( +n pwr p – )Send carrier on channel +n with strength pwr in p millisec. pulses

Bidirectional transmit & receive test in action

A self constructing mesh network can be found here.

en/pfw/wireless_communication_nrf24l01.txt · Last modified: 2023-09-06 13:06 by 157.90.7.32