Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Serial protocols can be characterized into 2 types, synchronous and asynchronous. As you may have guessed by the acronym, the asynchronous in UART refers to the fact that the protocol is asynchronous. It is outside the scope of this document to discuss the advantages and disadvantages of each type, it is discussed more fully here: Asynchronous vs Synchronous Protocols

  • The sample rate of the protocol is referred to as the baud rate. Standard baud rates include 9600, 31250038400, 115200, etc.

  • Typically, a data packet can be anywhere from 8-12 bits wide. The elements are typical as follows

    • Start & stop bits:

      • As discussed in the Async vs Sync protocol document, the line is pulled low to indicate the start of transmission. A single bit is appended to the start and end of the packet.

    • Data:

      • The data can be anywhere from 5-9 bits wide. The exact number varies per application, but typically 8.

    • Parity bit(s):

      • A parity bit may be appended to the end of the message to ensure accuracy of the message. A parity bit operates by setting the extra appended bit to either 0 or 1 to preserve the parity of the payload.

      • Consider a protocol that has a single ‘even’ parity bit that has a message of 10101010. Since there are 4 high bits (1’s) in the payload, the parity of 1’s is even as 4 is even, therefore the message with the appended parity bit is 101010100.

      • Consider a protocol that has a single ‘even’ parity bit that has a message of 10101011. Since there are 5 high bits (1’s) in the payload, the parity of 1’s is odd as 5 is odd, therefore the message with the appended parity bit is 101010111 to make the parity of 1’s even.

...