# \[Solved\] 9 bit serial problem

**URL:** <https://forum.arduino.cc/t/solved-9-bit-serial-problem/496726>\
**Category:** Programming\
**Created:** [December 14, 2017, 12:17pm UTC](https://forum.arduino.cc/t/solved-9-bit-serial-problem/496726 "2017-12-14T12:17:46Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![sherzaad](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sherzaad/32/226173_2.png) [@sherzaad](https://forum.arduino.cc/u/sherzaad)\
**Post date:** [December 21, 2017, 10:07am UTC](https://forum.arduino.cc/t/solved-9-bit-serial-problem/496726/5 "2017-12-21T10:07:41Z")

</div>

So after a bit on tinkering with the hardwareserial libraries, I managed to resolved the issue I was seeing. 😃 ;D

please see library files attach. If you wish to used it, you would need to overwrite the original files. I HAVE NOT tested everything in the library so if you wish to use it please BACKUP the original files BEFORE you overwrite them.

Serialx.begin() has 2 argurments: baud [required] and config[optional], where x is your serial port used

default if config is not entered is 8 bit 1 stop bit.

To use 9 bit serial use the 9 bit definitions declared in hardwareserial.h  
e.g to use 9 bit serial+ 1 stopbit at 9600baud, you would use Serialx.begin(9600, SERIAL\_9N1);

[HardwareSerial9bit.zip](https://forum.arduino.cc/uploads/short-url/zdIkjcwKcNftVdsPr863CkXTDqp.zip) (7.57 KB)

---

_[View the full topic](https://forum.arduino.cc/t/solved-9-bit-serial-problem/496726)._
