hobby_85
Joined: 17 Aug 2009 Posts: 21
|
22 Aug 2009 2:05 interfacing pic to rf module |
|
|
|
|
Hey, Im in the midst of a project, where my PIC (16f690) has been connected to the PC using the rs232 port. Its constantly sending up information.
I dont know why i didnt think of this earlier, but now i need to include a RF module to the PIC too. I have the pins to spare, but the TX and RX pins of the PIC are being used for the rs232 connection.
Not only do I need to connect a RF transmitter, but i also need a RF receiver attached as well. These are the modules I bought. Thats just the receiver, but i got the corresponding transmitter too.
http://www.sparkfun.com/commerce/product_info.php?products_id=8950
Please please please someone tell me that it is possible to use the other IO pins to connect them to the PIC. I know how they all connect up schematic wise (http://www.sparkfun.com/datasheets/RF/KLP_Walkthrough.pdf), but am having problems writing up some sort of simple code. Ive written in a couple of forums and everyone keeps saying use manchester coding and what not.
Anyone have any ideas? Is it possible to include the RF TX & RX to the same PIC?
Thanks heaps
|
|
betwixt
Joined: 04 Jul 2009 Posts: 386 Helped: 63 Location: Wales, UK
|
22 Aug 2009 9:33 pic rf |
|
|
|
|
I've replied to this elsewhere in Edaboard but in answer to your need for more serial signals; use the UART for one serial link and bit-bang the other link.
Hint: use the INT pin (I think its RA2 on that PIC) for receiving so you can generate an interrupt as bits arrive, this will make it easier to time the bit intervals. Use any other free pin to transmit and use either a hardware timer or software loop to set the bit timing.
Your software driven port may be a 'blocking' routine, at least for the duration of sending one byte so be careful if your code is doing other critical timing tasks.
Brian.
|
|