UART: Difference between revisions

From datarecoverywiki.com
Jump to navigation Jump to search
Created page with " <div id="content"> <h1>What tools you will need</h1> <i> Items are not listed in any particular order </i> <div class="infobox"> <table> <tr> </tr> <tr> <h2> Required </h2> <ul> <li>Test</li> </ul> </tr> <tr> <h2> Optional but useful </h2> <ul> <li>Test</li>..."
 
No edit summary
 
(20 intermediate revisions by the same user not shown)
Line 1: Line 1:
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Data Recovery Resources</title>
    <style>
        /* General page styling */
        body {
            font-family: Arial, sans-serif;
            line-height: 1.6;
        }


        /* Table of Contents (TOC) styling to match classic Wikipedia style */ /*format needs fixing*/
        #toc {
            background-color: #f9f9f9;
            border: 1px solid #a2a9b1;
            padding: 10px;
            margin-bottom: 20px;
            width: 275px;
            font-size: 0.875em;
            line-height: 1.0;
        }


<div id="content">
        #toc h2 {
    <h1>What tools you will need</h1>
            font-size: 1em;
<i> Items are not listed in any particular order </i>
            margin: 0;
    <div class="infobox">
            font-weight: bold;
         <table>
            color: #222;
             <tr>
            display: flex;
               
            justify-content: space-between;
             </tr>
            align-items: center;
             <tr>
        }
                <h2> Required </h2>
 
                <ul>
        /* Hide link styling */
                <li>Test</li>
         #toc h2 .hide-link {
                </ul>
             font-size: 0.85em;
             </tr>
            color: #0645ad;
             <tr>
             cursor: pointer;
              <h2> Optional but useful </h2>
             text-decoration: none;
                <ul>
        }
                <li>Test</li>
 
                </ul>
        #toc h2 .hide-link:hover {
             </tr>
            text-decoration: underline;
         </table>
        }
    </div>
 
        /* TOC list styling */
        #toc ul {
            list-style-type: none;
            padding: 0;
            margin: 10px 0;
            counter-reset: section;
        }
 
        /* Main section numbering */
        #toc ul > li {
             counter-increment: section;
             margin-bottom: 5px;
        }
 
        #toc ul > li::before {
            content: counters(section, ".") " ";
             font-weight: bold;
         }


        /* Nested numbering */
        #toc ul li ul {
            margin-left: 20px;
            counter-reset: subsection;
        }


    <div id="toc">
        #toc ul li ul li {
        <h2>Uses of this skill</h2>
            counter-increment: subsection;
          
         }
    </div>


        #toc ul li ul li::before {
            content: counters(section, ".") "." counter(subsection) " ";
            font-weight: normal;
        }


    <h2 id="section2">1. Step-by-step guide with images</h2>
        /* Link styling */
    <p>The history of the topic is often presented in chronological order, detailing significant events, figures, and periods that shaped its development.</p>
        #toc ul li a {
            text-decoration: none;
            color: #0645ad;
        }


      
        #toc ul li a:hover {
            text-decoration: underline;
        }
     </style>


     <h2 id="section3">3. Step-by-Step guide with images</h2>
     <script>
    <p>In the present day, the topic has taken on new forms and relevance, influencing various sectors of society and undergoing further development.</p>
        // JavaScript to toggle visibility of TOC contents
        function toggleTOC() {
            const tocList = document.querySelector("#toc ul");
            const hideLink = document.querySelector(".hide-link");
            if (tocList.style.display === "none") {
                tocList.style.display = "block";
                hideLink.textContent = "[hide]";
            } else {
                tocList.style.display = "none";
                hideLink.textContent = "[show]";
            }
        }
    </script>
</head>
<body>


      <h2>4. Flow chart of order of operations</h3>
    <p>The origins of the subject can be traced back to earlier centuries, where it evolved through various phases.</p>
   
      <h2>5. Troubleshooting/tips and tricks </h3>
    <p>The origins of the subject can be traced back to earlier centuries, where it evolved through various phases.</p>


     <h2 id="section4">6. Related Topics </h2>
<!--formating needs fixing to standardised wikipedia formating -->
<!-- Table of Contents -->
<div id="toc">
     <h2>Contents <a href="javascript:void(0);" class="hide-link" onclick="toggleTOC()">[hide]</a></h2>
     <ul>
     <ul>
         <li><a href="#">Related Topic 1</a></li>
         <li><a href="#section0">What tools you will need</a>
         <li><a href="#">Related Topic 2</a></li>
            <ul>
                <li><a href="#required">Required</a></li>
                <li><a href="#optional">Optional but useful</a></li>
            </ul>
        </li>
       
        <li><a href="#section2"> Step-by-step guide with images</a></li>
        <li><a href="#section3"> Flow chart of order of operations</a></li>
        <li><a href="#section4"> Troubleshooting/tips and tricks</a></li>
        <li><a href="#section5"> Related Topics</a></li>
         <li><a href="#section6"> Further reading</a></li>
     </ul>
     </ul>
