SparkFun Forums 

Where electronics enthusiasts find answers.

All things pertaining to wireless and RF links
User avatar
By leon_heller
#34287
I have a MiRF V2 interfaced to a PIC16F88, using software SPI. Whenever I send a command to the nRF24L01 I don't seem to get anything sensible returned in the status register, which is the first byte returned. For instance, when I send 0xFF (NOP) I get 0x00 returned, and when I send 0x10 I get different values returned, each time the board is powered up, like 0x28, 0x2A and 0x2B. I think I should get the same value each time.

Leon
User avatar
By leon_heller
#34291
Thanks, Brennen

A loopback test works OK, and the code is based on some working C code.

I've tried a second MiRF V2 and that gives the same values. Also, whatever I write to address 0, I get all ones when reading back the data. There must be something wrong with the SPI, but I can't see it passing the loopback test if there was.

Leon
By brennen
#34292
If the loopback works, then the only issue you might have with MOSI and MISO is that they may be wired backwards. Depending on how you did your loopback, you may or may not be testing the CSN or CLK lines (my guess is not). About the only thing I can suggest is scope'ing out your lines to make sure they're behaving, or maybe even trying a hardware SPI if it's available. One other thing that could have you is that you may have an output connected up to your IRQ line which would short out the chip and cause it to not work. The CE line shouldn't really be a problem in any regard. One last thing is to make sure you have good voltage coming out of the regulator on the MiRF-v2.