CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

save energy nRF24l01+

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
chico_pic



Joined: 21 Sep 2012
Posts: 10

View user's profile Send private message

save energy nRF24l01+
PostPosted: Tue Oct 25, 2016 1:06 am     Reply with quote

Hello to everybody

I want make a WSN using transponder nRF24l01+. & PIC16f1455.
So my WSN use nodes powered by battery and is important save energy,
I´ve edited the library created for Eduardo Guilherme Brandt, i just add this:
Code:
enum RF24_SETUP { //RF Setup Register
   CONT_WAVE    =0b10000000,   //(0)Enables continuous carrier transmit when high(TX is always on transmitting sinc signal)
   PLL_LOCK     =0b00010000,   //(0)Force PLL lock signal. Only used in test
   RF_DR_250kbps=0b00100000,   //(0)Select between the low speed data rates.
   RF_DR_1Mbps  =0b00000000,   //(0)Select between the medium speed data rates.
   RF_DR_2Mbps  =0b00001000,   //(1)(default_mode)Select between the high speed data rates. This bitis don't care if RF_DR_250kbps is set.
   RF_PWR_n18dBm=0b00000000,   //-18dBm. Set RF output power
   RF_PWR_n12dBm=0b00000010,   //-12dBm. Set RF output power
   RF_PWR_n6dBm =0b00000100,   //-6dBm. Set RF output power
   RF_PWR_0dBm  =0b00000110,   //0dBm(default). Set RF output power
   RF_LNA_EN    =0b00000001    // HABILITA EL MODO DE AHORRO DE ENERGIA EN LA MODALIDAD DE TRANSMICION
   };

RF_LNA_EN =0b00000001 // Enables energy saving mode in transmission mode.

The thing is save the most posible energy and I now can save 0.8mA.

I read other similar opinions on this forum, now i have a few questions:

For interrupt flag RX_DR:
Can i work over (POWER DOWN) and enable this interrupt?

For measure distance between nodes:
Can i use the bit CD (carrier detect) bit (RPD) ?
See datasheet rev 1 page 24 *6.4
https://www.sparkfun.com/datasheets/Components/SMD/nRF24L01Pluss_Preliminary_Product_Specification_v1_0.pdf

Or see datasheet rev 2 page 74 *appendix E
http://www.nordicsemi.com/eng/Products/2.4GHz-RF/nRF24L01

I add this function on file .h
Code:
enum RF24_CARRIER_DETECTE {  // Registro de deteccion de CD (0X09)
   INDIC_CD  =0b00000001     // Banderilla de acuse de problemas en el canal
   };


So now can someone give me a opinion?

I can't work with my own WSN because I not even receive my PCB from OSHPARK, and Proteus can't simulate this device.

Now someone have experience with WSN, that can give me a example code ?
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group