PaulStoffregen
Well-known member
I'm working to integrate Nick's 9 bit changes into the official code. Since it doubles the amount of memory, I'm inclined to have it disabled by default, but with a #define that can be uncommented by editing the code.
I'm also looking into supporting Serial.begin(baud, format) that was introduced in recent versions of Arduino. Formats like 8N2 & 8E1 actually use the 9 bit mode.
If anyone is currently using this 9 bit stuff, now would be a great time to speak up with any feedback?
One question I have is regarding the Arduino API. Is Serial1.write9bit() really the best way? Would a function that sets or clears the 9th bit work better? Or should the function cause the next byte with Serial.print() or Serial.write() to have its 9th bit set, and then all others revert to zero? My understanding is these 9 bit protocols are used for marking the first byte (a destination address) of a message, so a Serial.ninthBitOnNextWrite() style function might make more sense?
I'm also looking into supporting Serial.begin(baud, format) that was introduced in recent versions of Arduino. Formats like 8N2 & 8E1 actually use the 9 bit mode.
If anyone is currently using this 9 bit stuff, now would be a great time to speak up with any feedback?
One question I have is regarding the Arduino API. Is Serial1.write9bit() really the best way? Would a function that sets or clears the 9th bit work better? Or should the function cause the next byte with Serial.print() or Serial.write() to have its 9th bit set, and then all others revert to zero? My understanding is these 9 bit protocols are used for marking the first byte (a destination address) of a message, so a Serial.ninthBitOnNextWrite() style function might make more sense?