Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

serial interface between RF modules and PIC18F452 mcu

Status
Not open for further replies.

darvaish

New Member
am using RF modules operating at 418 MHz with modulation scheme as CPCA(carrier present carrier absent).RF transmitter have serial data input while RF receiver has serial data output.

I interfaced the RF modules to the USART of PIC18F452 mcu.Sent data from mcu#1(connected to RF transmitter) to mcu#2(connected to RF receiver).
I received data at mcu#2 but its corrupted data.
For debugging i wrote a code for mcu#1 which send a number to mcu#2 waits for some time increments that value and again send that value to mcu#2 again wait increment and send and so on
What i found on receiver end is that single 1s in the sent data are converted to 0s e.g if sent data is 00101010 or 10101010 or 10001000 or anything like this the output at receiver end is all 0s
but if there are more than one consective 1s then only first 1 is converted to 0 and all others are received correctlye.g
transmitted 11000111----------->received 10000110
transmitted 00011000----------->received 00010000
transmitted 01001011----------->received 00000010

How to solve this problem?
Someone told me that this is due to the wrong synchronization at receiver end due to wireless connectivity if i will use manchester coding this will be solved.
is it correct?if yes then how?
Any good resources for this coding scheme?
And how to implement this coding in PIC18F452 mcu?

I am using C18 compiler.
 
I've now posted this loads of times! - you can't send standard RS232 via these radio modules - because they are AC coupled!. So a continuous high level (as provided by RS232 between bytes) will only last for a short time, then will breakup and go low.

By using software UART's you can invert the data, so you get a continuous LOW instead of a continuous HIGH - RS232 will then work. But it's not a good solution, you should investigate Manchester coding, or some other kind of NRZ system.
 
Nigel Goodwin said:
NRZ system.
NRZ= Non return (to) zero, means that the transmitted signal has equal number of 1's and 0's. this is really important for RF transmission. It does that by sending a Bit, and then sending it again, but inverted. Therefore you will get 1:1 ratio of 1's and 0's, but the speed is 1/2.

At least that's what they thought me at school :lol:
 
Can you please give me some links to good resources for manchester encoding and its implementation in mcu especially with reference to PIC18F452

Thanks
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top