Page 1 of 1

Need help in RF module problem

PostPosted: Tue Apr 05, 2011 5:21 pm
by cheehao
Hi all,

I am a final year student and i am using cytron product 315MHz transmitter and receiver and 2400 baud rate to proceed my final year project. I am also using PIC16F877A in this project.

The problem i face is...

- In the part of transmitter is fine, it i will continuous sent signal...i check it on oscilloscope the "HIGH" of rectangular waveform is 4.8V and "LOW" is almost 0V...when i sent a signal by pressing button and the waveform is pretty nice for what i want...so I think it is function well.

- In the part of receiver, what receiver receive is the "HIGH" of waveform is 4.6V but "LOW" is not 0V but 3.6V. Of course, the wave shape and frequency is the same no matter what type of signal i sent..So anyone here know what is the problem of this and any method can help me solve it?

I have reference the cytron design and almost same with PR16, so I think this is the problem cause I cant get the result i wan at the receiver side (example light on a LED when pressed a button in transmitter side), since when i was directly connected UART pin (RC6) at tx side to uart pin (RC7) at rx side it is work what i want.

I am very appreciate to anyone can help me to solve it...because i was rushing my project in this month..THANK! ;)

Re: Need help in RF module problem

PostPosted: Tue Apr 05, 2011 6:28 pm
by shahrul
What UART data you send?
What I do is just send 0xFF, then send the data. This is my example Low Cost RF Module.

Re: Need help in RF module problem

PostPosted: Tue Apr 05, 2011 9:08 pm
by cheehao
Hi there are my simple coding for tx and rx...
You will understand after go through it ^^
Thank in advance!


TX
CODE: SELECT_ALL_CODE
unsigned char ch;
unsigned int adc_rd, j;

void main()
{


TRISB=0;
PORTB=0;
TRISC.F7=1;
TRISC.F6=0;
TRISD=0b11111111;
PORTD=0;

Usart_Init(2400);

while(1)
{


        if (portb.f0 == 1)     //DC Motor
        {
        Usart_Write(1);
        }
        else
        {
        Usart_Write(0);
        }
}
}



RX
CODE: SELECT_ALL_CODE
unsigned int j;

void initmain()
{

TRISA = 0b11111111;
PORTA = 0;
TRISB = 0;
PORTB = 0;
TRISC.F7=1;
TRISC.F6=0;
TRISD = 0;
PORTD = 0;

Usart_Init(2400);
                           }
                           
            void led_on()
            {
            portb.f0=1 ;
                             }


void main()
{
initmain();

  while(1)
  {
  if (Usart_Data_Ready())
  {
  j = Usart_Read();

  if (j == 1)                        //DC Motor
  {
    led_on();

  }

  else
  {

  PORTB = 0b00000000;

  }
  }
  }
}

Re: Need help in RF module problem

PostPosted: Tue Apr 05, 2011 9:49 pm
by shahrul
Ok, that's is simple UART send, just send '0' and '1'. Then the receiver just compare between these value. If the LED not response succesfully, I think that's is hardware problem.

Re: Need help in RF module problem

PostPosted: Tue Apr 05, 2011 10:23 pm
by cheehao
ya...just sent "0" and "1"...

erm...but if was hardware problem...why when i directly connected from uart pin to uart pin there will work but through the RF module then cannot...somemore the wave shape when "HIGH" is 4.6V and "LOW" is 3.6V ? It is different with what the tx waveform being sent ( "HIGH" is 4.8V and "LOW" is 0V)...

When i check it out with my circuit...It is correct since i was using cytron development board..
so can u help me point out the problem??

Thank...

Re: Need help in RF module problem

PostPosted: Wed Apr 06, 2011 5:38 pm
by yonghui
hi,

can post a picture of the hardware?

thanks

yh

Re: Need help in RF module problem

PostPosted: Wed Apr 06, 2011 7:31 pm
by cheehao
Hi,
sry for the no clear picture...since i am using development board..so i just doing a simple connection for an led only..

i can explain to u if u have question on it...

TX
DSC03460.JPG
TX


RX
DSC03461.JPG
RX

Re: Need help in RF module problem

PostPosted: Thu Apr 07, 2011 4:31 pm
by fuad
fuad 2011-04-06 23:37:14
i has buy 2XBee starter kit and 2 XBee pro module. the starter kit just to make sure my coding is right and i can transmit and receive between 2 of them. my project is build coding and board for the XBee pro module... for the coding, it has been done...but circuit xbee pro, i can't do it...i has dl some schematic and testing them, but until now, i still can't set the MY and DL address. please help me about the schematic. i has serach many source and till now i can find the right circuit to set my MY and DL address.
Admin Reply :
hi, setting the MY and DL address is from the software, not circuit. Anyway please do discuss in our technical forum as this section is for short inquiry, thanks :)

ok, i know it was set from the software...but i just bought XBee Pro module, only the module...i need a circuit to connect it to pc then i can use the software to set it...i need to use to transmit and receive data..but till now, i cannot built the board...

Re: Need help in RF module problem

PostPosted: Thu Apr 07, 2011 10:56 pm
by ober
fuad,please open a new topic to discuss this. You actually posted under RF module problem where forumers are discussing about RF module. Your question is about interface with XBee.

You can also search for solution and discussion from previous topics, there are plenty of discussion about XBee interface and recommendations from forumers.
maybe this can help?
http://forum.cytron.com.my/viewtopic.php?f=10&t=10905

Re: Need help in RF module problem

PostPosted: Tue Jun 28, 2011 3:46 pm
by andyxin
Hi,

can i know how's the coding in Usart_Write() function in Tx and also Usart_Read() & Usart_Data_Ready() in Rx for the simple coding that attach on the reply there?
Because i have some problems in programming. Thx.

:)