How to check that a nRF24L01 is initialized and working

Discussion about wireless devices

How to check that a nRF24L01 is initialized and working

Postby KoryBricker » Fri Apr 10, 2009 9:43 pm

Hi,
I'm trying to setup a nRF24L01 (using a SparkFun breakout board) and PIC 18F4550. I'm using the code from Tutorial 1 and modified it slightly to account for the different pin connections and adjusted the delays for my 20Mhz crystal (I'm planning on using this in conjunction with USB later so I would like to keep the 20Mhz instead of switching it to 10Mhz like in the tutorial).

I'm having a problem in that the interupt pin goes high right after the pins are assigned and the CSN bit is set and then it never goes low after calling nrf24l01_write_tx_payload(...).

Can anyone suggest a very basic way to tell that the interface between the nRF24L01 and 18F4550 is actually working? I may be going about this wrong but I am trying to get take baby steps here and get one up and running just basically transmitting packets ignoring that there is nothing on the other side receiving them. Or is it possibly not working because there isn't anything on the other side receiving the packets?

So as I mentioned I'm basically just looking for some way to verify that the nRF24L01 and 18F4550 are setup and communicating correctly before actually moving on to trying to get the full round trip 18F4550 ->nRF24L01->nRF24L01->18F4550 link. Are there any basic settings or information I can try reading from the nRF24L01 to verify the SPI link is working. I'm trying to read and understand the nRF24L01 spec but in a little over my head right now.
KoryBricker
 
Posts: 2
Joined: Fri Apr 10, 2009 9:22 pm

Re: How to check that a nRF24L01 is initialized and working

Postby smartie_on_computer » Sun Apr 12, 2009 6:44 am

im also using a pic 18f4550 with a 20mhz crystal, but i have already implemented a usb interface and i've noticed that my clock speed is actully 48mhz instead of 20mhz due to the clock multiplier and divider.

make sure your clock speed is correct and if it is 48mhz then u may need to edit the delays and spi control due to that
smartie_on_computer
 
Posts: 11
Joined: Sun Aug 24, 2008 9:17 am

Re: How to check that a nRF24L01 is initialized and working

Postby brennen » Mon Apr 13, 2009 12:46 pm

I made a post with step-by-step instructions on getting a new chip up and running. Check out that post here.
brennen
Site Admin
 
Posts: 395
Joined: Sun Aug 17, 2008 2:15 pm


Return to Wireless

Who is online

Users browsing this forum: No registered users and 1 guest

cron