</div>
<h1> Background information </h1>
<p>This page will cover Universal asynchronous receiver/transmitter (UART) protocol, how it functions, how to communicate with a device over it, and where to find ports that allow access.
</br>
UART or Universal asynchronous receiver/transmitter is often used as a low level protocol to communicate with devices, such as HDD controllers, It is asynchronous meaning it does not have a clock(clk) line </br>
therefore relies on an external clock.(this will be covered later in the Baud Rate section)
</br> The UART protocol runs off two data lines plus ground (three in total), these are </br>
<B> 2.0 connections</B>
<ul>
<li>Transmit(TX)</li>
<li>Receive(RX)</li>
<li>Ground(GND)</li>
</ul>
</br>
The lines are typically connected to its opposite(e.g. TX to RX, RX to TX, GND to GND)
<include diagram somewhere>
</br>
<B>3.0 Protocol configuration </B>
</br>
There are five main aspects to communicating over UART, with two additional (Break condition, idle state) conditions.
</br>
<B>1.</B> Baud Rate
</br>
Due to UART being Asynchronous and lacking a clock(clk) signal, A baud rate measured in bits per second(BPS) must be set for data to be transmitted at the same speed by both devices
</br>
otherwise data will not be transmitted correctly, Both sides of the communication must be operating at the same speed otherwise communication will not be successful.
</br> The most commonly used bod rates are, 9600,19200,38400,57600,115200.
</br>
<B>2.</B> Data bits
</br>As the name suggests data bits is the size of the data packets that are being sent with the most common size being 8 data bits per package however other sizes are possible.
<br>
Logically, the bigger the data bits the more data they can carry but the slower the transfer rate due to the increased size.
</br>
<B>3.</B> Parity
<br>
Parity also known as error checking is an optional (typically not used) but useful bit within the communication packet as it can aid in the detection of packet corruption
</br>
Note the use of the word aid as like most systems it is not perfect, so data corruption may still occur.
</br>
<ul>
<li>None- nothing used </li>
<li>Even - parity bit is set to make all the 1's even </li>
<li>odd - parity bit is set to make all the 1's odd </li>
</ul>
</br>


    <h2 id="section5">7. Further reading</h2>
<B>4.</B> Stop Bits</br>
    <div class="reference-list">
Stop bits denote the end of each packet, which allows for the receiver to recognize the end of each packet then the start of a new one.
         <ol>
Typically the stop bits are only one bit but can also be two
            <li>Reference 1: <a href="#">Source details</a></li>
 
             <li>Reference 2: <a href="#">Source details</a></li>
<B>5.</B> Flow Control
         </ol>
</br>
     </div>
Flow control is responsible for making sure the data transfer speeds are kept consistent, regardless of the fact one device maybe faster than the other.
</br>
<ul>
<li>None - no control </li>
<li>Hardware - The use of two additional pins Request To Send(RTS), Clear To Send(CTS) to indicate when a device requires more data or is ready for more data.</li>
<li>Software - uses special charters(XON to resume, XOFF to pause) which are placed within the data for the other device to register</li>
</br>
 
<B>6.</B> Break condition
A Break condition is similar to a time-out, if an extended period of low voltage(e.g. no activity/break) occurs then a break condition is applied, can be used as a control signal
</br>
 
<B>7.</B> Idle state
Idle state defines how the lines appear when there is no data being transmitted (typically a high voltage)
 
</p>
<h1 id="section0">What tools you will need</h1>
<i> Items are not listed in any particular order </i>
<div class="infobox">
    <table>
         <tr></tr>
        <tr>
            <h3 id="required">Required</h3>
            <ul>
                <li> UART to USB adapter</li>
                <li> jumper wires</li>
                <li> serial terminal</li>
             </ul>
        </tr>
        <tr>
          <h3 id="optional">Optional but useful</h3>
            <ul>
                <li>Multimeter</li>
                <li> Soldering iron </li>
                <li>baud rate detection tool</li>
            </ul>
         </tr>
     </table>
