PST through Xbee
Thric
Posts: 109
Hi all,
I finally got my pcb together today (my first one) and it worked ! I have an xbee on it and I just got the Idea of trying to use it to connect it to the Parallax terminal with one xbee connected my computer and another xbee connected to my prop. Would this work? I'm using http://obex.parallax.com/objects/146/·for an xbee controller and it seems to start fine but when I do pst.startrxtx(xbeerx,xbeetx,0,9600) nothing shows on my screen. Any thoughts, suggestions?
Thanks
I finally got my pcb together today (my first one) and it worked ! I have an xbee on it and I just got the Idea of trying to use it to connect it to the Parallax terminal with one xbee connected my computer and another xbee connected to my prop. Would this work? I'm using http://obex.parallax.com/objects/146/·for an xbee controller and it seems to start fine but when I do pst.startrxtx(xbeerx,xbeetx,0,9600) nothing shows on my screen. Any thoughts, suggestions?
Thanks
Comments
Thanks
The two modules must have the same:
CH (Channel)
ID (Personal Area Network)
(they should have come out of the box with matching settings, but you could verify)
The DL of the transmitting XBee must match the MY of the receiving one, OR
the DL of the transmitting XBee must be set to 0xFFFF (broadcast)
(DL: Destination address lower 16 bits)
(MY: Source address)
You can set these things at run time using your Spin code for the XBee connected to the Prop, but the one connected to the computer must have those settings set and written to the XBee's memory. It's probably easiest for you if you set them both and write the settings to the XBee's memory. You should be able to do that using the Sparkfun board and the XCTU software (free download from Digi.com). You could use a regular terminal program instead if you preferred.
You seem to already be aware that the XBees come out of the box set to communicate at 9600 baud - make sure that's the current setting for BD, and of course for all of your communications with the XBee (from the Prop and from the XBee to PST).
Post Edited (sylvie369) : 7/12/2010 9:26:50 PM GMT
Thanks!
I'm recieving data, which I can see both on the XCTU terminal and the PST terminal however the data I'm recieveing is just random junk incorporated with some letters, mostly just periods. Heres· the program I'm using:
Thanks
Usually garbled data indicate something wrong with the baudrate/data format. Both XBees are at 9600? And the Prop code uses 9600, and the PST is set up for that rate as well?
I know that the transmissions from the prop do correlate with what I· am recieveing on either the X-CTU terminal or the PST screen, as the transmissions stop when I power down the prop.
I double checked the settings on the xbee and both are at 9600, both terminal screens also use 9600.
Any more pointers appreciated.
Thanks
waitcnt(clkfreq / 1000 * 1000 + cnt ) ' 1 second delay
Looks ok otherwise.
-Martin