Go Down

Topic: SoftwareSerial limitations - no bit-size, parity, or stop bits (Read 2857 times) previous topic - next topic


The document for SofwareSerial should mention in the "Limitations" section that serial config is limited to 8N1.

I'd like to see the SoftwareSerial library extended to support an overloaded begin() method with a second "config" parameter so that I could pass it something like  mySerial.begin(1200, SERIAL_7E1), but until such time as that is implemented, the limitation should be noted in the documentation.


The level of documentation is a frequently discussed item here.
As you have the sources of the serial you are invited to have a DIY party.

Easiest way to get 7-bit is to stuff the 8th bit with a 1 or a 0. might work like this

Code: [Select]
char c = 'a';
c = c & 0x80;
Rob Tillaart

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


Thank you for your reply.   I looked for the source code for the documentation but just found the source for the Arduino IDE and firmware.   I hope to be able to submit useful pull requests to that project on GitHub too, but for now I was hoping to contribute to accurately describing the limitations of the library in its documentation.

The Arduino reference home says at the bottom of the page, "Corrections, suggestions, and new documentation should be posted to the Forum." (with a link here).

I suggest adding the following bullet point in the "Limitations" section of the SoftwareSerial page:

  • Data bits, parity, and stop bits must be 8-N-1

Go Up