Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why 9600 data rate is used over other rates for Serial.begin()?

I am working on Arduino and for communication purpose with the computer Serial.begin() function is being used. Now since there is a range of data rates from 300...115200. Majority uses 9600! Why is it so? What is its significance

like image 264
Oswald Vinny Avatar asked Nov 19 '25 03:11

Oswald Vinny


1 Answers

During previous millenium 9600 bauds has been a standard for some devices.

Currently this speed is enough for most cases, so they stick to it; many devices use 9600 baud as a default.

Personally I use serial for debugging most often. At 9600 baud, it can print more than 10 lines per second, that is more than I can read.

Yet you can keep in mind that the buffer is limited to 64 char and when it is full, arduino will block a serial.write instruction until there is enough space in buffer. That is why you encounter some slowdown with slow baud rates.

On the other sides you will burden the MCU with speed of 0.5M on hardware serial. And with software serial you may see an impact much sooner.

Personally I had some trouble with chinese nano that used CH340 USB/Serial; python communication to arduino with pyserial was unreliable at speed over 9600 bauds.

like image 57
Arno Bozo Avatar answered Nov 21 '25 10:11

Arno Bozo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!