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

Connecting the xbee's to propeller demo board

13

Comments

  • chris joneschris jones Posts: 391
    edited 2010-10-31 14:01
    ok , i am also trying your other post and restarting my stsyem and makeing new folders etc.....
  • chris joneschris jones Posts: 391
    edited 2010-10-31 14:08
    W9GFO wrote: »
    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


    The verdict is in and i still get the same results and i did swap the pins and change the pin layout to

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

    andf the results from test is unable to find model.
    987 x 934 - 864K
  • W9GFOW9GFO Posts: 4,010
    edited 2010-10-31 14:17
    I don't know why you changed the pin assignments, unless you changed the way you wired up the XBee.

    This image of yours shows (I think) that you have DOUT connected to Pin 4, but it should go to Pin 5. It also shows DIN going to Pin 5 but it should go to Pin 4. If you were to just swap the wires around then it will match the programs that I attached to my earlier post.

    Either change the Pin assignments to:

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

    and leave the wires as they are in your picture...

    OR

    Swap the wires on the demo board and keep the pin assignments as:

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

    Rich H
  • chris joneschris jones Posts: 391
    edited 2010-10-31 14:31
    ok i changed my pins back to

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

    same outcome.........

    wow i feel stupid everyone has theres working but me.
  • chris joneschris jones Posts: 391
    edited 2010-10-31 14:41
    how do i know if the xbee's are any good maybe i just have a bad set.
  • W9GFOW9GFO Posts: 4,010
    edited 2010-10-31 15:10
    ok i changed my pins back to

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

    same outcome.........

    wow i feel stupid everyone has theres working but me.

    And you left the wires the same as they were yesterday?

    It is possible that you have a defective XBee but it is unlikely that both are defective. You could swap the other XBee onto your demo board. If that one also doesn't work then it probably is not the XBees - unless they have been damaged somehow.

    Take it step by step, do a continuity check using a multimeter with the demo board powered off to verify that each pins goes where it should.

    Wire them just like this:

    attachment.php?attachmentid=74721&stc=1&d=1288153364

    I've included the files again, do not change anything.

    Load SerialPassThough.spin, turn the Demo Board back on and use F11 to load to EEPROM. Not RAM because we don't want to lose the program if the power is cycled.

    Then close the Propeller tool and open up X-CTU and click on Test / Query.

    If it doesn't work, remove the XBee and replace it with the other one and try again.

    Then, if still no joy at least you will know that you have been very thorough in trouble shooting and can communicate what you have done to tech support tomorrow morning.

    Rich H
  • Roger LeeRoger Lee Posts: 339
    edited 2010-10-31 20:59
    I now have 2 XBee talking back and forth using 2 computers.

    1) Desktop using USB adapter (item code 32400) and X-CTU

    2)Laptop using adapter board (item code 32403) and X-CTU
    with Serial_Pass_Through running on propeller.

    Anything typed in one terminal window shows up on the other one.

    I get the same message as Chris from Laptop when I try "Test/Query" button. Range test fails, and modem configuration can not read the XBEE.

    By only using Tx and Rx from propeller, it just can't get that information out of the XBee.
  • W9GFOW9GFO Posts: 4,010
    edited 2010-10-31 21:06
    Test / Query works for me using SerialPassThrough, the range test does not.

    Rich H
  • Roger LeeRoger Lee Posts: 339
    edited 2010-10-31 21:24
    W9GFO wrote: »
    Test / Query works for me using SerialPassThrough, the range test does not.

    Rich H

    Interesting...
  • chris joneschris jones Posts: 391
    edited 2010-11-01 16:31
    Roger Lee wrote: »
    Interesting...


    so do you think my XBEE adapter is not working correctly Item Number (32403)

    i see everyone that uses the USB adapter board everything works good.
  • chris joneschris jones Posts: 391
    edited 2010-11-02 05:58
    i have contacted tech support guys and i will see how far i get.
  • Roger LeeRoger Lee Posts: 339
    edited 2010-11-02 07:07
    so do you think my XBEE adapter is not working correctly Item Number (32403)

    At this point that is a real possibility.

    Hope tech support can get you moving forward.
  • chris joneschris jones Posts: 391
    edited 2010-11-02 19:09
    so i talked with tech support today and found out that i cant do what i was wanting to do in chapter 5 but chapter 6 has what i need kinda.

    http://forums.parallax.com/showthread.php?t=126025

    i have the code and it comes up on the screen but i am lost on what i do once i pich query remote.........

    it asks me for a Hex value what hex value and what address do i need to put in ?
    1232 x 745 - 152K
  • Roger LeeRoger Lee Posts: 339
    edited 2010-11-02 21:15
    Default value for address is 0 (zero).
    Both the "MY" address and "DL" start out at zero until changed.

    No way to tell at this point if anything have been changed from starting point.

    I have not looked at chapter 6 in the tutorials at all, so can't help you there.
  • chris joneschris jones Posts: 391
    edited 2010-11-03 07:23
    ok , this picture is confusing me i have the propeller base wired correctly. But what’s going on the remote propeller board where do i connect DOUT and DIN
    960 x 678 - 59K
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2010-11-03 10:59
    I really don't think you want to be in Chapter 6. That is the very advanced chapter where the XBee is sending data automatically from the digital and analog inputs and using API mode where data has to be specially packaged. Chapter 6 in general is beyond what you are trying to accomplish in simply sending data.

    I've read through all the posts on this, and unfortunately I can't add to what has been said or recommended so far.

    What are you trying to accomplish that can't be done from prior chapters? Is your loopback working yet? Chapter 5 has the information on transmitting data between propellers.

    -Martin
  • chris joneschris jones Posts: 391
    edited 2010-11-03 11:38
    Hello

    i spoke with tech support at parallax and i was told that i can’t do anything in chapter 5 since i don’t have a prop plug but a demo board and the USB chip on the demo board acts as a master and will not work with my current setup.

    My goal is to send simple data to another xbee and have both xbess sending data back and forward.
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2010-11-03 12:01
    But what will each XBee be connected to? One will connected to a Propeller, sending data to another XBee connected to...? It either sends data for interaction with a serial terminal or with another controller.

    -Martin
  • chris joneschris jones Posts: 391
    edited 2010-11-03 12:14
    both xbees are hooked to there own demo board and have the same pin sets on both.
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2010-11-03 13:17
    Great, then you need to be in Chapter 5. It demonstrates sending data between 2 propellers.
  • chris joneschris jones Posts: 391
    edited 2010-11-03 13:52
    can you help me with chapter 5. the parallax team said that chapter 5 requires a prop plug that i do not have.
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2010-11-03 14:24
    I'm not sure why you would have been told that, it's simply an XBee on one Propeller controlling hardware on another Propeller via the XBee.

    Let me try to work up an example tonight, but give some direction - Do you want one Propeller (a remote one) to simply send a value to another Propeller (a base one) to be accepted and viewed in the terminal window?

    I'd like to provide a good example. For connections, I'm going to follow what's in chapter 5 but skip all the I/O hardware. That first example for the Propeller in Chapter 5 shows simply sending values to control hardware on another example, so I'm guessing something less complex than that?

    -Martin
  • chris joneschris jones Posts: 391
    edited 2010-11-03 14:32
    my overall goal is to send a value to an xbee 2 way. for exmpale

    i send a string to a remote xbee it gets the value and displays it.This may require 2 cogs one to transmit and one to recive.
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2010-11-03 19:39
    Chris,
    Here's your code, attached. To be on the safe side, it sends and receives 2 values for illustration of sending multiple values.

    When you connect the XBee, make sure DIN & DOUT pins are set properly for XB_Rx and XB_Tx, and XBee board has power of course.

    Download the SAME program to both the base and remote. When it receives data, it displays it to a terminal window. If you aren't going to monitor one side, or have the cable connected, comment out any PC. instructions to prevent resets of the Propeller.

    The program simply increments and sends 2 values, and accepts and displays 2 values using 2 different Cogs.

    Good luck...
    -Martin
  • chris joneschris jones Posts: 391
    edited 2010-11-04 05:38
    Chris,
    Here's your code, attached. To be on the safe side, it sends and receives 2 values for illustration of sending multiple values.

    When you connect the XBee, make sure DIN & DOUT pins are set properly for XB_Rx and XB_Tx, and XBee board has power of course.

    Download the SAME program to both the base and remote. When it receives data, it displays it to a terminal window. If you aren't going to monitor one side, or have the cable connected, comment out any PC. instructions to prevent resets of the Propeller.

    The program simply increments and sends 2 values, and accepts and displays 2 values using 2 different Cogs.

    Good luck...
    -Martin


    when i run your code i get blank terminal windows is there something else that i need to do. here is my pin layout

    XB_Rx = 0 ' XBee DOUT
    XB_Tx = 1 ' XBee DIN

    and power and ground
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2010-11-04 09:24
    Chris,
    If you have one board not connected to a PC/terminal, ensure you comment out any PC. lines so it doesn't reset your Propeller (happens on some boards).

    Ensure your baud rate to the terminal program is correct.

    Ensure your pins matches the code.

    If it's running on both sides, it should work - send values back and forth.

    -Martin
  • chris joneschris jones Posts: 391
    edited 2010-11-04 12:05
    Chris,
    If you have one board not connected to a PC/terminal, ensure you comment out any PC. lines so it doesn't reset your Propeller (happens on some boards).

    Ensure your baud rate to the terminal program is correct.

    Ensure your pins matches the code.

    If it's running on both sides, it should work - send values back and forth.

    -Martin


    1. Comment any PC lines out ?
    2. Baud rate set to 9600
    3. XB_Rx = 0 ' XBee DOUT
    XB_Tx = 1 ' XBee DIN
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2010-11-04 17:08
    With the "Comment out PC lines", some of the boards will reset the Propeller if you try to send serial data to the PC if the cable is not connected.

    So, PC.str, PC.dec, etc should be commented out.

    -Martin
  • chris joneschris jones Posts: 391
    edited 2010-11-05 05:38
    With the "Comment out PC lines", some of the boards will reset the Propeller if you try to send serial data to the PC if the cable is not connected.

    So, PC.str, PC.dec, etc should be commented out.

    -Martin

    if i comment out everything that has PC how will i see it in my serial terminal ?
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2010-11-05 05:53
    I said to do it IF it's not connect to the PC.

    -Martin
Sign In or Register to comment.