SparkFun Forums 

Where electronics enthusiasts find answers.

All things pertaining to wireless and RF links
By fgcity
#37538
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.
User avatar
By leon_heller
#37542
SFE has an example on their web page for the MiRF V2 for the 16F88 with C source code.

Leon
By fgcity
#37566
i know that, but will that code work for the nRF2401G ?
User avatar
By leon_heller
#37568
No, the 2401 doesn't have an SPI interface.

Leon
By fgcity
#37569
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?
By fgcity
#37609
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.
By fgcity
#37616
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 ?
By fgcity
#37635
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.
User avatar
By leon_heller
#37636
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
By fgcity
#37653
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.
By fgcity
#37656
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 :)

Sorry guys for bothering you with my stupid questions.
By fgcity
#37775
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 ?
User avatar
By leon_heller
#37776
Have a look at my C18 code, that definitely works.

Leon