Shop OBEX P1 Docs P2 Docs Learn Events
Proper Pins on a Prop BOE to connect to a XBee — Parallax Forums

Proper Pins on a Prop BOE to connect to a XBee

Prophead100Prophead100 Posts: 192
edited 2013-09-30 21:49 in Accessories
I was trying the code with the tutorial "Wireless XBee Communication" at http://learn.parallax.com/node/362 on a Prop Board of Education and it worked fine when I hooked the receiver up to pins 6 and 7 as per the documentation. It also worked when I hooked it up directly to pin 14/15. However, when I tried to run the receiver code on pins 14/15 or 18/19 via the Servo connections it did not work. The schematic shows a 39K resistor on those pins. Does that reduce the amps/voltage too much? Is there something about the board or those pins that is an issue with the xbee serial connection to the Prop?

This worked
..
OBJ

  system : "Propeller Board of Education"              ' PropBOE configuration tools
  pst    : "Parallax Serial Terminal Plus"             ' Terminal communication tools
  time   : "Timing"                                    ' Timing convenience methods
  xb     : "XBee_Object_1"                             ' XBee communication methods

PUB Go | c

  system.Clock(80_000_000)                             ' System clock -> 80 MHz

  pst.Start(115_200)                                   ' Start Parallax Serial Terminal

  xb.start(7,6,0,9600)                                 ' Propeller Comms - RX,TX, Mode, Baud
  xb.AT_Init                                           ' Initialize for fast AT command use - 5 second delay to perform
  xb.AT_ConfigVal(string("ATMY"), 9)                   ' Set MY address to 9
  xb.AT_ConfigVal(String("ATDL"), 8)                   ' Set Destination Low address to 8
                                                         
  repeat                                               ' Main loop
    c := xb.rxCheck                                    ' Check buffer
    if c <> -1                                         ' If it's not empty (-1)
      pst.Char(c)                                      ' Then display the character



This didn't work
OBJ

  system : "Propeller Board of Education"              ' PropBOE configuration tools
  pst    : "Parallax Serial Terminal Plus"             ' Terminal communication tools
  time   : "Timing"                                    ' Timing convenience methods
  xb     : "XBee_Object_1"                             ' XBee communication methods

PUB Go | c

  system.Clock(80_000_000)                             ' System clock -> 80 MHz

  pst.Start(115_200)                                   ' Start Parallax Serial Terminal

  xb.start(19,18,0,9600)                                 ' Propeller Comms - RX,TX, Mode, Baud
  xb.AT_Init                                           ' Initialize for fast AT command use - 5 second delay to perform
  xb.AT_ConfigVal(string("ATMY"), 9)                   ' Set MY address to 9
  xb.AT_ConfigVal(String("ATDL"), 8)                   ' Set Destination Low address to 8
                                                         
  repeat                                               ' Main loop
    c := xb.rxCheck                                    ' Check buffer
    if c <> -1                                         ' If it's not empty (-1)
      pst.Char(c)                                      ' Then display the character

Comments

  • FranklinFranklin Posts: 4,747
    edited 2013-09-29 14:46
    If you don't put your code in code blocks ([code]) the indenting is lost and for propeller code that makes it not work at all.
  • Prophead100Prophead100 Posts: 192
    edited 2013-09-29 18:34
    Franklin wrote: »
    If you don't put your code in code blocks ([code]) the indenting is lost and for propeller code that makes it not work at all.
    OK, basically only the pin #s were changed
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-09-29 19:35
    Since the resistors are in series with the I/O pin and the XBee side is pulled high, I am guessing the servo connectors aren't going low enough to be considered a logic 0. I would use the pins directly as you originally did since you know those work.
  • Prophead100Prophead100 Posts: 192
    edited 2013-09-30 21:49
    Since the resistors are in series with the I/O pin and the XBee side is pulled high, I am guessing the servo connectors aren't going low enough to be considered a logic 0. I would use the pins directly as you originally did since you know those work.
    That solved it. Thanks
Sign In or Register to comment.