SparkFun Forums 

Where electronics enthusiasts find answers.

All things pertaining to wireless and RF links
By dizzey
#39444
First off i cant get the modules working with crc.
if i disable crc the data i send will be correct havent found any errors on that
but if i enable crc checking i never get any incomming data.

then there is some problem when i reconfigure the transmitter to recive.
if i have sent data once it wont recive any data is there any time considerations to think about when you reconfigure the chip?

im using two atmega168 as mcu.
the recive function is running on interrupt coneccted to dr1.
By orin
#39450
dizzey wrote:First off i cant get the modules working with crc.
if i disable crc the data i send will be correct havent found any errors on that
but if i enable crc checking i never get any incomming data.

then there is some problem when i reconfigure the transmitter to recive.
if i have sent data once it wont recive any data is there any time considerations to think about when you reconfigure the chip?

im using two atmega168 as mcu.
the recive function is running on interrupt coneccted to dr1.
Here is some working code:

viewtopic.php?t=8807

It uses CRC and switches from transmit to receive fine.

The important delays as far as I can tell are the 3mS startup, 5uS after setting CS or CE and 500nS setup and hold times on the clock and data. You do have to delay 195uS plus the time to send a packet (Toa) after lowering CE when sending a packet before switching back to receive mode in order to allow the packet to be sent! There is another timing parameter, Td before setting CS or CE when there should be no transitions on CS, CE, CLK or DATA. It's only 50nS, so it will almost certainly be met on most microcontrollers simply by setting all the lines to zero before setting CS or CE.

You really do only need to send one configuration bit to switch between RX and TX if you meet all the timing parameters.

Orin.
By dizzey
#39453
Thanks i found the error in my code.
the payload was 12byte but my send and recive funktion tride to read/write 13byte wich lead to some strange things