pic16f88, xbee's & point-2-point comms


Results 1 to 3 of 3

Threaded View

  1. #2
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    I will think loud on how I would solve the problem.


    Six XBee sensors are all slave addresses are : S01 S02 .... S06

    XBee coordinator is the master, so no address is needed

    Slave S01 has data to send so, "S01" + Data will be Tx out

    Immediatly after Tx action, Slave S01 go to RX loop count routine and here waits master ACK.

    Code:
    LoopCount:
    
    Count=Count+1
    if Count=XX then 
    Count=0
    Time= Time +1
    goto Tx again
    endif
    
    If Time=YY then error
    
    SERIN2 RX\RTS, baud, 2500, LoopCount, [Wait("S01"),  Data]
    
    If Data=6 then main
    
    goto LoopCount

    This action will be repeated so many time as judged feasible using variable XX while variable YY will trigger an error in case of no response.

    Master receive address + data then answer with received slave address + ACK

    Slave Receive the proper address + ACK then delete data and return to main loop. (This will avoide to disturb the other slaves which will ignore the Tx)

    Collisons are not avoided but ignored since Slaves will continue to Tx address + Data till it receives its address + ACK

    The same will apply for all the other slaves.

    Al.
    Last edited by aratti; - 31st January 2009 at 19:41.
    All progress began with an idea

Similar Threads

  1. Single digit 7 Seg LED clock - PIC16F88
    By thirsty in forum Code Examples
    Replies: 4
    Last Post: - 17th July 2009, 08:42
  2. Optimizing DIV
    By skimask in forum mel PIC BASIC Pro
    Replies: 41
    Last Post: - 22nd September 2008, 04:58
  3. Replies: 20
    Last Post: - 13th May 2007, 05:10
  4. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  5. Replies: 8
    Last Post: - 7th December 2006, 15:42

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