<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://cpudev.org/w/index.php?action=history&amp;feed=atom&amp;title=UART</id>
	<title>UART - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://cpudev.org/w/index.php?action=history&amp;feed=atom&amp;title=UART"/>
	<link rel="alternate" type="text/html" href="https://cpudev.org/w/index.php?title=UART&amp;action=history"/>
	<updated>2026-04-25T16:38:58Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>https://cpudev.org/w/index.php?title=UART&amp;diff=14&amp;oldid=prev</id>
		<title>Demindiro: First draft of UART page</title>
		<link rel="alternate" type="text/html" href="https://cpudev.org/w/index.php?title=UART&amp;diff=14&amp;oldid=prev"/>
		<updated>2023-02-17T16:32:09Z</updated>

		<summary type="html">&lt;p&gt;First draft of UART page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;UART (Universal Asynchronous Receiver-Transmitter) is a simple protocol for exchanging data between two devices. It uses one line for transmitting and one receiving data.&lt;br /&gt;
&lt;br /&gt;
= Clock rate &amp;amp; encoding =&lt;br /&gt;
&lt;br /&gt;
The clock rate &amp;amp; encoding must be configured beforehand on both devices, as UART does not provide a way to negotiate settings.&lt;br /&gt;
&lt;br /&gt;
There are several ways to encode the data.&lt;br /&gt;
The encoding is usually indicated as &amp;lt;code&amp;gt;&amp;amp;lt;Hz&amp;amp;gt; &amp;amp;lt;data bits&amp;amp;gt;&amp;amp;lt;parity&amp;amp;gt;&amp;amp;lt;stop bits&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, &amp;lt;code&amp;gt;9600 8N1&amp;lt;/code&amp;gt; indicates a clock of 9600Hz with 8 data bits, no parity bit and 1 stop bit. &amp;lt;code&amp;gt;38400 7E2&amp;lt;/code&amp;gt; indicates a clock of 38400Hz, 7 data bits, 1 even parity bit and 2 stop bits.&lt;br /&gt;
&lt;br /&gt;
The parity bit is used for error detection. It can detect a single bit flip during transmission.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Parity bit encodings&lt;br /&gt;
|-&lt;br /&gt;
! Letter !! Description&lt;br /&gt;
|-&lt;br /&gt;
| N || No parity bit&lt;br /&gt;
|-&lt;br /&gt;
| E || Even parity bit. 0 if even amount of data bits with value of 1, otherwise 1.&lt;br /&gt;
|-&lt;br /&gt;
| O || Odd parity bit. 1 if even amount of data bits with value of 1, otherwise 0.&lt;br /&gt;
|-&lt;br /&gt;
| M || Mark. TODO&lt;br /&gt;
|-&lt;br /&gt;
| P || Space. TODO&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
By default (&amp;#039;&amp;#039;&amp;#039;idle&amp;#039;&amp;#039;&amp;#039;), the line must be pulled high. When data is about to be transmitted, the line must be pulled low (&amp;#039;&amp;#039;&amp;#039;start&amp;#039;&amp;#039;&amp;#039;). Then the &amp;#039;&amp;#039;&amp;#039;data&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;parity&amp;#039;&amp;#039;&amp;#039; bits must be sent. Finally, the &amp;#039;&amp;#039;&amp;#039;stop&amp;#039;&amp;#039;&amp;#039; bit(s) must be sent which will pull the line high, completing the transaction.&lt;br /&gt;
&lt;br /&gt;
[[File:UART state machine &amp;amp; waveform example.png]]&lt;br /&gt;
&lt;br /&gt;
= Tools =&lt;br /&gt;
&lt;br /&gt;
On Linux, you can use minicom to communicate with a UART-enabled device. It allows you to configure the encoding &amp;amp; data rate and save the settings to a file.&lt;br /&gt;
&lt;br /&gt;
If the device is connected over USB, it will show up as &amp;lt;code&amp;gt;/dev/ttyUSBX&amp;lt;/code&amp;gt;, where X is some integer.&lt;/div&gt;</summary>
		<author><name>Demindiro</name></author>
	</entry>
</feed>