Small Update to Mirf Library

Posted in Arduino, News on July 13th, 2010 by nisburgh – Be the first to comment

One of my readers asked ( in the forums too ) for some help on reading register values from the Nordic chip, so I put together a quick example and added it to the library. This example reads the RF_SETUP register and prints the value in binary to the Serial output:

 * Pins:
 * Hardware SPI:
 * MISO -> 12
 * MOSI -> 11
 * SCK -> 13
 * Configurable:
 * CE -> 8
 * CSN -> 7


void setup() {
  Serial.println( "Starting wireless..." );

  // Setup
  Mirf.setRADDR((byte *)"clie1");
  Mirf.payload = sizeof(unsigned long);

  // Read and print RF_SETUP
  byte rf_setup = 0;
  Mirf.readRegister( RF_SETUP, &rf_setup, sizeof(rf_setup) );
  Serial.print( "rf_setup = " );
  Serial.println( rf_setup, BIN );

  Serial.println( "Wireless initialized!" );

void loop() {}

When I ran this code on my board, it printed:

Starting wireless...
rf_setup = 1111
Wireless initialized!

So that’s 00001111 for the value of RF_SETUP. Breaking it down, high bit to low bit, using the datasheet:

0 – No continuous carrier wave
0 – Reserved – must be 0
0 – RF_DR_LOW is 0
0 – No PLL lock signal
1 – RF_DR_HIGH is 1, and according to chart, 01 = 2 Mbps
1 – High bit RF_PWR is 1
1 – Low bit RF_PWR is 1, according to chart, 11 = 0 dBm output power
1 – Not used/obsolete

You can download the library and bundled examples ( including this one ) from the Software page. Cheers!

More software! This time some fixes to the Mirf library

Posted in Arduino on November 12th, 2009 by nisburgh – 16 Comments

I’ve added another Arduino library to the software page. This one is an updated version of the original Mirf library, used for interfacing with the Nordic Semiconductor RF modules, like the nRF24L01+. I fixed a bug, updated the code here and there, fixed one of the examples and made some other small changes. As I work further with the library, I’ll push changes up here if they’re big. The bug fix was a pretty big one, so I wanted to share it with everyone. Let me know if you have any comments or suggestions!