3. Serial data format.

The data is transmitted character by character. In periods between characters the data line sits at the Mark level. The time in between the characters is random but must be at least the duration of some "stop bits". Think of someone typing on a terminal, and each key-press gets transmitted whenever the key is hit.

The data itself is transmitted bit-serial, with one Start bit at Space, followed by 5,6,7, or 8 data bits, LSB first, where Mark corresponds to logical 1 and Space corresponds to logical 0; then possibly a parity bit, (encoding like the data bits), and finally from one to two "stop bits" which really is the minimum time the data line has to remain in the Mark state between the characters, for the communications channel and the receiving device to recover and get ready for the next one.

     Start D0   D1   D2   D3   D4   D5   D6   D7   P     Stop... 
     _________________________________________________              Space (0)
____/    \____X____X____X____X____X____X____X____X____\____.____.__ Mark (1)

The start bit pulse is the signal to the receiver that it needs to wake up and start receiving the data bits following. Each of these come at a certain time after the start bit's leading edge and the receiver has been set up in advance to expect these bits at a certain rate. Even when the transmitter and receiver are slightly out of tune, the receiver will get everything correct.

The duration of the pulses on the data line is defined by the "Baud rate", and for some baud rate B, the duration of each bit is 1/B seconds. Each bit of a character lasts this time. This can be from a minimum of 7 (start, 5 data, stop) up to a maximum of 12 (start, 8 bits, parity, 2 stop) such bit times. A commonly seen format is 8 bits, no parity, and 1 stop bit, which is 10 bit times long. This gives us a character rate of 1/10 of the Baud rate. For example, for 9600 Baud, this gives a maximum of 960 characters per second.

The number of data and stop bits, the parity bit, and the baud rate may all be set by outputting specific values to the IO registers of the UART.

To 0. Introduction

To 2. Voltage levels.

To 4. The 8250 and descendant chips in the PCs.

Table of ASCII codes

To index page