Hi all,
I am new to RF24L01.
Currently, I want to test writing and reading back some values of control register through SPI bus.
The problem is only the first read back after writing a new value to a register returns the expected value.
For example:
-
I write 0 to CONFIG register
-
Then I read back => it is 0 which is OK
-
Then I read more => it becomes 0x08 which is the default value of CONFIG register
-
I try to read more => it is always 0x08 !!!
-
Then I try to re-write 0 to it => read back 0 but subsequent readings still return 0x08 !!!
I try to write/read other register, the result is the same !!!
Could anyone help me to figure out what is the reason for my problem?
Thanks,
Huy
Did you set the CE line low prior to writing the register?
Those nRF24L01+ have a lot going on. I’m only just starting to understand all they can do.
I do remember reading that the CE pin needs to be set low when writing to some registers.
I think CE line is just to turn on/off radio part of the chip.
FYI, I write an application for the MCU to read/write its registers, the application worked well with a RF24L01 module I bought from a shop, but it could not write to RF24L01 module that I made myself.
Therefore, I think it is not related to firmware but because of a problem in hardware. However, I cannot find out what it is after measuring all pins in the board, replace another chip, etc.
khachuy:
I think CE line is just to turn on/off radio part of the chip.
I think you are correct. I tried to find the information about the CE line needing to be low to write registers and I found I had misunderstood the datasheet previously (there’s a lot of information to keep straight in that datasheet).
Thank you for the correction.
If you want to try your code with a different module, you could use one of these cheap boards.
http://www.ebay.com/itm/ws/eBayISAPI.dl … OU:US:1123
I’ve used these boards many times and most of them work well (I have received a couple that didn’t work). What’s nice about these modules is the price. They cost less the $2.50.
Hi,
I bought a module of RF24L01 from a local shop and work with it smoothly.
Just because I want to build it myself so that next time I can integrate it to an application board.
Perhaps I will try one more time
(I already tried 4 times but got the same result !!!)