TX Output Signal From USART Show Two Stop Bits
Each character transmission consists of one start bit followed by eight or nine data bits and is always terminated by one or two stop bits.
The two stop bits might appear due to:
- The ninth bit of Transmit Data (TX9D) can be a data bit or a parity bit. In case this bit is set as '1', the output might contain two stop bits after the 8-bit transmission.
- The delay between transmissions might also influence the output and create a false impression of a second stop bit. For example, establishing the end of transmission by checking the Transmit Shift Register Status (TRMT) bit of the Eusart Transmit Status and Control (TXSTA) register creates one TCY delay as the pending character in the TXREG is first transferred to the TSR and then the stop bit is transmitted. This delay can be avoided by checking the USART Transmit Interrupt (TXIF) bit flag instead of the TRMT bit. The TXIF flag is set when the EUSART transmitter is enabled and no character is being held for transmission in the TXREG.