Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Universal asynchronous receiver-transmitter
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Data framing === [[File:UART-signal.png|class=skin-invert-image|thumb|400px|right|Example of a UART frame. In this diagram, one [[byte]] is sent, consisting of a start bit, followed by eight data bits (D1-8), and two stop bits, for a 11-bit UART frame. The number of data and formatting bits, the presence or absence of a parity bit, the form of parity (even or odd) and the transmission speed must be pre-agreed by the communicating parties. The "stop bit" is actually a "stop period"; the stop period of the transmitter may be arbitrarily long. It cannot be shorter than a specified amount, usually 1 to 2 bit times. The receiver requires a shorter stop period than the transmitter. At the end of each data frame, the receiver stops briefly to wait for the next start bit. It is this difference that keeps the transmitter and receiver synchronized. BCLK = Base Clock]] A UART frame consists of five elements: * Idle (logic high (1)) * Start bit (logic low (0)): the start bit signals to the receiver that a new character is coming. * Data bits: the next five to nine bits, depending on the code set employed, represent the character. * Parity bit: if a parity bit is used, it would be placed after all of the data bits. The parity bit is a way for the receiving UART to tell if any data has changed during transmission. * Stop (logic high (1)): the next one or two bits are always in the '''mark''' (logic high, i.e., 1) condition and called the stop bit(s). They signal to the receiver that the character is complete. Since the start bit is logic low (0) and the stop bit is logic high (1) there are always at least two guaranteed signal changes between characters. If the line is held in the logic low condition for longer than a character time, this is a '''break''' condition that can be detected by the UART. In the most common settings of 8 data bits, no parity and 1 stop bit (i.e. [[8N1]]), the protocol efficiency is 8/10 = 80%. For comparison, [[Ethernet frame|Ethernet]]'s protocol efficiency when using [[Ethernet frame#Maximum throughput|maximum throughput frames]] with payload of 1500 bytes is up to 95% and up to 99% with 9000 byte [[jumbo frame]]s. However due to Ethernet's [[protocol overhead]] and minimum payload size of 42 bytes, if small messages of one or a few bytes are to be sent, Ethernet's protocol efficiency drops much lower than the UART's 8N1 constant efficiency of 80%. The idle, no data state is high-voltage, or powered. This is a historic legacy from telegraphy, in which the line is held high to show that the line and transmitter are not damaged. Each character is framed as a logic low start bit, data bits, possibly a [[parity bit]] and one or more stop bits. In most applications, the least significant data bit (the one on the left in this diagram) is transmitted first, but there are exceptions (such as the [[IBM 2741]] printing terminal).
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)