View previous topic :: View next topic |
Author |
Message |
vinniewryan
Joined: 29 Jul 2009 Posts: 154 Location: at work
|
Transmitting serial data via RF |
Posted: Fri Apr 16, 2010 11:24 am |
|
|
Hello, I've searched the forums for something similar to my needs with no success.
I'm using the WRL-08947 ASK receiver and the WRL-08945 ASK transmitter which I purchased from Sparkfun, and I'm trying to get 2 PICs to communicate. I'm using RS232 functions and in my oscilloscope the transmitter is transmitting data just fine, and the receiver is receiving it, but the receiver doesn't receive the correct data. It's all random numbers. I know it's a problem with my method, my MCUs have no way of telling each other when a string of data is beginning or ending, so I'm wondering how I could set up a program that allows the two to communicate. Is RS232 a good method to use? I'm using the 16F684 microcontroller for the TX and RX, but I'm gonna switch to the 16f688 if I need to use I2C instead, because the 684's don't have any hardware communication.
Thanks in advance!
Transmitter: http://www.sparkfun.com/commerce/product_info.php?products_id=8945
Receiver: http://www.sparkfun.com/commerce/product_info.php?products_id=8947 _________________ Vinnie Ryan |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1911
|
|
|
Rohit de Sa
Joined: 09 Nov 2007 Posts: 282 Location: India
|
|
Posted: Sun Apr 18, 2010 11:19 am |
|
|
I've found that this works pretty reliably albeit slowly:
http://www.ccsinfo.com/forum/viewtopic.php?t=22525&start=0&postdays=0&postorder=asc&highlight=
Basically, you need to send a DC-balanced waveform. The link above converts each nibble into an equivalent DC-balanced byte (ie, the number of 1's and 0's in the byte are the same, with no more than two consecutive 1's or 0's). Because this is Manchester-like encoding, the data rate is half of the bit rate.
Rohit |
|
|
|