MIKE HELP or Anyone knows about XBEE
kenwtn
Posts: 250
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
·
··········· 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
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.
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.
·
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