'RS232 word size with or without parity

The bytesize attribute in the serial class is defined as being the number of data bits used for that connection. If I enable odd parity, does it convert one of the defined data bits to signify parity? Or does it just add another bit between the start and stop bits?

import serial

# Define a serial instance with 8 databits and no parity
my_com = serial.serial(bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE)
# My rs232 frame would now look something like:
[ START_BIT, DB0, DB1, DB2, DB3, DB4, DB5, DB6, DB7, STOP_BIT ]

# Change the parity settings
my_com.parity = serial.PARITY_ODD

# Do my frames now look like this
[ START_BIT, DB0, DB1, DB2, DB3, DB4, DB5, DB6, DB7, PARITY, STOP_BIT ]
# or do they look like this?
[ START_BIT, DB0, DB1, DB2, DB3, DB4, DB5, DB6, PARITY, STOP_BIT ]

Any help would be greatly appreciated. Thanks



Solution 1:[1]

I have found some use 9 bits, some include the parity bit in the Byte. The nine bits way of writing the parity bit outside the Byte is less often used. Most whole numbers (the ASCII coded characters) should be odd parity, according to what I have heard.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Frederick B. Ungrich II