B4R Question Serial Parity bit MARK

Discussion in 'B4R Questions' started by tzfpg, Oct 18, 2018.

i need to set wemos serial parity bits to MARK, how can i set that?
i already refer to these values but not seen SERIAL_8M1
Code:
`SERIAL_5N1 0x00SERIAL_6N1 0x02SERIAL_7N1 0x04SERIAL_8N1 0x06SERIAL_5N2 0x08SERIAL_6N2 0x0ASERIAL_7N2 0x0CSERIAL_8N2 0x0ESERIAL_5E1 0x20SERIAL_6E1 0x22SERIAL_7E1 0x24SERIAL_8E1 0x26SERIAL_5E2 0x28SERIAL_6E2 0x2ASERIAL_7E2 0x2CSERIAL_8E2 0x2ESERIAL_5O1 0x30SERIAL_6O1 0x32SERIAL_7O1 0x34SERIAL_8O1 0x36SERIAL_5O2 0x38SERIAL_6O2 0x3ASERIAL_7O2 0x3CSERIAL_8O2 0x3E`

Where have you find this list?

I don't think that other parities are supported.

In moderm UART's MARK parity is no longer supported. I don't know why, but probably because it's no more a EIA standard.

In this case I use 8,N and generate a parity bit using a table, to convert ASCII char to MARK parity. In both directions.
For MARK it's simple to add a 1 bit, without any fancy conversion.

Last edited: Oct 19, 2018

how to do that? is it convert the hex to binary and then add one bit, parity mark is always 1, right?

I use OR 128 to add the most significant bit to the byte. To take off use AND 127. Yes it's always 1. Use 8,n for definition, so parity in not checked. To tell the truth MARK is not strictly a parity checking, since it's not calculated. In 45 years I have never seen any device using this feature.

In fact MARK 'parity' in Async serial is exactly the same as NO parity and 2 stop bits (8N2 for instance)

tzfpg and Erel like this.

now which serial library support 8N2?

Not sure to understand...it is in the list that you provided in the first post
SERIAL_8N2 0x0E
Which serial library does not support it?

`myserial.initialize2(9600, 0x0E)`