RF link


Closed Thread
Results 1 to 15 of 15

Thread: RF link

Hybrid View

  1. #1
    Join Date
    Aug 2007
    Posts
    15


    Did you find this post helpful? Yes | No

    Default n qwerty

    Using the FM-RTFQ1-433 transmitter and a FM-RRFQ1-433CTC receiver to send some data across a short range from one PIC to another. Using the code above

    Tx code

    include "modedefs.bas"

    TRISA=%00000000
    TRISB=%00001000

    OPTION_REG.7=0 'Enable Pull-Up's on PORTB

    ANSEL = 0 'turns off analogue inputs

    OSCCON =$60 'sets internal osc to 4MHz

    TRAIN VAR BYTE

    PORTB.4 = 1 'turn enable pin high
    TRAIN=$55

    SEROUT PORTB.5,T2400,[TRAIN,TRAIN,TRAIN,TRAIN,TRAIN,9,3]

    goto main

    Rx code (part of)

    test VAR WORD
    SERIN PORTC.7,T2400,[9],test
    IF test = 3 THEN

    T1CON.0 = 1 ‘start timer module


    When I try this code using a wire from pic to pic the timer starts but when I try to send the data over the rf link the timer doesn’t work. I can see the data out on the receiving module and I know rf is present since I have connected it to a spectrum analyser and there is a nice peak at 433Mhz. The pins have supply voltage and ground where required. Is there anything in particular that I am doing wrong in order to get the rf link to work?

    Any help would be good since im getting stuck

    Thanks

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Is there anything in particular that I am doing wrong in order to get the rf link to work?
    vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv vvvv
    OSCCON =$60 'sets internal osc to 4MHz
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    I might not know what's wrong...but I know what's probably not helping matters any...

  3. #3
    Join Date
    Aug 2007
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    yes, sorry my mistake.

    I have taken that bit of code out but it still doesnt work.

    Well, it does work occasionally when disconnecting and then connecting the power to the transmitting circuit, but it seems very unreliable that it may as well not work, but at least i no it is receiving data sent across the rf link. Is there something to make it more reliable. I have tried several different baud rates and pre ambles but nothing seems to make it more reliable.

    thanks

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I agree with Mr.mask. Lucky the internal osc works with wires, RF is even more touchy.

    If changing the osc does not help, test the RF.

    The 010101... is for setting up the receiver for serial input. Test the RF by sending a HIGH and then a LOW. Have maybe a half second pause between the signals.
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by n qwerty View Post
    Using the FM-RTFQ1-433 transmitter and a FM-RRFQ1-433CTC receiver to send some data across a short range from one PIC to another. Using the code above the timer starts but when I try to send the data over the rf link the timer doesn’t work. I can see the data out on the receiving module and I know rf is present since I have connected it to a spectrum analyser and there is a nice peak at 433Mhz. The pins have supply voltage and ground where required. Is there anything in particular that I am doing wrong in order to get the rf link to work?
    See p4 of the datasheet for the receiver. The RSSI pin outputs a voltage that is proportional to the received signal strength. This should be zero in the absence of a signal. You can use it with an ADC pin to determine when a signal is being received or amplify it and use it as a Carrier Detect signal.. Since these are FSK (i.e. FM), I would dispense with the TRAIN,TRAIN,TRAIN chain (personally, I dispense with it for ASK, also). What is the application?

    EDIT: If you are not using the pins for something else, you can use one of the 16F88 comparators to create a CD (carrier Detect) signal. With the RSSI pin as one input and the other input to GND, configure the comparator so the output is high when there's a signal and low when there's no signal.
    Last edited by dhouston; - 5th March 2008 at 17:29.

  6. #6
    Join Date
    Aug 2007
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    ok thanks for the advice, i will give it a try and no doubt will be back on here.

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by n qwerty View Post
    ...
    '
    SEROUT PORTB.5,T2400,[TRAIN,TRAIN,TRAIN,TRAIN,TRAIN,9,3]

    goto main
    1. Where is <main>?

    2. As I stated on post #8 you have to take specific steps.
    a. Did you implement some sort of encoding? (Manchester or Bi-phase?)
    b. Did you implement some sort of error detection (Checksum or CRC?)
    c. If the transmission was not succesful, do you have any way to re-transmit the packet?

    All of the above are documented on the forum. Use the google search tool that D. Taylor has offered to all (http://www.picbasic.co.uk/forum/showthread.php?t=4751).

    Ioannis

Similar Threads

  1. RF Modules (Zigbee)
    By Chris Barron in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 4th March 2010, 18:28
  2. RF Code example + BOD + POR
    By financecatalyst in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 14th January 2009, 18:24
  3. pic to pic ir link versus wired link : help please anyone
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 30th May 2008, 21:01
  4. RF Transceiver modules help
    By davewanna in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th May 2008, 14:54
  5. Serout And Serin Via Rf Link
    By MARAD75 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th April 2007, 22:19

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts