matrixofdynamism
Advanced Member level 2
I am reading the datasheet of a PIC18F with a EUSART. It has an optional 9th bit that be used in receiver and transmitter.
ASCII characters fit in 7 bits and a byte is 8 bits. Why then would someone want to transmit 9 bits? It this was 16 bits it would make sense but 9 bits makes no sense at all.
The hardware does not have any ability to calculate parity bit and place it at bit 9, that has to be done by the firmware. If this was an automated optional parity bit that would have made sense.
The datasheet does say that the 9th bit in the SFR TXSTAx and SFR RCSTAx "can be an address/data bit or a parity bit and must be calculated by user firmware".
While the parity bit that can be manually implemented makes sense, the data bit part does not since usually data is aligned to byte boundaries and since serial communication does not use address, I am not even sure what it means when it says "address bit"
ASCII characters fit in 7 bits and a byte is 8 bits. Why then would someone want to transmit 9 bits? It this was 16 bits it would make sense but 9 bits makes no sense at all.
The hardware does not have any ability to calculate parity bit and place it at bit 9, that has to be done by the firmware. If this was an automated optional parity bit that would have made sense.
The datasheet does say that the 9th bit in the SFR TXSTAx and SFR RCSTAx "can be an address/data bit or a parity bit and must be calculated by user firmware".
While the parity bit that can be manually implemented makes sense, the data bit part does not since usually data is aligned to byte boundaries and since serial communication does not use address, I am not even sure what it means when it says "address bit"