Page 1 of 1

using nordic nRF24L01P with SiLab C8051F020

PostPosted: Sun Oct 13, 2013 5:50 am
by wick
Hi,
for my projekt I need a wireless connection between two ┬ÁC.
For this I will use two nordic nRF24L01P modules, one in transmit, one in receive mode and the example code I found on mikrocontroller.net.
But I don't understand the initialisation, for example
SPI_Write_Buf(WRITE_REG + RX_ADDR_P0, TX_ADDRESS, TX_ADR_WIDTH);.
I have a problem with "WRITE_REG + RX_ADDR_P0".
The WRITE_REG is defined as 0x20 and the RX_ADDR_P0 as 0x10.
So when I add this two registers I become 0x30.
But in the datasheet of nordic (9.1 register map table) I have only addresses from 0x00 to 0x17.
Can somebody explain to me how this works?
Many thanks!

Re: using nordic nRF24L01P with SiLab C8051F020

PostPosted: Mon Oct 14, 2013 12:04 pm
by brennen
The first byte of a write register command takes the command byte (here, 0x20) and then uses the lowest five bits of that command to get the address of the register to write. This allows you to use only one control byte for the write instead of two. The read register operation acts the same way, except its command byte is 0x00.