PDA

View Full Version : XBee Baud rates.



KurtEck
10-21-2009, 12:24 PM
I have been playing around with communications between the Lynxmotion DIY robot controller (Project) and with one or more robots, using XBees instead of the RC transmitter/receiver.

I am currently using Series 1 Xbees and they are working pretty well. (I do have 2 series 2s but I bricked one of them and so far the unbrick approaches have not helped)

I am currently running them at 38400 baud rate on Atom Pro 28s running at 16mhz, using the hardware serial port on the BAPS. I was thinking of trying to run them at higher baud rates, such as 576K or the 114K but I do not think there is a hardware baud rate that would be close enough. For example the closest to 115.2K is 125K which is off by 8.5%.

So my question is, has anyone tried the non-standard baud rates on the XBEES?

For example to I set the baud rate to 62500, I would use the command:
atbd f424
The xbee users guide mentions that the value saved may not be equal to the value passed in, so I tried a quick test using X-CTU and first set it to F424, did a query and it returned F424 after which I set it back to 3 (9600).

Suggestions?
Thanks
Kurt

KurtEck
10-27-2009, 04:08 PM
I thought I would answer my own question and so I have now updated 2 of my xbees to 62500 by using the command:
ATBD F424.

So far it appears like this is working fine and looking at the logic analyzer probably speed up my packets by maybe 2.5-3ms. The next higher HSERIAL speed I can set is 125000

Quick Update: XBee will not allow baud rate to be set above 115200.

Kurt

DresnerRobotics
10-27-2009, 05:26 PM
I believe the Pro models can be set to 250k baud, however.

gdubb2
10-27-2009, 06:36 PM
I have the Pro's, and they can only go to 115200 with the normal settings using XCTU. I didn't try a nonstandard mode, but the manual indicates 115200 is the top of the range. Of course I may have missed something.

Gary

DresnerRobotics
10-27-2009, 06:49 PM
I have the Pro's, and they can only go to 115200 with the normal settings using XCTU. I didn't try a nonstandard mode, but the manual indicates 115200 is the top of the range. Of course I may have missed something.

Gary

You have to set it in terminal mode, which is what Kurt is tinkering with here.

KurtEck
10-27-2009, 07:14 PM
Thanks guys,

I am currently trying it on both Atom Pro28s as well as on a Pro40. I am also using the hardware serial port. After I tried XCTU to try 125000 and it failed, I verified in the manual that the max is 115200.

I wanted to simply use the H115200, but I tried this out previously trying to talk to an SSC-32. When this did not work, I looked at the generated signals using a logic analyzer (www.saleae.com (http://www.saleae.com)) and found that the timings were way off.

So I read through SCI3 section of the H8/3687 manual and confirmed with email from Nathan at Basic Micro, I found that on the BAP40 or Bap28 that specifying a baud rate of 115200 is translated into 125000. This is because the hardware serial port bit timings are in increments of 32 clocks. Which translates to (20mhz/(5*32) = 125000 which is off by 8.5% On a Bap28 running at 16mhz this is also true as the closes is: 16mhz/(4*32)=125000

That is why I tried the 62500 as this works out to no error on either Baps and it is the next nearest defined baud rate. Maybe later I will go and tweak the hardware port settings to get something like 100000, but for now this is probably good enough.

Well back to figuring out why the timeouts don't appear to be working as I expect in Hserin2.

Kurt

Adrenalynn
10-27-2009, 07:55 PM
He was talking about the XBee Pro, not the AtomPro.