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

NRF24L01+ ack payload setting

Hi, after a deep study of Datasheet I was finally able to have two 24L01+ talk to each other with a PIC18 program. Now I need to make a step further using ACK Payload since the PRX should send a 1 byte payload to PTX with commands...and here I'm lost.

I set on the PRX side: DYNPD = 0x01 ;Enable dynamic payload length data pipe 0. FEATURE = 0x06 ;EN_DPL + EN_ACK_PAY tx_ack_payload_len = 1

I set on the PTX side: rx_payload_len = 1

1° question: should I set DYNPD = 0x01 ;Enable dynamic payload length data pipe 0. FEATURE = 0x06 ;EN_DPL + EN_ACK_PAY even on the PTX ?

2° question: When I must send the write_ack_payload command to the PRX ? After receiving the PTX payload (but at that time, the ACK+payload sould have been already sent, right?), or before, while waiting to receive a payload?

I tried several different combinations, but they are too much, and none worked. Actually, enabling the ACK+PLD the PRX does not receive anymore.

I understand my questions are a little confusing, but they reflect my totally lost mind. I think a little piece of code in any language, with regs configuration and instructions, could help me. Thanks

Related