hi guys
i have a nrf24l01 module and i am using it together with a pic18f45k20 and MickroC development tool.
here is the issue: i use flush RX command, the RX_EMPTY flag tells me it is empty, but the data that i read remains the first value that was first read.
for example, if i send 3,2,5,1,6 , i receive the same data, but after i flash RX, if i want to read again, it gives me 3 3 3 3 3.
powerDown();
flushRX();
powerUP_RX();
//standby mode
enable();
//RX mode
delay_ms(2000); //wait for the transmition to take place (i send 9 integer numbers)
powerDown();
Chip_Select = 0 ;
SPI1_Write(0x61); //R_RX_PAYLOAD from RX FIFO
for(i=0;i<=8;i++) // read the 9 integers sent
{
read[i]= SPI1_Read(0xFF); //send 0xFF dummy byte to generare de SPI CLK
}
Chip_Select = 1 ;
for(i=0;i<=8;i++){ //dispaly on the LCD.
GLCD_Fill(0x00);
IntToStr(read[i],value);
GLCD_Write_Text(value,40,4,1);
Delay_ms(50);}
if i transmit data, i get the good values. if i reset just the microcontroller and don’t transmit anything, i get the first value that was send before reset in all the 9 values that i try to receive. If i reset the nrf24l01, RX_FIFO flushes and it’s ok.
please help me