This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF24L01 sending but not receiving data

Hi I have been trying to get two NRF24L01 chips communicate with each other since a week now, without much success. All what I can find on the net is Arduino examples using RF24.h library. I am not using Arduino.

The transmitter chip is transmitting a single byte data, however the receiver is not being able to receive the data. Although the carrier detect flag on the receiver side goes high each time the transmitter transmits. I am not using any library and also I have disabled the auto acknowledgement feature.

Here is the sequence on the receiver:

CE_Write(0);

SPIM_1_PutArray(PowerUp, 2);        CyDelay(40);        // Power up, disable CRC and set as PRX
SPIM_1_PutArray(PowerUp, 2);        CyDelay(40);        // Power up, disable CRC and set as PRX
SPIM_1_PutArray(Set_Feature, 2);    CyDelay(40);        // Set feature for enabling W_TX_PAYLOAD_NOACK
SPIM_1_PutArray(AA_Feature, 2);     CyDelay(40);        // Activate features
SPIM_1_PutArray(RX_PW_P0, 2);       CyDelay(40);        // Set payload width for pipe 0 to 1 byte
SPIM_1_PutArray(AW, 2);             CyDelay(40);        // Specify Address width to 3 bytes
SPIM_1_PutArray(TX_ADD, 4);         CyDelay(80);        // Transmitter address
SPIM_1_PutArray(RX_ADR_PO, 4);      CyDelay(80);        // Receiver address on pipe 0
SPIM_1_PutArray(EN_AA_P0, 2);       CyDelay(80);        // Disable auto caknowledgement on all pipes 
SPIM_1_PutArray(RF_CH, 2);          CyDelay(80);        // Set RF channel to ch 1
SPIM_1_PutArray(E_RX_ADD, 2);       CyDelay(80);        // Enable pipe 0 for receiving
SPIM_1_PutArray(RF_SETUP, 2);       CyDelay(80);        // Air data rate = 1Mbps, RF Power = 0db

CE_Write(1); SPIM_1_PutArray(R_RX, 2); rx = SPIM_1_ReadRxData(); rx = SPIM_1_ReadRxData();

What am I missing? Please tell me a basic code code to transmit and receive a single byte data without using any dedicated library. I will be very very very thankful!

Thanks in advance!

Parents Reply Children
No Data
Related