Wireless modules - help with code not working


Closed Thread
Results 1 to 32 of 32

Hybrid View

  1. #1
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Wireless modules - help with code not working

    Dick,

    Yes it was interesting to say the least on their forum.

    They didn't seem to like it when I gave them test results. What exactly did they want as a post "It doesn't work" perhaps, with no details of tests carried out.

    Can't believe he thought that scope results weren't useful.

    Trouble is for me, my friend paid for all the parts for this project. So far he's up to $200 ish for everything for the two units. That's not far off a commercially available solution. If I return the modules for a refund, which I don't want to do I prefer a tested pair, then there's still the ancillary parts to account for.

    If you need a simple design for a yagi aerial for greater range I have a doc with details of one.

    Rob
    Last edited by tasmod; - 28th April 2013 at 10:43.

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default Re: Wireless modules - help with code not working

    I am intersted in the yagi design. If you can post it I 'd be oblidged.

    Regarding the modules of yours, I am not familiar with these, but have tested xbee pro 868 and are more than great.

    Also have tested y-lynx.com modules and they are even better but larger in size and price.

    Ioannis

  3. #3
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Wireless modules - help with code not working

    Hi Loannis,

    I have two docs in Word format which are pages from the internet. (Can't remember where from)

    I will try to add them as attachments here. If they don't attach I will post a link to a hosting for a few days downloading.

    Rob
    Attached Files Attached Files

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default Re: Wireless modules - help with code not working

    Hi Rob. Thanks for the files. I found also the corresponding sites too.

    Ioannis

  5. #5


    Did you find this post helpful? Yes | No

    Default Re: Wireless modules - help with code not working

    Rob,
    I now have my two XRF transceivers set up and functioning. However, I'm experiencing the same problem as you have reported ... unable to communicate rf from a PIC and PBP.

    The hardware and wiring checks out good. Using a terminal program (TeraTerm) and a USART to USB Bridge cable (CP210x), the radio loop-back link works perfectly. Also, the AT command mode functions correctly for both devices.

    The comms do not work when driving the radio from a PIC USART. Sample code:
    Code:
    '**************************************************************************
    '*Program to test XRF radio communications via loopback method            *
    '*Uses a pushbutton switch on porta pin 4                                 *
    '*Target processor is PIC 12f1822                                         *
    '*321 program words, revised 05/05/2013                                   *
    '*Program by Dick Ivers                                                   *
    '*All rights reserved                                                     *
    '************************************************************************** 
    'set 12f1822 configurat1on
    #CONFIG
      __config _CONFIG1, _FOSC_INTOSC & _MCLRE_OFF & _CLKOUTEN_OFF & _WDTE_ON
      __config _CONFIG2, _PLLEN_OFF & _LVP_OFF
    #endconfig
    
    'set registers
            OSCCON = %01101000   '4 mhz osc
            OSCTUNE = 0          'factory calibration
            ANSELA = 0           'all digital inputs
            OPTION_REG.7 = 0     'global pullups enabled
            WPUA = %010000       'porta pin 4 weak pullup enabled
            CM1CON0.7 = 0        'comparator disabled
            TRISA  = %011110     'PORTA.0 & porta.5 are outputS, all others input
    
        while OSCSTAT.0 = 0    'wait for stable freq.
        wend
        
        define OSC 4            '4 mhz oscillator
    
    'Define hserout parameters 
        define HSER_RCSTA 90h
        define HSER_TXSTA 20h
        define HSER_BAUD 9600
        define HSER_CLROERR 1           'clear overflow error
        
        APFCON.7 = 1   'rx on ra1 (12f1822)
        APFCON.2 = 1   'tx on pin ra0 (12f822)
        
        i var byte
        char var byte
    
    
        For i = 1 to 3
        porta.5 = 0     'led on
        pause 333
        porta.5 = 1     'led off
        pause 333
        next
        
    
    asleep:
        nap 2   'delay 4 ms
        if porta.4 = 1 then asleep
        
    
    DT:
        hserout [dec 5]
        hserin 100,blink,[dec char]
        if char = 5 then
        porta.5 = 0    'led on
        goto halt
        endif
         
    blink:
        porta.5 = 0     'led
        pause 50
        porta.5 = 1     'led off
        pause 50
        if porta.4 =1 then asleep
        goto DT   
       
    halt:
        stop
    I saw your latest post on the Ciseco forum. You are not getting much help there. Do you have any further test results?

    Dick
    Last edited by Dick Ivers; - 5th May 2013 at 17:01.

  6. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default Re: Wireless modules - help with code not working

    @ tasmod:

    You are using Serout with N9600 but I think the modules you are using need data be in true mode and not inversed. So use serout with T9600.

    @ Dick:

    I think for the 1822, you need to set TXSTA at $24. At $20 no 9600 is supported.

    Look at page 299-300 of the data sheet.

    Ioannis
    Last edited by Ioannis; - 6th May 2013 at 18:53.

  7. #7


    Did you find this post helpful? Yes | No

    Default Re: Wireless modules - help with code not working

    Ioannis,
    Thanks, I will try your suggestion. Unfortunately, not right now ... my computer broke down over the weekend. I'm writing this from a borrowed laptop.
    Dick

Similar Threads

  1. Wireless modules and simple setup, what is required?
    By tasmod in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 11th April 2013, 17:57
  2. Low latency Wireless RF transceiver modules?
    By mark155 in forum General
    Replies: 0
    Last Post: - 4th March 2010, 05:20
  3. Wireless modules FCC approved
    By Michael in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 7th September 2008, 02:23
  4. Software RS232 and wireless modules
    By Michael in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 17th August 2008, 05:27
  5. Wireless comms with Linx LR modules
    By telemark in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 2nd July 2006, 01:58

Members who have read this thread : 1

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