Hi All Newbie question
I have a n NRF24Lo1+ being controlled by a atmega328p. The Arduino complier I have been using has the libraries of maniacbug (RF24) and Aaron (MIRF). Neither has a CONT_WAVE function and I have not been able to edit them successfully to include one.
There are instructions in Appendix C of the Nordic semiconductor datasheet
on how to achieve the constant carrier output. It succinctly states that you must:
- Set PWR_UP = 1 and PRIM_RX = 0 in the CONFIG register.
- Wait 1.5ms PWR_UP->standby.
- In the RF register set: CONT_WAVE = 1. PLL_LOCK = 1. RF_PWR
- Set the wanted RF channel.
- Set CE high.
- Keep CE high as long as the carrier is needed.
I have tried many approaches to get this to work. I compiles and uploads but I don't see the carrier wave on my Spectrum analyzer.
Here are some of my most recent attempts: (full disclosure- I am not very hexidecimal/binary literate but I try my best)
Mirf.configRegister(CONFIG, mirf_CONFIG | ( (PWR_UP==1) | (PRIM_RX==0) ) ); delay(600); digitalWrite(8,LOW);//puts radio in standby delay(600); Mirf.configRegister(RF_SETUP,0b01111001);// http://forum.arduino.cc/index.php?topic=18379.0 delay(400); // Mirf.configRegister(RF_SETUP,(0x04, 0b00010000));//PLL_lock=1, this is //'d out and I assume //covered above along with the CONT_WAVE=1 command. I have tried both separately but no //success. delay(200); radio.setPALevel(RF24_PA_HIGH );//rfpower delay(200); radio.setChannel(5); delay(200); pinMode(8,OUTPUT); delay(200); digitalWrite(8,HIGH); delay(100);
Would GREATLY appreciate any hints or suggestions or demo code (dream big!) Thanks!!