</div>
</div>
<h1 id="section2">Step-by-step guide with images</h1>
<p>Insert step-by-step walkthrough with images and summary text here</p>
<h1 id="section3">Flow chart of order of operations</h1>
<p>Insert a flow chart of steps and actions for each task (create using diagram)</p>
<h1 id="section4">Troubleshooting/tips and tricks</h1>
<p>Fixes to any common issues that were encountered or could be easily encountered</p>
<p> different configuration settings can be tried without damage to the devices</p>
<h1 id="section5">Related Topics</h1>
<p>Topics such as desoldering to chip off or firmware dumping for disk PCB repairs</p>
<ul>
    <li><a href="https://archive.org/details/the-hardware-hacking-handbook">the hardware hacking handbook</a></li>
    <li><a href="#">Related Topic 2</a></li>
</ul>
<h1 id="section6">Further reading</h1>
<p>External references in wiki references can just be cited through the keyword link</p>
<div class="reference-list">
    <ol>
        <li>Reference 1: <a href="https://www.hardbreak.wiki/hardware-hacking/interface-interaction/uart">UART basic's guide</a></li>
        <li>Reference 2: <a href="https://www.ti.com/lit/ug/sprugp1/sprugp1.pdf">UART specification</a></li>
    </ol>
</div>
</body>
</html>

Latest revision as of 13:16, 10 March 2025

Data Recovery Resources

Background information

This page will cover Universal asynchronous receiver/transmitter (UART) protocol, how it functions, how to communicate with a device over it, and where to find ports that allow access.
UART or Universal asynchronous receiver/transmitter is often used as a low level protocol to communicate with devices, such as HDD controllers, It is asynchronous meaning it does not have a clock(clk) line
therefore relies on an external clock.(this will be covered later in the Baud Rate section)
The UART protocol runs off two data lines plus ground (three in total), these are
2.0 connections

  • Transmit(TX)
  • Receive(RX)
  • Ground(GND)


The lines are typically connected to its opposite(e.g. TX to RX, RX to TX, GND to GND)


3.0 Protocol configuration
There are five main aspects to communicating over UART, with two additional (Break condition, idle state) conditions.
1. Baud Rate
Due to UART being Asynchronous and lacking a clock(clk) signal, A baud rate measured in bits per second(BPS) must be set for data to be transmitted at the same speed by both devices
otherwise data will not be transmitted correctly, Both sides of the communication must be operating at the same speed otherwise communication will not be successful.
The most commonly used bod rates are, 9600,19200,38400,57600,115200.
2. Data bits
As the name suggests data bits is the size of the data packets that are being sent with the most common size being 8 data bits per package however other sizes are possible.
Logically, the bigger the data bits the more data they can carry but the slower the transfer rate due to the increased size.
3. Parity
Parity also known as error checking is an optional (typically not used) but useful bit within the communication packet as it can aid in the detection of packet corruption
Note the use of the word aid as like most systems it is not perfect, so data corruption may still occur.
  • None- nothing used
  • Even - parity bit is set to make all the 1's even
  • odd - parity bit is set to make all the 1's odd

4. Stop Bits
Stop bits denote the end of each packet, which allows for the receiver to recognize the end of each packet then the start of a new one. Typically the stop bits are only one bit but can also be two 5. Flow Control
Flow control is responsible for making sure the data transfer speeds are kept consistent, regardless of the fact one device maybe faster than the other.
  • None - no control
  • Hardware - The use of two additional pins Request To Send(RTS), Clear To Send(CTS) to indicate when a device requires more data or is ready for more data.
  • Software - uses special charters(XON to resume, XOFF to pause) which are placed within the data for the other device to register

  • 6. Break condition A Break condition is similar to a time-out, if an extended period of low voltage(e.g. no activity/break) occurs then a break condition is applied, can be used as a control signal
    7. Idle state Idle state defines how the lines appear when there is no data being transmitted (typically a high voltage)

    What tools you will need

    Items are not listed in any particular order

    Required

    • UART to USB adapter
    • jumper wires
    • serial terminal

    Optional but useful

    • Multimeter
    • Soldering iron
    • baud rate detection tool

    Step-by-step guide with images

    Insert step-by-step walkthrough with images and summary text here

    Flow chart of order of operations

    Insert a flow chart of steps and actions for each task (create using diagram)

    Troubleshooting/tips and tricks

    Fixes to any common issues that were encountered or could be easily encountered

    different configuration settings can be tried without damage to the devices

    Related Topics

    Topics such as desoldering to chip off or firmware dumping for disk PCB repairs

    Further reading

    External references in wiki references can just be cited through the keyword link

    1. Reference 1: UART basic's guide
    2. Reference 2: UART specification