[Guide]: How to Change XBee Baud Rate

Bluetooth, XBee, RF......

[Guide]: How to Change XBee Baud Rate

Postby aurora » Mon Dec 20, 2010 4:05 am

I haven't see anyone talk about it yet, but I had my baud rate increase from 9600bps to 100,000 bps.

This information wasn't in the SKXbee User Manual, but can be dig from the OEM datasheet. In summary, here's how:

ATBD 0 (Baud rate = 1200 bps)
ATBD 1 (Baud rate = 2400 bps)
ATBD 2 (Baud rate = 4800 bps)
ATBD 3 (Baud rate = 9600 bps)
ATBD 4 (Baud rate = 19200 bps)
ATBD 5 (Baud rate = 38400 bps)
ATBD 6 (Baud rate = 57600 bps)
ATBD 7 (Baud rate = 115200 bps)
or ATBD xxxx (where xxxx is hex number, i.e. ATBD 186A0 for baud rate of 100,000 bps)

then follow by:
ATWR (write to non-volatile memory)

Once complete, remember to change your baud rate under 'PC Setting' tab. 'Test/Query' to see if it works. For non-standard baud rate, you can change the baud rate by typing in the 'Baud Rate' drop down menu.

Additional info:
The XBEE is running on 16Mhz, and the SPBRG calculation applied. The theoretical vs actual speed:
1200 bps (theoretical) = 1202 bps (actual)
2400 bps (theoretical) = 2404 bps (actual)
4800 bps (theoretical) = 4808 bps (actual)
9600 bps (theoretical) = 9615 bps (actual)
19200 bps (theoretical) = 19231 bps (actual)
38400 bps (theoretical) = 38462 bps (actual)
57600 bps (theoretical) = 58823 bps (actual)
115200 bps (theoretical) = 111111 bps (actual)

Not so accurate, and it was disastrous at high speed (my serial comm @115,200bps lasted me average of 2-3 minutes before it hanged.)

By understanding the actual baud rate, and changing to non-standard baud rate, it can help to decrease error, best case to 0% error. For example:

XBEE (16Mhz) - 100,000 bps (theoretical = actual)
uC (40Mhz) - 100,000 bps (SPBRG = 25)

XBEE (16Mhz) - 62,500 bps (theoretical = actual)
uC (10Mhz) - 62,500 bps (SPBRG = 10)

XBEE (16Mhz) - 125,000 bps (theoretical = actual)
uC (10Mhz) - 125,000 bps (SPBRG = 5)

Enjoy.. :mrgreen:
aurora
Discoverer
 
Posts: 126
Joined: Sun Jun 07, 2009 4:52 pm

Re: [Guide]: How to Change XBee Baud Rate

Postby aurora » Mon Dec 20, 2010 4:20 am

Under 'Modem Configuration', you can check a list of all the parameters.

Here to a newer XCTU software.

Or you can just download the latest version for your XBEE device. Your device version number is listed in the 'Test/Query' pop-up window. Unzip and paste the file in C:\Program Files\Digi-MaxStream\XCTU\update\xbee.
aurora
Discoverer
 
Posts: 126
Joined: Sun Jun 07, 2009 4:52 pm

Re: [Guide]: How to Change XBee Baud Rate

Postby hyng » Mon Dec 20, 2010 10:19 am

Nice guide.. :D
User avatar
hyng
Moderator
 
Posts: 292
Joined: Thu Apr 16, 2009 11:35 am

Re: [Guide]: How to Change XBee Baud Rate

Postby aurora » Mon Dec 20, 2010 1:35 pm

hyng WROTE:Nice guide.. :D
Thanks. :mrgreen:

Here's a pictorial guide:

The blue font are type by user, while the red font are echo from the Xbee.
My baud rate was 57600 bps (ATBD = 6), and where I change to 100,000 bps (ATBD 186A0)

Image

Back to 'PC Setting', and change the 'Baud Rate' to 100000.

Image

Success..!! :mrgreen:
aurora
Discoverer
 
Posts: 126
Joined: Sun Jun 07, 2009 4:52 pm

Re: [Guide]: How to Change XBee Baud Rate

Postby ober » Tue Dec 21, 2010 8:28 am

aurora, very good guides and sharing, keep it on! :D
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: [Guide]: How to Change XBee Baud Rate

Postby shahrul » Sat Dec 25, 2010 8:10 pm

That's good. How sharing interface the unequal logic level. PIC logic 5V, XBee logic level 3.3V. Before, one my friends have connected directly and it's working. But I think this logic converter also the solution.
Image
http://www.sgbotic.com/index.php?dispat ... uct_id=209
User avatar
shahrul
Professional
 
Posts: 812
Joined: Sat May 16, 2009 9:54 pm
Location: Selangor

Re: [Guide]: How to Change XBee Baud Rate

Postby aurora » Mon Dec 27, 2010 11:36 pm

shahrul WROTE:That's good. How sharing interface the unequal logic level. PIC logic 5V, XBee logic level 3.3V. Before, one my friends have connected directly and it's working. But I think this logic converter also the solution.
Image
http://www.sgbotic.com/index.php?dispat ... uct_id=209


I won't mind writing a guide for that, if you can lend me a unit of those for testing :roll: :lol:

Actually, I only have the SKXBee. I'm not really into DIY of the level converter circuit. What really worth it (SKXBee) is the USB, and software support (X-CTU) which is great for troubleshooting. Might give it a try later after I complete my current project... ;)
aurora
Discoverer
 
Posts: 126
Joined: Sun Jun 07, 2009 4:52 pm


Return to Wireless Device

Who is online

Users browsing this forum: No registered users and 10 guests