Hi… I recently bought a couple of these modules and it has been a couple of weeks since I finally received some data (noise I believe). Then I enabled the CRC and set it to 16 bits, along with a 40 bit address. So they are no longer receiving noise, it works!!!
So I went on to configure the other RF module in order to establish my own little RF wireless network, right? The configuration word is almost the same, I just changed the device address (so it is not the same as the rx_device address) and cleared the RX_EN.
I started one of the PIC’s timer so it interrupts on overflow and must send data via the tx_rf_module… but im not getting any data on the other side, my rx_rf_module doesn’t set DR1… Anyone know what is wrong with my routine???
I’m posting my tx_rf_ module configuration routines:
void tx_modulo(unsigned char dato_spi)
{
LATDbits.LATD0 = 1; //CE set high.
Delay10TCYx(5); //5us delay
OpenSPI(SPI_FOSC_64, MODE_11, SMPMID);
WriteSPI(0xa0);
WriteSPI(0xa0);
WriteSPI(0xa0);
WriteSPI(0x01);
WriteSPI(0x15);
WriteSPI(dato_spi);
WriteSPI(dato_spi);
WriteSPI(dato_spi);
WriteSPI(dato_spi);
WriteSPI(dato_spi);
WriteSPI(dato_spi);
CloseSPI();
LATDbits.LATD0 = 0; //CE set low
Delay10TCYx(185); //195us delays
}
void configurar_trf24g (void)
{
INTCON3bits.INT1IE = 0; conf_trf[1] = 0xff;
conf_trf[2] = 0x08;
conf_trf[3] = 0xff;
conf_trf[4] = 0xff;
conf_trf[5] = 0xff;
conf_trf[6] = 0xff;
conf_trf[7] = 0xff;
conf_trf[8] = 0xbb;
conf_trf[9] = 0xbb;
conf_trf[10] = 0xbb;
conf_trf[11] = 0xbb;
conf_trf[12] = 0xbb;
conf_trf[13] = 0b10100011;
conf_trf[14] = 0b01101111; conf_trf[15] = 0b00;
LATDbits.LATD0 = 0; //CE set low
Delay1KTCYx(30); //3 ms. delay
LATDbits.LATD1 = 1; //CS set high Delay10TCYx(5); //5us delay
i_trf = 1;
for(i_trf = 1 ; i_trf < 16 ; i_trf++)
{
salida = escribir_spi(conf_trf[i_trf]);
}
LATDbits.LATD1 = 0; //CS set low
Delay1TCY(); //100 ns delay LATDbits.LATD0 = 1; //CE set high, it is now active
}
Thanks for your help!!!