nRF24L01 & nRF2401

Hi everyone.

I have the Transceiver Development Node with the nRF2401G Tranciever module.

And i have a custom board with the nRF24L01 tranciever.

What i wanted to ask is if there is a compiled HEX file anywhere which i could upload onto the Transceiver Development Node and test my Custom board.

Also what things should i have in mind when writing code for the nRF24L01?

i mean Timing wise. Where should i have my delays and such.

I have worked with the nRF2401G but from what i can see on the datasheet of the nRF24L01 are some differences in the code.

Any help would be really appriciated.

SFE has an example on their web page for the MiRF V2 for the 16F88 with C source code.

Leon

i know that, but will that code work for the nRF2401G ?

No, the 2401 doesn’t have an SPI interface.

Leon

in the Zip file there are 3 HEX files.

1.24L01 BASE

2.24L01 Remote

3.2401 test 24L01

In the 2401 test 24L01 from the code i can see that the configuration and the interface is for the 2401 chip.

so if i upload that code into the Dev board i should be able to recieve data from 24L01. Correct ?

The configuration sets the 2401 to 1MB with the same 5 byte address and same channel.

Am i correct here?

please guys, i am having a real problem communicating between the two IC’s

Could please someone tell me what configurations should i have on one and the other RF chips to be able to talk to each other.

It tells you in Appendix B of the new datasheet for the 24L01 the settings necessary to communicate between 24L01 and 2401 devices. You should probably give that a read.

look guys.

I’m taking as an example the Demo code from Sparkfun.

But i hot confused allot with it and what it says on the datasheet.

For example.

Set “Config” Register

on the datasheet it says:

Bit 0 → PRIM_RX (0:PTX)

Bit 1 → PWR_UP (1:Power Up)

and so on

so in the C. File they have the config:

cmd = 0x20;

data = 0x38; // PTX, CRC enabled, mask a couple of int

0x38 = %00111000

which is OK.

But then in the Datarate (in C file) they say

cmd = 0x26;

data = 0x07; //data rate = 1MB

0x07 = %00000111

But on the data sheet it says bit 7:5 Only “0” allowed

so it’s backwards in the C file.

So which one is it ?

bit → 76543210

val ->00000111

As you can see, this value does have zeroes in bit positions [7:5]. Bits are ordered with the highest number as the most significant position (i.e., the left-most bit).

has anyone else communicated between the 2 Rf trancievers?

i tried all configurations possible:

Address with 40 bit - Address with 40 bit

16bit CRC - 16 bit CRC, 8 bit CRC - 8 bit CRC

1MB - 1MB

what could be wrong here?

if someone has done this then please tell me your configuration for both IC’s so i could try it. I’m pretty desperate here.

Here is my C18 code based on the SFE 16F88 code:

http://www.leonheller.com/MiRF%20V2/MIRF%20V2.zip

It’s for a pair of MiRF V2 modules but the configurations should work on the nRF2401. It might help you.

Leon

Tnx for the code. I really appriciate it.

I think my nRF24L01 is transmitting fine.(not sure)

but i can’t get the nRF2401 to recieve anything.

I followed the configuration on the datasheet and still nothing.

i currently have them both work with 3 byte Address, same channel, same datarate, same CRC.(16 bit)

And my cercuit is pretty simple (no way it’s wrong)

I am doing this on a PIC16F88 and i can see on the oscilloscope that the signals are going to the nRF24L01 but i don’t get anything on nRF2401 (it works file- it’s the development kit from Sparkfun)

What could be wrong here guys ? I mean i even had the antennas of both of them almost touching each other so it’s not a matter of antenna configuration.

HEHE, This is going to sound REALLLY stupid.

In all my thinkig and debugging i forgot to check the simplest thing.

The XTAL (16Mhz) was reversed. I always had this problem. You see the text on the Crystal and you think that that’s the same Pin Schema as the IC’s. I always had to check the datasheet for this tiny thing to get it right :slight_smile:

Sorry guys for bothering you with my stupid questions.

ok, the crystal was not the problem,

I have followed the Sample code a couple of times and i have found that the transmitter part is transmitting. I just can’t get the thing to REcieve.

I am now testing two the same chips nRF24L01.

I have debugged the problem on the IRQ_DR.

It seems to stay HIGH no matter what i do.

if i just keave the transmitting code then everything is OK.

But when i put in the reciever code the IRQ_DR stays HIGH, i tried flushing the int, resetting the chip, nothing.

so just to make sure.

When CE is low and i pulse it (for 10ms) then the data that i have ported into the FIFO transmits.

Now on the reciever end i have to set CE high ONLY for 200ms so that the chip has time to recieve the data and set the IRQ high and then i set it back to LOW again and clock out the data.

Is this correct ?

so the reason for IRQ staying high could be that i don’t clear the FIFO after i read the data ? or because i have CE high i can’t clear the FIFO and reset the INT sonce resetting the INT could only be done in Standby (CE low) ?

i know this is propably all on the datasheet, it’s just that i don’t see it.

Please help out here.

What is the Sequence of setting CE low and high to have everything working ?

Have a look at my C18 code, that definitely works.

Leon

At the receiver, you should leave CE high all the time (unless you’re doing some sort of power management scheme). You would only bring CE low once you’ve received a packet and your reading it into your micro. Then you would set CE high again once you read out the packet. If you don’t do it this way, you are likely to miss a lot of packets because the 24L01 can only receive packets when CE is high.

where could i find this code Leon ?

got it, tnx. I’ll give it a try.