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