I cant get ANYTHING to work and think its mt actaul units. I tested them with the following code.It is supposed to check if they are working but more than 10 (from diffrent venders and bought at diffrent times) . The serial moniter should print out the following for correctly working units
EN_AA = 0x3f
EN_RXADDR = 0x02
RF_CH = 0x4c
RF_SETUP = 0x03
CONFIG = 0x0f
All check out with on exeption they ALL show a CONFIG= 0x7f, every unit i test. What could cause this?
/*
If your serial output has these values same then Your nrf24l01 module is in working condition :
EN_AA = 0x3f
EN_RXADDR = 0x02
RF_CH = 0x4c
RF_SETUP = 0x03
CONFIG = 0x0f
This code is under public domain
Last updated on 21/08/28
https://dhirajkushwaha.com/elekkrypt
*/
#include <SPI.h>
#include <RF24.h>
#include <printf.h>
const int CSPin = 9; // Use digital pin 4 for chip select
RF24 radio(9, 8);
byte addresses[][6] = {"1Node", "2Node"};
void setup() {
pinMode(CSPin, OUTPUT); // Set your custom CS pin as output
digitalWrite(CSPin, HIGH); // Deselect the SPI device
SPI.begin();
radio.begin();
radio.setPALevel(RF24_PA_LOW);
radio.openWritingPipe(addresses[0]);
radio.openReadingPipe(1, addresses[1]);
radio.startListening();
Serial.begin(9600);
printf_begin();
radio.printDetails();
}
void loop() {
// empty
}
Hi, @Milo
Can you please post images of your project?
So we can see your component layout.
Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.
Could we see a picture of it, and even better, a link to it? Because the adapter in your picture does not have any level shifting on the signal pins to the best of my knowledge. All it does do is provide 3.3V power to the nRF24L01 from a 5V source. And while it's been quite some time since I used one of these, aren't the signal pins on the IC itself 5V tolerant? I'm very confused about exactly what it is you think your adapter board is doing.
If that's the adapter you're using, that is exactly what is does, and just that. The signal pins are straight through, as the signal pins on the IC are already 5V tolerant (IIRC). Hence my confusion. I've got it straight now.
I guess that your main concern is not the value of the CONFIG register it is more that you cannot get two nrf24L01 devices to talk to each other. I've just had a look in the repository for the nrf24L01 library and it appears a recent change (version 1.6.0) has altered the default settings for interrupts which will explain why you are seeing a value of CONFIG which differs from that mentioned in the sketch that you found. You could roll the library version back if you really want to see that specific CONFIG vaue.
That sketch, incidentally, has some inconsistencies such as a comment which says the CE pin is pin 4 and also gives it an odd name, directly manipulates it, but uses a hard coded value here: RF24 radio(9, 8);
That introductory statement would be good enough for me.
Maybe someone has the time and inclination to demonstrate that that 5v pin tolerance claim is fundamentally misleading but I'm certainly not going to spend any time engaging in such arguments.
Well good luck with your designs.
I prefer to read and understand the entire datasheet before using a part in one of my designs, that way I know it will work.
then in the case that a 3V3 regulator on the adaptor board was a tiny bit over 3V3 would mean that a high input from your 5V logic could not be greater than 3V6. This would rule out a UNO (post #5).
The part is 5V tolerant iff VDD is 3V +- 10%.
I don't know what the regulator on OP's adaptor board is.