Pages: [1]   Go Down
Author Topic: Understanding Baud Rate  (Read 724 times)
0 Members and 1 Guest are viewing this topic.
Indiana
Offline Offline
Jr. Member
**
Karma: 1
Posts: 61
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I understand what baud rate is, but I am trying to find out if there is ever a reason to use a lower baud rate (9600) vs. a higher baud rate (115200).  Assuming the devices that the data is being transferred between are capable of the higher speed (115200) why would anyone ever use a lower baud rate?  I see many sketch examples that by default set the baud rate to 9600 and it makes me think there is a reason why people are using the lower rate.  Is the data more reliable at lower baud rates, less prone to communication errors?

Thank you in advance.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 534
Posts: 26969
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you have crummy cabling, or long distances, poor grounding, noisy environment, then slower baud rates can give more reliable results. Slower also uses less power as CMOS power consumption is switching frequency dependent.
If the serial comm's are buffered first, so that RS232 type levels (+/- 3 to +/-12V, one wire for send, one for receive, plus Gnd) or RS485 type signals (+/-3V, but with 2 wires for sending, 2 for receiving, plus Gnd) than higher speeds and longer distances can be supported more reliably.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 611
Posts: 49092
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I see many sketch examples that by default set the baud rate to 9600 and it makes me think there is a reason why people are using the lower rate.
When hacking out an example,
Code:
Serial.begin(9600);
is easier to type than
Code:
Serial.begin(115200);
Logged

Grand Blanc, MI, USA
Online Online
Faraday Member
**
Karma: 95
Posts: 4062
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I do a fair number of projects with XBees and I always use 115200 baud if the MCU clock is 16MHz, and 57600 if the clock is 8MHz. My thinking is the less time spent managing communications, the better, and more time to do other things, although due to buffering etc., it probably makes precious little if any difference in my projects. But that's just the way I think.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 216
Posts: 13673
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
it makes me think there is a reason why people are using the lower rate.
- because it is used in so many samples
- because it is one of the basic speeds of the original VT52 terminal
- because it is the most supported
- ...

note that in digital communication 1 baud == 1 bit per second and in analog communication 1 baud == 1 discrete signal.
So an analog line that communicates with 16 different voltages can fit 4 bits of info per voltage.  A 1000 baud line would allow 4000 bits.
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17293
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I see many sketch examples that by default set the baud rate to 9600 and it makes me think there is a reason why people are using the lower rate.
When hacking out an example,
Code:
Serial.begin(9600);
is easier to type than
Code:
Serial.begin(115200);

Yep, save those key strokes and help save the planet.  smiley-cry

Lefty
Logged

Pages: [1]   Go Up
Jump to: