Shop OBEX P1 Docs P2 Docs Learn Events
Connecting the xbee's to propeller demo board - Page 2 — Parallax Forums

Connecting the xbee's to propeller demo board

24

Comments

  • chris joneschris jones Posts: 391
    edited 2010-10-29 20:08
    ok , i will give parallax a call first thing Monday i wish they were open on the weekend i am very frustrated with the xbee right now i heard they are very good tools but it seems like there hard to use.
    to answer the other question i have everything hooked up exactly like your example screenshot and i get the response that’s shows on the screen below.
    601 x 738 - 71K
  • chris joneschris jones Posts: 391
    edited 2010-10-29 20:44
    ok , i wrote a demo program from what i read in the chapter 5 for xbee in the pdf. this program simply sends a number to the other xbee.

    PROP1
    CON
    _clkmode = xtal1 + pll16x
    _xinfreq = 5_000_000

    ' Set pins and Baud rate for XBee comms
    XB_Rx = 5 ' XBee DOUT
    XB_Tx = 4 ' XBee DIN
    XB_Baud = 9600


    OBJ
    XB : "XBee_Object"

    Pub Start | Value
    XB.start(XB_Rx, XB_Tx, 0, XB_Baud) ' Initialize comms for XBee

    XB.Delay(1000) ' One second delay

    XB.str(string("Awaiting Data...")) ' Notify base
    XB.CR

    Repeat
    XB.Dec(1)
    waitcnt(cnt+40_000_000)
    XB.Dec(2)
    waitcnt(cnt+40_000_000) ' Send carriage return
    _____________________________________________________________

    PROP2
    CON
    _clkmode = xtal1 + pll16x
    _xinfreq = 5_000_000

    ' Set pins and Baud rate for XBee comms
    XB_Rx = 5 ' XBee DOUT
    XB_Tx = 4 ' XBee DIN
    XB_Baud = 9600


    OBJ
    XB : "XBee_Object"
    DEBUG : "FullDuplexSerial.Spin"

    VAR
    word x[50]
    Pub Start | Value
    XB.start(XB_Rx, XB_Tx, 0, XB_Baud) ' Initialize comms for XBee

    XB.Delay(1000) ' One second delay

    Repeat
    x := XB.Rx
    DEBUG.str(x)

    _____________________________________________________________

    and i still get nothing
  • Roger LeeRoger Lee Posts: 339
    edited 2010-10-29 21:10
    Chris,
    Good screen shot of the range test.

    There are very many settings(modem configuration) that have to be right.
    If even one is off you will get results of your range test.

    Can you tell me what XBEE modules you are using and what adapter boards you have. Perhaps a screen shot of modem configuration window.

    I just got mine in today, I'm not having the trouble you are.
    I did get the XBEE USB ADAPTER BOARD, so that may have made things easier for me. I need to use it some more XBEE to XBEE before trying it with a Propeller.

    Roger

    attached wiring I used for the remote loop-back test.
    nothing connected other than what you see.
    1600 x 1200 - 174K
  • W9GFOW9GFO Posts: 4,010
    edited 2010-10-29 22:00
    Chris, the other XBee should not have any pins connected to the propeller at all. It should have a jumper from DOUT to DIN. If you are using a second Demo Board for the "far" XBee, you are only using it as a power supply, nothing else.

    After loading SerialPassThrough.spin and then starting up the X-CTU program, choose the terminal tab and start typing. Do you see the characters that you type being echoed back? What you type shows in blue and the received characters are in red.

    It works for me, however when I attempt to range test I get the same time out message as you. I'm not sure why that is and I'm not concerned about it because when I use the XBee USB adapter it works just fine.

    Rich H

    attachment.php?attachmentid=74803&stc=1&d=1288416569
    402 x 600 - 43K
  • chris joneschris jones Posts: 391
    edited 2010-10-30 08:05
    ok i have my 1 xbee hooked to the computer with loopback on it here is what i get with the digikey software.

    so is this telling me that the xbee is working properly?
    618 x 738 - 91K
    607 x 738 - 64K
    866 x 784 - 48K
    664 x 233 - 39K
  • chris joneschris jones Posts: 391
    edited 2010-10-30 08:31
    Roger Lee wrote: »
    Chris,
    Good screen shot of the range test.

    There are very many settings(modem configuration) that have to be right.
    If even one is off you will get results of your range test.

    Can you tell me what XBEE modules you are using and what adapter boards you have. Perhaps a screen shot of modem configuration window.

    I just got mine in today, I'm not having the trouble you are.
    I did get the XBEE USB ADAPTER BOARD, so that may have made things easier for me. I need to use it some more XBEE to XBEE before trying it with a Propeller.

    Roger

    attached wiring I used for the remote loop-back test.
    nothing connected other than what you see.


    the XBEE model i am using is (XB24-ACI-001)
    i am using the non USB adapter board NOTE: i had dave for tec support solder it for me as my vision is very bad so the connections are perfect.

    Also i will be around teh computer all day if anyone would like to help. and thnaks to everyone that has helped me so far you gys are awesome.
    256 x 353 - 67K
  • Roger LeeRoger Lee Posts: 339
    edited 2010-10-30 09:31
    ok i have my 1 xbee hooked to the computer with loopback on it ...

    1 xbee with loopback? how do you have the other xbee wired up?
  • chris joneschris jones Posts: 391
    edited 2010-10-30 09:34
    ' Set pins and Baud rate for XBee comms
    XB_Rx = 5 ' XBee DOUT
    XB_Tx = 4 ' XBee DIN
  • Roger LeeRoger Lee Posts: 339
    edited 2010-10-30 09:40
    Chris, What happens when you click the "TEST/QUERY" box in X-CTU ?

    This is a shot of what I get. Yours should be similar.
    456 x 597 - 54K
  • chris joneschris jones Posts: 391
    edited 2010-10-30 10:35
    Roger Lee wrote: »
    Chris, What happens when you click the "TEST/QUERY" box in X-CTU ?

    This is a shot of what I get. Yours should be similar.

    i get an unable to communicate
  • W9GFOW9GFO Posts: 4,010
    edited 2010-10-30 10:36
    Roger Lee wrote: »
    1 xbee with loopback? how do you have the other xbee wired up?

    Just to be clear: You need to have two XBees. The first XBee is wired to the Propeller chip which is connected to your computer, the other XBee is NOT wired to the Propeller chip at all. It has it's DOUT connected to it's DIN.

    Rich H
  • chris joneschris jones Posts: 391
    edited 2010-10-30 10:41
    W9GFO wrote: »
    Just to be clear: You need to have two XBees. The first XBee is wired to the Propeller chip which is connected to your computer, the other XBee is NOT wired to the Propeller chip at all. It has it's DOUT connected to it's DIN.

    Rich H


    this is how i have mine hooked up i just wanted to make the point earlyer that i did have the one with loopback hooked to my computer.

    ALSO are the setings in my screenshot correct.
    248 x 254 - 4K
  • W9GFOW9GFO Posts: 4,010
    edited 2010-10-30 10:44
    When you load the code onto the Propeller using the Propeller tool you can see what com port it is using. Is it com 4?

    Also, be sure to close the X-CTU program each time you reload code onto the Propeller. I have had times when simply restarting X-CTU solved the problem.

    Rich H
  • W9GFOW9GFO Posts: 4,010
    edited 2010-10-30 10:55
    i just wanted to make the point earlyer that i did have the one with loopback hooked to my computer.

    The one with loopback should not be hooked to your computer. The one hooked to your computer is not doing the "looping back", it is sending the data out wirelessly to whatever XBees are listening.

    The far XBee, the one where DOUT is connected to DIN, is the one "looping back". The data that it receives gets pushed out of it's DOUT line. But since that DOUT is wired to the DIN the data is fed back into it and retransmitted back to the original XBee.

    Rich H
  • chris joneschris jones Posts: 391
    edited 2010-10-30 11:18
    yes, it is com4 also let me hook up the correct board to the PC i will put simple debug on that propeller board and the other board with loop back will be running serial pass through
  • W9GFOW9GFO Posts: 4,010
    edited 2010-10-30 11:21
    yes, it is com4 also let me hook up the correct board to the PC i will put simple debug on that propeller board and the other board with loop back will be running serial pass through

    No no no. The board which is connected to the PC is running SerialPassThrough, the other board, with loopback (DOUT connected to DIN) is running nothing.

    Rich H
  • chris joneschris jones Posts: 391
    edited 2010-10-30 11:25
    ok , sorry i need to pay closer attention sorry.
  • W9GFOW9GFO Posts: 4,010
    edited 2010-10-30 11:27
    No worries. :)
  • chris joneschris jones Posts: 391
    edited 2010-10-30 11:42
    ok here is what i get when i run the serial pass through code on the xbee with the pin configuration.........

    XB_Rx = 5 ' XBee DOUT
    XB_Tx = 4 ' XBee DIN

    my terminal program is blank on com3 thats the xbee thats hooked to the PC.

    the other xbee and propeller board is hooked to nothing and its pins are set to loop back.
    1600 x 1200 - 133K
    1600 x 1200 - 169K
    1600 x 1200 - 129K
    664 x 397 - 87K
    608 x 729 - 81K
  • W9GFOW9GFO Posts: 4,010
    edited 2010-10-30 12:02
    It looks to be wired correctly. I can't verify 100% that the wires go exactly where they are supposed to because they cross over each other and are the same color.

    If you run the Parallax Serial Terminal along with the X_CTU software it may cause a problem fighting over the same com port. Not once did I use the Parallax Serial Terminal.

    If you load the SerialPassThrough into Eeprom, you could just shut down the Propeller tool and forget about it, it doesn't need to be running. You only need to use the X-CTU program.

    Rich H
  • chris joneschris jones Posts: 391
    edited 2010-10-30 12:05
    ok i will make the c hange and update you. i am also headed to the store to get some better jumper wire.
  • chris joneschris jones Posts: 391
    edited 2010-10-31 07:37
    Hello

    sorry i did not return yesterday i got tied up with a few things . but i did try to close all propeller tools and still get the same results.
  • Roger LeeRoger Lee Posts: 339
    edited 2010-10-31 11:03
    Chris, Sorry you are having this trouble.

    My personal opinion is your computer is not finding the XBEE connected to it.
    It is important that you can get a positive result from the "Test/Query" button in X-CTU software (my screen shot post #40). I have not seen where you have gotten this result yet. Forgive me if you have and I missed it.

    To get this requires only one XBEE and no propeller at all.

    Hope this helps, good luck to you.
  • chris joneschris jones Posts: 391
    edited 2010-10-31 11:09
    @ Roger Lee

    so until i get a good query on my xbees it’s not working correct ?. Also i don’t have the USB adapter for the xbee but i have loopback setup on my propeller board. Will this work?
  • W9GFOW9GFO Posts: 4,010
    edited 2010-10-31 11:10
    Roger, remember that he does not have the USB adapter board but must rely upon the Propeller chip running SerialPassThrough.spin in order to communicate with the XBee using his computer.

    Rich H
  • chris joneschris jones Posts: 391
    edited 2010-10-31 11:15
    what setings did you set on the test query window
  • chris joneschris jones Posts: 391
    edited 2010-10-31 11:20
    from my window everythings seems to be hooked up correct its on com 4
    662 x 292 - 16K
  • Roger LeeRoger Lee Posts: 339
    edited 2010-10-31 11:30
    Good point guys, sorry. I'm still thinking.
  • W9GFOW9GFO Posts: 4,010
    edited 2010-10-31 11:30
    Okay, lets try this;

    1. Reboot your computer
    2. Download the attached files into a separate folder, open up SerialPassThrough.spin using the Propeller tool. It is the exact same code that works for me (except I changed the XBee baud to 9600 to match yours)
    3. Make sure the XBee demo board is wired up correctly and connected to the USB cable.
    4. Press F11 to load the code into the Propellers EEPROM
    5. Close the Propeller Tool
    6. Open the X-CTU program and verify settings are as follows;
    * Baud = 9600
    * Flow Control = NONE
    * Data Bits = 8
    * Parity = NONE
    * Stop Bits = 1
    7. Press the "Test / Query" button.
    8. What is the result?

    Rich H
  • W9GFOW9GFO Posts: 4,010
    edited 2010-10-31 13:11
    Hey Chris, I opened up your previous image in a photo editing program for closer examination and it does look to me like you have pins 4 and 5 reversed.

    Try swapping those and see if it makes a difference.

    Rich H
Sign In or Register to comment.