i cannot send data using nRF24L01, data slways in fifo...

I want to send data out using nRF24L01(at89c51 control it).When call TX_Mode() function, the status’s TX_DS( SPI_Read(STATUS) ) is high,but the FIFO_STATUS’tx is 0, it’s mean “daa in (tx) fifo”, cant send data. Want to get help.

void TX_Mode(void)

{

CE=0;

SPI_Write_Buf(WRITE_REG + TX_ADDR, TX_ADDRESS, TX_ADR_WIDTH); // Writes TX_Address to nRF24L01

SPI_Write_Buf(WRITE_REG + RX_ADDR_P0, TX_ADDRESS, TX_ADR_WIDTH); // RX_Addr0 same as TX_Adr for Auto.Ack

SPI_Write_Buf(WR_TX_PLOAD, tx_buf, TX_PLOAD_WIDTH); // Writes data to TX payload

SPI_RW_Reg(WRITE_REG + EN_AA, 0x00); // Disable Auto.Ack:Pipe0

SPI_RW_Reg(WRITE_REG + EN_RXADDR, 0x01); // Enable Pipe0

SPI_RW_Reg(WRITE_REG + SETUP_RETR, 0x1a); // 500us + 86us, 10 retrans…//0x1a

SPI_RW_Reg(WRITE_REG + RF_CH,40); // Select RF channel 40

SPI_RW_Reg(WRITE_REG + RF_SETUP, 0x07); // TX_PWR:0dBm, Datarate:2Mbps, LNA:HCURR

SPI_RW_Reg(WRITE_REG + CONFIG, 0x0e); // Set PWR_UP bit, enable CRC(2 bytes) & Prim:TX. MAX_RT & TX_DS enabled…

CE=1;

You have to manually clear the TX_DS interrupt anytime it is asserted by writing a ‘1’ to bit STATUS.TX_DS.

brennen:
You have to manually clear the TX_DS interrupt anytime it is asserted by writing a ‘1’ to bit STATUS.TX_DS.

I did it, the problem still be there. A friend sugest me to change a new one, cause different 2401 with the same program in MCU can lead to different frequent of led flash. I think it must be broken when i measure the voltage between VCC and GND.

thank you for your help :slight_smile: