Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to write payload array to NRF24L01+ ?

Status
Not open for further replies.

nofearbloubull

Newbie level 1
Joined
Feb 11, 2014
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
7
Hi,

i want to test simple RF Communication between 2 NRF's Module so i have just created a small setup with soft spi driver and some basic configuration like PRIM_Rx and paypload (default length 3 bytes).

Still communication is not possible between the Tx & RX so can anyone please confirm is the right way to load 3 bytes of payload from array or something else need to be written to write array data ? Please help.



Transmitting Payload code

Code:
void main()
{

uint8_t data_array[3];
nrf24_init();
__delay_ms(50);
nrf24_powerUpTx();
__delay_ms(10);
nrf24_csn_digitalwrite(LOW);
spi_transfer(FLUSH_TX);
nrf24_csn_digitalwrite(HIGH);

__delay_ms(10);

data_array[0] = 0x11;
data_array[1] = 0X12;
data_array[2] = 0x12;

while(1)
{

nrf24_send(data_array);  //nrf24_send is the subroutine
__delay_ms(15); // wait some time
}


}
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top