Shop OBEX P1 Docs P2 Docs Learn Events
MIKE HELP or Anyone knows about XBEE — Parallax Forums

MIKE HELP or Anyone knows about XBEE

kenwtnkenwtn Posts: 250
edited 2008-06-15 14:57 in BASIC Stamp
Mike or Anyone That Can Help,
·
··········· I bought two (2) Zigbee XBee’s and when I received them I realized I needed more that those to connect to my BS2 Board of Education and my PC. I found a DTE Serial Converter on Microcontrollers Pro : http://microcontrollershop.com/product_info.php?cPath=297&products_id=2369 I contacted them and they told me the unit was just what I needed simply plug and use. I have attached the PDF and any help as to how I connect this to my BS2 on the Board of Education would be much appreciated. I have gone through a lot trying to get something that would give me a communication link and now close but lost. J

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-14 00:07
    Please do not use this connector by itself to connect to the xBee.· You probably will damage the xBee.

    Download the documentation for the xBee adapters from Selmaware ([noparse][[/noparse]url]http://www.selmaware.com[noparse][[/noparse]/url]).· These will allow you to connect an xBee to other I/O pins on a Stamp (not the programming port).· SparkFun may have an adapter for RS232 <--> xBee.· I'm not sure and I don't have access to my laptop right now.· You could use a MAX3232 since that's a RS232 <--> 3.3V logic adapter.· Maxim has datasheets showing how to hook this up.· It's pretty easy.
  • sylvie369sylvie369 Posts: 1,622
    edited 2008-06-14 02:46
    Get yourself a couple of AppBee-SIP (5-12V) PC boards from Selmaware:

    http://www.selmaware.com/appbee/home.htm

    There's a Sparkfun board too, but you'll need to do more design on your own to interface it:

    http://www.sparkfun.com/commerce/product_info.php?products_id=8276

    The Selmaware board does the interfacing for you.

    ·
  • kenwtnkenwtn Posts: 250
    edited 2008-06-15 13:28
    I want to thank you for the suggestions. I was hoping someone could look at the attachments and help me out. Before I bought the units I contacted Microcontroller and they told me that when I received the DTE Serial board all I need was to add the XBee no wiring needed. but I think I still have to add power and my question is do I use VIN? I so can I use any of the voltages that I have on the Board of Education?
  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-15 14:50
    Unfortunately, they don't provide enough information on the datasheet you included. It looks like you would have to provide Vin and Ground. It also looks like there's a voltage regulator on the board, but again, there's no information about the allowable input voltages. Probably you could connect Vin and ground on the DTE board with Vin and ground (Vss) on the Board of Education, but, without more information, it's impossible to tell for sure whether you'd end up destroying one or both boards. Check with Microcontroller.
  • kenwtnkenwtn Posts: 250
    edited 2008-06-15 14:57
    Mike,
    I know what you mean about information but that is all I could find. I went ahead and connected the VIN to the VDD and VSS on the board of education and that seemed to work. Thanks for everyones help. Lacking documentation this turned out to be a very simple way to go. The only other pins I needed to connect was TX, RX, and RTS to Pins 0, 1, and 6 on the Microcontroller. I used those pins only because sample code I had used them.

    ·I would like to use the serial port on the board of education but not sure if I can. Here is some sample code. Do you think it could be changed to use the port on the board of education?

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    ' **************************************
    ' * Get_RSSI.bs2······················ *
    ' * Illustrates accepting a Byte······ *
    ' * received as a character··········· *
    ' * and reads/displays RSSI dBm······· *
    ' **************************************
    myAddr··· CON $1···· ' Node Address
    DestAddr· CON $0···· ' Destination address
    Baud····· CON 84···· ' Baud rate, 9600, 8-N-1, non-inverted, on BS2.
    RX······· PIN 0····· ' Receive Pin
    TX······· PIN 2····· ' Transmit Pin
    RTS······ PIN 6····· ' Flow control Pin
    RFin····· VAR BYTE
    dBm······ VAR BYTE
    HIGH TX
    DEBUG CLS, "Configuring XBee..."
    PAUSE 2000······························ ' Guard time for command sequence
    SEROUT TX,Baud,[noparse][[/noparse]"+++"]·················· ' Enter command mode
    PAUSE 2000······························ ' Guard time for command sequence
    SEROUT TX,Baud,[noparse][[/noparse]"ATNI BS2 Test Node",CR, ' Set description
    ·············· "ATMY ", HEX myAddr,CR,·· ' Set node address
    ·············· "ATDL ", HEX DestAddr,CR, ' Set destination node address
    ·············· "ATD6 1",CR,············· ' Use RTS for flow control
    ·············· "ATGT 3",CR,············· ' Reduce Gaurd Time
    ·············· "ATCN",CR]··············· ' Exit command mode
    PAUSE 1000
    GOSUB WaitOK···························· ' Accept OK data
    DEBUG "Configuration Complete!",CR
    DO······································ ' Accept and view a character
    · SERIN RX\RTS,Baud,1000,Timeout,[noparse][[/noparse]RFin]
    · DEBUG RFin
    · GOSUB GetRSSI
    Timeout:
    LOOP
    GetRSSI:································· ' Read RSSI data
    · PAUSE 20······························· ' Guard time
    · SEROUT TX, Baud, [noparse][[/noparse]"+++"]··············· ' Command mode
    · PAUSE 2
    · SEROUT TX, Baud, [noparse][[/noparse]"ATDB",CR]··········· ' Request level
    · SERIN RX\RTS, Baud, 1000, Timeout2,[noparse][[/noparse]HEX dBm]·· ' Accept data
    · DEBUG "··· dbm: -", DEC dBm············ ' Display data
    Timeout2:
    · SEROUT TX, Baud,[noparse][[/noparse]"ATCN",CR]············ ' Exit command mode
    · GOSUB WaitOK··························· ' Accept OK from XBee
    · DEBUG CR
    RETURN
    WaitOK:
    · SERIN RX\RTS, Baud, 100,Timeout3, [noparse][[/noparse]RFin]·· ' Accept OK data
    · GOTO WaitOK
    Timeout3:
    RETURN

    Post Edited (kenwtn) : 6/15/2008 3:03:24 PM GMT
Sign In or Register to comment.