Serial Communication Protocol

Serial communication works by sending bits one at a time. It is important that both devices follow the same protocol. The important parameters of the protocol are baud rate, data bits, stop bits, and parity.

Since RS-232 is asynchronous, every byte is sent by simply dropping the Transmit Data (TD) line to a low level, then sending the data bits, the parity bit (if used), and stop bits. When no data is sent, the TD is in the high position.

Baud Rate

The baud rate is the speed of the communication or bits per second. For example, a baud rate of 9600 means that the serial port is reading from or to the data line at 9600 Hz.

Data Bits

The data bits are the number of actual bits in a transmission byte. The computer byte is always 8 bits, but sometimes when sending ASCII bytes 7 bits per byte are used.

Stop Bits

The stop bits signal the end of a byte transmission. Stop bits can be 1, 1.5, or 2 bits.

Parity

Parity is a form of error correction that is used in serial communication. Parity types that are common are: even, odd, marked, and spaced or no-parity (no error).