AnsweredAssumed Answered

RF Transmiter and Receiver FXTH87

Question asked by David Ramirez on Jun 30, 2017
Latest reply on Sep 1, 2017 by David Ramirez

Hi.

I have a FXTH871511 Sensor but i want transmitt data to pin RF and receive this data in RFM69HW but don't work.

I need a special receiver for this sensor like CC1101 OR MKW01.

How can I can test my program trasmmited or see the frames?

Thanks if you hepls what RF receiver i can use RFM69HW or CC1101 OR MKW01 I suppose that i can use MKW01 but i dont know where i can buy that.

 

My code is the next in FXTH871511 and I put a inductance to 39nH to Vcc and Pin Rf and i have i my circuit a machine network to RF transmitt to 434Mhz.

 

 

 

 

 

#include <hidef.h> /* for EnableInterrupts macro */
#include "derivative.h" /* include peripheral declarations */

 


void RF_Setup(void);
void InitTPM1CH0(void);
void Send_RF_Datagram(void);
void Code_Manchester_Frame(unsigned char *ptr);
void MCU_Setup(void);
void delay(unsigned int);


void main(void) {
EnableInterrupts;
/* include your code here */
MCU_Setup();
RF_Setup();

for(;;) {
Send_RF_Datagram();
} /* loop forever */
/* please make sure that you never leave main */
}

void MCU_Setup(void)
{
PTBDD = 0X03;//Port B like Output
PTBD = 0X03;//Port B off
SIMOPT1 = 0X33;//Disable WDT, Enable Debug BDM, Stop Enable, RF Enable.
SIMOPT2 = 0X00; // Clock BUSCLK 4Mhz
/*BUSCLKS 00 bUS fREQUENCY = 4Mhz*/
}
void RF_Setup(void)
{
DisableInterrupts;

RFCR0 = 0X34; //9600 baud - Reset Value
RFCR1 = 0X78; //Set to 80 for 128 bits - largest frame
RFCR2 = 0X0E; // RF Transmission On - No EOM - Pout=5dbm 00001110
RFCR2 = 0X8E; // RF Transmission On - No EOM - Pout=5dbm 10001110
RFCR3 = 0X00; // RF Output Low -RF Power UP - One Frame Transmitted
RFCR4 = 0X01; //InterFrame timing set to 1
RFCR5 = 0X00; //No Pseudo-random number used
RFCR6 = 0X01; //VCO highest Power - Interframe timing
RFCR7 = 0X00; // RF Interrupt Disable - LVD Disable -RFM Not reset

PLLCR0 = 0XB0;
PLLCR1 = 0x63;
PLLCR2 = 0XB1;
PLLCR3 = 0X56;
EnableInterrupts;
}

void InitTPM1CH0(void)
{
TPM1SC = 0X08 | 0X02; //Clock TIMER = FBUS=8Mhz/128 - set Timer ON
TPM1C0SC = 0x00; //Configure in TBM , Interrupt Enable Address
TPM1MODH = 0XFF; //FF Fixed the OC every 1.13sec
TPM1MODL= 0XFF; //FF Fixed the OC every 1.13sec
}

void Send_RF_Datagram(void)
{
unsigned char i;
DisableInterrupts;
RFD0 = 0XFF;
RFD1 = 0XAA;
RFD2 = 0X9B;

RFD3 = 0XA1;
RFD4 = 0XB2;
RFD5 = 0XC3;
RFD6 = 0XD4;
RFD7 = 0X06;
RFD8 = 0XA1;
RFD9 = 0XA1;
RFD10 = 0XA1;
RFD11 = 0XC3;
RFD12 = 0XAA;
RFD13 = 0X90;
RFD14 = 0XBB;
InitTPM1CH0();
RFCR7_RFIACK=1;
delay(200);
Code_Manchester_Frame(&RFD0);
Code_Manchester_Frame(&RFD1);
Code_Manchester_Frame(&RFD2);
Code_Manchester_Frame(&RFD3);
Code_Manchester_Frame(&RFD4);
Code_Manchester_Frame(&RFD5);
Code_Manchester_Frame(&RFD6);
Code_Manchester_Frame(&RFD7);
Code_Manchester_Frame(&RFD8);
Code_Manchester_Frame(&RFD9);
Code_Manchester_Frame(&RFD10);
Code_Manchester_Frame(&RFD11);
Code_Manchester_Frame(&RFD12);
Code_Manchester_Frame(&RFD13);
Code_Manchester_Frame(&RFD14);

EnableInterrupts;

}

void Code_Manchester_Frame(unsigned char *ptr)
{
signed char ii;
for(ii=7;ii>-1;ii--)
{
if((*ptr)&(1<<ii))
{
RFCR3_DATA=1;
TPM1CNT=0;
while(TPM1CNT<37);
RFCR3_DATA=0;
TPM1CNT = 0;
while(TPM1CNT<41);

}
else{

RFCR3_DATA=0;
TPM1CNT=0;
while(TPM1CNT<41);
RFCR3_DATA=1;
TPM1CNT=0;
while(TPM1CNT<37);
}
}
}


void delay(unsigned int i)
{
unsigned int j;
for(j=0;j<=i;j++);
}

Outcomes