Difference between revisions of "How to use UART"

From ESS-WIKI
Jump to: navigation, search
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
= '''Overview''' =
+
<h1><b>Overview</b></h1>
  
<font color="#000000">The Android/Linux UART/serial port access from user is through the tty-devices. The tty-devices have different names depending on UART driver on different board.</font>
+
<p><font color="#000000">The Android/Linux UART/serial port access from user is through the tty-devices. The tty-devices have different names depending on UART driver on different board.</font></p>
  
== <font color="#0066cc">RS-485</font> ==
+
<h2><font color="#0066cc">RS-485</font></h2>
  
RS-485 uses half-duplex communication, which means that one medium is shared for transmitting and receiving data. Therefore the system needs to control the RS-485 transceiver's transmit mode. Usually the UART RTS signal is used to switch the transmitter on and off.
+
<p>RS-485 uses half-duplex communication, which means that one medium is shared for transmitting and receiving data. Therefore the system needs to control the RS-485 transceiver&#39;s transmit mode. Usually the UART RTS signal is used to switch the transmitter on and off.</p>
  
= '''Boards''' =
+
<h1><b>Boards</b></h1>
  
== RSB4680 Borad ==
+
<h2>EPC-4680 Borad</h2>
  
{| border="1" cellspacing="1" cellpadding="1" style="width:500px;"
+
<table border="1" cellpadding="1" cellspacing="1" style="width:500px;">
|-
+
<tbody>
| style="width: 119px;" | <span style="color:#FF0000;">'''COM Name'''</span>
+
<tr>
| style="width: 123px;" | <span style="color:#FF0000;">'''Device Node'''</span>
+
<td style="width: 119px;"><span style="color:#FF0000;"><b>COM Name</b></span></td>
| style="width: 240px;" | <span style="color:#FF0000;">'''Remark'''</span>
+
<td style="width: 123px;"><span style="color:#FF0000;"><b>Device Node</b></span></td>
|-
+
<td style="width: 240px;"><span style="color:#FF0000;"><b>Remark</b></span></td>
| style="width: 119px;" | COM0
+
</tr>
| style="width: 123px;" | /dev/ttyS0<br/>
+
<tr>
| style="width: 240px;" | for BT Data<br/>
+
<td style="width: 119px;">COM0</td>
|-
+
<td style="width: 123px;">/dev/ttyS0</td>
| style="width: 119px;" | COM1<br/>
+
<td style="width: 240px;">&nbsp;BT</td>
| style="width: 123px;" | /dev/ttyS1<br/>
+
</tr>
| style="width: 240px;" | <br/>
+
<tr>
|-
+
<td style="width: 119px;">COM1</td>
| style="width: 119px;" | COM2<br/>
+
<td style="width: 123px;">/dev/ttyS2</td>
| style="width: 123px;" | /dev/ttyS2<br/>
+
<td style="width: 240px;">Debug Port</td>
| style="width: 240px;" | Debug Port<br/>
+
</tr>
|-
+
<tr>
| style="width: 119px;" | COM3<br/>
+
<td style="width: 119px;">COM2</td>
| style="width: 123px;" | /dev/ttyS3<br/>
+
<td style="width: 123px;">/dev/ttyS4</td>
| style="width: 240px;" | <br/>
+
<td style="width: 240px;">485</td>
|-
+
</tr>
| style="width: 119px;" | COM4<br/>
+
<tr>
| style="width: 123px;" | /dev/ttyS4<br/>
+
<td style="width: 119px;">COM3</td>
| style="width: 240px;" | Supprot RSB485<br/>
+
<td style="width: 123px;">/dev/ttyUSB0</td>
|-
+
<td style="width: 240px;">&nbsp;</td>
| style="width: 119px;" | COM5<br/>
+
</tr>
| style="width: 123px;" | /dev/ttyUSB0<br/>
+
<tr>
| style="width: 240px;" | Usb to Uart<br/>
+
<td style="width: 119px;">COM4</td>
|-
+
<td style="width: 123px;">/dev/ttyUSB1&nbsp;</td>
| style="width: 119px;" | COM6
+
<td style="width: 240px;">&nbsp;</td>
| style="width: 123px;" | /dev/ttyUSB1<br/>
+
</tr>
| style="width: 240px;" | Usb to Uart<br/>
+
<tr>
|}
+
<td style="width: 119px;">COM5</td>
 +
<td style="width: 123px;">/dev/ttyS1</td>
 +
<td style="width: 240px;">&nbsp;</td>
 +
</tr>
 +
<tr>
 +
<td style="width: 119px;">COM6</td>
 +
<td style="width: 123px;">/dev/ttyS3&nbsp;</td>
 +
<td style="width: 240px;">&nbsp;</td>
 +
</tr>
 +
</tbody>
 +
</table>
  
 +
<p>&nbsp;</p>
  
 +
<p>&nbsp;</p>
  
 +
<p><span style="color:#FF0000;"><b>Note&nbsp;:&nbsp;</b></span></p>
  
 +
<p>1. Only COM1、COM2、COM3、COM4、COM5 and COM6 are designed for custom using.</p>
  
<br/>
+
<p>2. Only COM4 support RSB485.</p>
 +
 
 +
<p>3. COM2 is designed as debug port default.&nbsp;</p>

Latest revision as of 10:47, 11 June 2024

Overview

The Android/Linux UART/serial port access from user is through the tty-devices. The tty-devices have different names depending on UART driver on different board.

RS-485

RS-485 uses half-duplex communication, which means that one medium is shared for transmitting and receiving data. Therefore the system needs to control the RS-485 transceiver's transmit mode. Usually the UART RTS signal is used to switch the transmitter on and off.

Boards

EPC-4680 Borad

<tbody> </tbody>
COM Name Device Node Remark
COM0 /dev/ttyS0  BT
COM1 /dev/ttyS2 Debug Port
COM2 /dev/ttyS4 485
COM3 /dev/ttyUSB0  
COM4 /dev/ttyUSB1   
COM5 /dev/ttyS1  
COM6 /dev/ttyS3   

 

 

Note : 

1. Only COM1、COM2、COM3、COM4、COM5 and COM6 are designed for custom using.

2. Only COM4 support RSB485.

3. COM2 is designed as debug port default.