Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

communication problem between two PIC mcs using RF modules

Status
Not open for further replies.

anandpv2009

Advanced Member level 1
Joined
Aug 11, 2009
Messages
407
Helped
60
Reputation
120
Reaction score
40
Trophy points
1,308
Activity points
3,343
ccs rf

I am trying to communicate two PIC mcs using RF modules.....
I were connected module direcly to pic to TX and RX pins of mc with baud of 500bps.But it does't works properly can any one help me...

RX MC received signals but not correctly.Its urgent because it is related to my main project...
 

RF MODULE...Problem

Does the manufacturer specify, that these modules are capable of transmitting UART data? Most simple modules aren't.
 

Re: RF MODULE...Problem

i were bought it from vegakits.

If it is not capable of transmitting UART data? What can i do..
Does it is possible to connect it directly to PIC mc without any other ICs.Because i need high baud rate...If it is possible pls post the Code in ccs/c.


Thanks
 

RF MODULE...Problem

Vega Kit is just a dealer for RF mudules, hobby and robotic kits. Not a manufacturer. All modules he sells are from China. Those modules can be used for remote controlling or low speed data transfer. I doubt about those modules working with high baud rates as "FvM" writes.
 

Re: RF MODULE...Problem

can u explain how to connect a pic directly to the module.Without HT12D/HT12E...
 

RF MODULE...Problem

I have heard different opinions about the feasibility of operating simple RF modules (mostly ASK) with UART signals directly. In my understanding, they have difficulties to handle the large duty cycle range (10 - 90%) involved with UART bitstreams.

Personally, I would always implement manchester encoding and a preamble for synchronisation. Manchester encoding at TX is very easy, the decoding effort at RX depends on, if you can assume an exact bitrate or need to track the transmitter speed. Both can be done in software with a PIC, I think.
 

Re: RF MODULE...Problem

Personally, I would always implement manchester encoding and a preamble for synchronisation. Manchester encoding at TX is very easy, the decoding effort at RX depends on, if you can assume an exact bitrate or need to track the transmitter speed. Both can be done in software with a PIC, I think.[/quote]


you have mentioned that manchester coding would be helpfull on the reciever,please advise on how I would need to code if I'm doing a full Duplex communication between 2 AT8051 0r 8031?

Please advise all you can.
 

Re: communication problem between two PIC mcs using RF modul

Email me your code i will help you
 

Re: communication problem between two PIC mcs using RF modul

Ganesh_kolhe said:
Email me your code i will help you

Its an old post yaar,
now my Modules and controllers are working perfect.
 

Hi Ganesh ....

I have succeded .I managed to work out a way for coding the RF modules .I'll post my code .....just incase somebody needs it
 

Re: communication problem between two PIC mcs using RF modul

thand-s said:
Hi Ganesh ....

I have succeded .I managed to work out a way for coding the RF modules .I'll post my code .....just incase somebody needs it

Yeah, that would be helpful
 

Re: communication problem between two PIC mcs using RF modul

Ok IsaacJn, I will help u.

First you should make sure that ur modules will support UART.

Follow these steps.

1. Reduce Baud(Minimum)
2. First Transmit numbers like 0x55 or 0x0A. This will help you to reduce errors.
3. Use Manchester coding.
4. U should place ur rx circuit from two or three feet away frm TX while testing circuit
5. Use invert mode operation
6. Send data twice to make sure the reception.

Good luck.....
 

Re: communication problem between two PIC mcs using RF modul

anandpv2009, thank you for your help.

I have been studying this application note:
**broken link removed**

The probelm is that the code given can only be compiled using ccs. I have never used ccs before. I am using C18 compiler. Is it possible if I can have a look at your code?

regards
 

Re: communication problem between two PIC mcs using RF modul

IsaacJn said:
anandpv2009, thank you for your help.

I have been studying this application note:
**broken link removed**

The probelm is that the code given can only be compiled using ccs. I have never used ccs before. I am using C18 compiler. Is it possible if I can have a look at your code?

regards

I am a CCS programmer. But I think most of the codes in CCS or other C langs can be interchangeable. Except some their own library function,fuse setting dec., clk selection method etc.

If u have any doubt in the ur above CCS code ask here i can help u.

But before all this, does ur modules can work with UART (I wasted lot of time with my old Crummy modules.)



Good luck..
 

Re: communication problem between two PIC mcs using RF modul

anandpv2009,

I am using TX2 433 160(transmitter) and RX2 433 160(receciver) from radiometrix. I have read the data sheet and it doesnt say anything about UART. In my code I am using usart libraries.So I assume that maybe it doesn't support UART?

coming to the ccs code above, I dont understand what bit_test, bit_set and bit_clear do?

My transmitter code looks like this:

while(1)
{

//Preamble
while(BusyUSART()) ;
WriteUSART(0x55);
while(BusyUSART()) ;
WriteUSART(0x55);

//send the uart sync byte
while(BusyUSART()) ;
WriteUSART(0xFF);

//send the start code
while(BusyUSART()) ;
WriteUSART(0x00);
while(BusyUSART()) ;
WriteUSART(0xFE);

//I HAVE A PROBLEM HERE, I DONT KNOW HOW TO ENCODE DATA
while(BusyUSART()) ;
WriteUSART(0x25);
while(BusyUSART()) ;
WriteUSART(0x25);

//indicate transmission of 0x25
Delay10TCYx (50); // *
if(TXREG ==0x25)
LATAbits.LATA1 = 1;
else
LATAbits.LATA1 = 0;
 

Re: communication problem between two PIC mcs using RF modul

IsaacJn said:
anandpv2009,

coming to the ccs code above, I dont understand what bit_test, bit_set and bit_clear do?

bit_test (variable, x)
the above statement will return 1 is xth bit of variable is 1

bit_set (variable, x)
the above statement will set xth bit of variable


bit_clear(variable, x)
the above statement will clear xth bit of variable

Note:
similar to btfss..etc in assembly


IsaacJn said:
anandpv2009,
I am using TX2 433 160(transmitter) and RX2 433 160(receciver) from radiometrix. I have read the data sheet and it doesnt say anything about UART. In my code I am using usart libraries.So I assume that maybe it doesn't support UART?

I don't have any experience with radiometrix products. But I think ur modules can.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top