This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF24L01+ SPI settings

Dear sirs, I've had a difficult time establishing communication between my nRF24L01+ board and the SPI bus on my Arduino Uno R3 microcontroller. Could you please provide me with a snippet of code that would read the status register? Also, I read elsewhere about communication failure due to a voltage regulator. Is there some way I might stabilize the SPI bus pins to prevent intermittent performance glitches?

  • Hi

    Have you tried one of the many nRF24L01+ Arduino drivers, such as this one?

    Reading the STATUS register is actually really simple, since the value of this register is returned on the first read byte, regardless of which SPI command you use.

    This means that if you just clock out 0x00 on the MISO line (command for reading the CONFIG register (reg 0) ) you should see 0x0E come back, which is the default value of STATUS. If you don't see any toggling on the MISO line it is usually a sign that the pins aren't wired up properly.

    I am a bit unsure what regulator issue you are referring to. As long as the regulator can deliver a stable current up to about 20mA you shouldn't have any issues. What speed are you running the SPI bus at? Do you have a scope available to monitor what's actually happening over the lines?

    Best regards
    Torbjørn

Related