CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Transmitting serial data via RF

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
vinniewryan



Joined: 29 Jul 2009
Posts: 154
Location: at work

View user's profile Send private message MSN Messenger

Transmitting serial data via RF
PostPosted: Fri Apr 16, 2010 11:24 am     Reply with quote

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: 1903

View user's profile Send private message

PostPosted: Fri Apr 16, 2010 12:09 pm     Reply with quote

Look through the code posted here: http://www.ccsinfo.com/forum/viewtopic.php?t=23953&highlight=wireless, and the posts here: http://www.ccsinfo.com/forum/viewtopic.php?t=23886
Rohit de Sa



Joined: 09 Nov 2007
Posts: 282
Location: India

View user's profile Send private message Visit poster's website

PostPosted: Sun Apr 18, 2010 11:19 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group