Interfacting RF Module


Results 1 to 9 of 9

Threaded View

  1. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    wich model of transmitter / receiver do you use ? Is there any datasheet.

    there's few things wierd in your code...

    Code:
    Send:
    cmcon0 = 7 
    ansel = 0    
    TRISA = 0   
    TRISC = 1   
    PORTA = 0 
    
    'RF test program
    
    Start:
    
    IF PORTC.2 = 1 Then 
    PORTA.0 = 1 ;|
    PORTA.0 = 0 ;|
    PORTA.0 = 1 ;\
    PORTA.0 = 0 ;+ what these lines are suppose to do here ???
    PORTA.0 = 1 ;/
    PORTA.0 = 0 ;|
    SerOut 0,4,[%10010,%1111] ;not familiar with pin0 as output + not sure that SEROUT handle %... may use [18,15]
    EndIF
    
    GoTo Start
    let' say you want to send these in serial to PORTA.0

    %101010
    %10010
    %1111

    first i suggest you to begin with
    Porta.0=1
    pause 10

    this will force Serial out to High level. It appear that you must do it before send any serial data to avoid errors.

    i'm not sure that SEROUT will support those % so
    %101010 = 42
    %10010 = 18
    %1111= 15

    SEROUT PORTA.0,4,[42,18,15]

    will work


    and with this other
    Code:
    Recieve:
    cmcon0 = 7
    ansel = 0
    TRISA = 1
    TRISC = 0
    PORTC = 0
    Dat VAR BYTE
    
    'RF test program
    
    Start:
    
    SerIn PORTA.0,4,[10010],Dat   ; not sure that SERIN handle % May use [18]
    
    IF Dat = 1111 Then ;must write dat=%1111 or $0F
    PORTC.2 = 1
    Pause 500
    PORTC.2 = 0
    EndIF
    
    
    GoTo Start
    hope this help!
    Last edited by mister_e; - 9th November 2004 at 05:14.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Interfacing 16F88 to RF module
    By scomi85 in forum General
    Replies: 2
    Last Post: - 19th February 2009, 13:52
  2. problem with sending data using RF module
    By rano_zen06 in forum mel PIC BASIC Pro
    Replies: 51
    Last Post: - 10th April 2008, 18:08
  3. RF Module
    By shahidali55 in forum General
    Replies: 22
    Last Post: - 9th March 2007, 10:00
  4. Rf module
    By tangray in forum Adverts
    Replies: 0
    Last Post: - 7th August 2006, 08:14
  5. LINX RF module and PIC
    By Michael in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 18th January 2006, 23:44

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