📄 interfacing the serial - 1.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0044)http://www.beyondlogic.org/serial/serial.htm -->
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=GB2312">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 9">
<meta name=Originator content="Microsoft Word 9">
<link rel=File-List
href="./Interfacing%20The%20Serial%20-%2011.files/filelist.xml">
<link rel=Edit-Time-Data
href="./Interfacing%20The%20Serial%20-%2011.files/editdata.mso">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>Interfacing The Serial / RS-232 Port</title>
<!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:Author>z</o:Author>
<o:Template>Normal</o:Template>
<o:LastAuthor>z</o:LastAuthor>
<o:Revision>52</o:Revision>
<o:TotalTime>279</o:TotalTime>
<o:Created>2004-11-16T01:34:00Z</o:Created>
<o:LastSaved>2004-11-16T06:08:00Z</o:LastSaved>
<o:Pages>7</o:Pages>
<o:Words>5241</o:Words>
<o:Characters>29878</o:Characters>
<o:Company>Z</o:Company>
<o:Lines>248</o:Lines>
<o:Paragraphs>59</o:Paragraphs>
<o:CharactersWithSpaces>36692</o:CharactersWithSpaces>
<o:Version>9.2812</o:Version>
</o:DocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:DrawingGridVerticalSpacing>7.8 磅</w:DrawingGridVerticalSpacing>
<w:Compatibility>
<w:UseFELayout/>
</w:Compatibility>
</w:WordDocument>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:宋体;
mso-bidi-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{mso-ascii-font-family:Arial;
mso-hansi-font-family:Arial;
mso-bidi-font-family:Arial;
color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{mso-ascii-font-family:Arial;
mso-hansi-font-family:Arial;
mso-bidi-font-family:Arial;
color:blue;
text-decoration:underline;
text-underline:single;}
p
{margin-right:0cm;
mso-margin-top-alt:auto;
mso-margin-bottom-alt:auto;
margin-left:0cm;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:Arial;
mso-fareast-font-family:宋体;}
pre
{margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:12.0pt;
font-family:宋体;
mso-bidi-font-family:"Courier New";
color:#100080;}
tt
{mso-ansi-font-size:12.0pt;
mso-bidi-font-size:12.0pt;
mso-ascii-font-family:宋体;
mso-fareast-font-family:宋体;
mso-hansi-font-family:宋体;
mso-bidi-font-family:"Courier New";
color:#100080;}
/* Page Definitions */
@page
{mso-page-border-surround-header:no;
mso-page-border-surround-footer:no;}
@page Section1
{size:595.3pt 841.9pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
mso-header-margin:42.55pt;
mso-footer-margin:49.6pt;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1027"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
<meta
content="Describes interfacing the Serial (RS-232) Port in relation to both Hardware and Software. Gives Practical Examples using CDP6402 UART and Software Examples in C."
name=description>
<meta
content="RS232, RS-232, Serial, CPD6402, AY-5-1015, 8250, 16450, 16550, 16650, 16750, UART, MAX-232, COMMS, COM Port, Serial Port, Terminal, Programming in C, Serial Programming, RS-232 Programming"
name=keywords>
</head>
<body bgcolor=white background="Interfacing%20The%20Serial%20-%201.files\bgyellow.gif"
lang=ZH-CN link=blue vlink=blue style='tab-interval:21.0pt' leftmargin=0
topmargin=0 FACE=ARIAL BASEFONT marginwidth=0 marginheight=0>
<div class=Section1>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US><script language="JavaScript" src="Interfacing The Serial - 1.files/beyondmenu.js">
</script></span><span lang=EN-US style='font-size:18.0pt;font-family:Arial;
color:green'>Interfacing the Serial / RS232 Port</span><span lang=EN-US> </span></p>
<div align=center>
<table border=0 cellpadding=0 width="95%" style='width:95.0%;mso-cellspacing:
1.5pt;mso-padding-alt:0cm 0cm 0cm 0cm'>
<tr>
<td style='padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-US
style='font-family:Arial'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></p>
<p><span lang=EN-US>The Serial Port is harder to interface than the Parallel
Port</span><span style='font-family:宋体;mso-ascii-font-family:Arial;
mso-hansi-font-family:Arial'>串行端口的连接要比并行口难一些</span><span lang=EN-US>. In most
cases, any device you connect to the serial port will need the serial
transmission converted back to parallel so that it can be used</span><span
style='font-family:宋体;mso-ascii-font-family:Arial;mso-hansi-font-family:Arial'>一般,连接到的串口的设备,需要将串行传送的信号转换成并行的信号,才能使用</span><span
lang=EN-US>. This can be done using a UART</span><span style='font-family:
宋体;mso-ascii-font-family:Arial;mso-hansi-font-family:Arial'>这个任务可以用</span><span
lang=EN-US>UART</span><span style='font-family:宋体;mso-ascii-font-family:Arial;
mso-hansi-font-family:Arial'>完成</span><span lang=EN-US>. On the software side
of things, there are many more registers that you have to attend to than on a
Standard Parallel Port. (SPP) </span><span style='font-family:宋体;mso-ascii-font-family:
Arial;mso-hansi-font-family:Arial'>同时,软件方面所涉及到的寄存器也比并行口多得多。</span></p>
<p><span lang=EN-US>So what are the advantages of using serial data transfer
rather than parallel</span><span style='font-family:宋体;mso-ascii-font-family:
Arial;mso-hansi-font-family:Arial'>与并行口相比,串行传输的优势在于</span><span lang=EN-US>? </span></p>
<table border=0 cellpadding=0 style='mso-cellspacing:1.5pt;mso-padding-alt:
0cm 0cm 0cm 0cm'>
<tr>
<td valign=top style='padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal><span lang=EN-US style='font-family:Arial'>1.<o:p></o:p></span></p>
</td>
<td style='padding:.75pt .75pt .75pt .75pt'>
<p><span lang=EN-US>Serial Cables can be longer than Parallel cables</span><span
style='font-family:宋体;mso-ascii-font-family:Arial;mso-hansi-font-family:
Arial'>串行线缆可以比并行的长</span><span lang=EN-US>. The serial port transmits a '1'
as -3 to -25 volts and a '0' as +3 to +25 volts where as a parallel port
transmits a '0' as 0v and a '1' as 5v</span><span style='font-family:宋体;
mso-ascii-font-family:Arial;mso-hansi-font-family:Arial'>串行传输中</span><span
lang=EN-US>-3</span><span style='font-family:宋体;mso-ascii-font-family:Arial;
mso-hansi-font-family:Arial'>到</span><span lang=EN-US>-25</span><span
style='font-family:宋体;mso-ascii-font-family:Arial;mso-hansi-font-family:
Arial'>伏表示</span><span lang=EN-US>1</span><span style='font-family:宋体;
mso-ascii-font-family:Arial;mso-hansi-font-family:Arial'>,</span><span
lang=EN-US>3</span><span style='font-family:宋体;mso-ascii-font-family:Arial;
mso-hansi-font-family:Arial'>到</span><span lang=EN-US>25</span><span
style='font-family:宋体;mso-ascii-font-family:Arial;mso-hansi-font-family:
Arial'>伏表示</span><span lang=EN-US>0</span><span style='font-family:宋体;
mso-ascii-font-family:Arial;mso-hansi-font-family:Arial'>。而并行传输中,用</span><span
lang=EN-US>0</span><span style='font-family:宋体;mso-ascii-font-family:Arial;
mso-hansi-font-family:Arial'>伏表示</span><span lang=EN-US>0</span><span
style='font-family:宋体;mso-ascii-font-family:Arial;mso-hansi-font-family:
Arial'>,</span><span lang=EN-US>5</span><span style='font-family:宋体;
mso-ascii-font-family:Arial;mso-hansi-font-family:Arial'>伏表示</span><span
lang=EN-US>1. Therefore the serial port can have a maximum swing of 50V
compared to the parallel port which has a maximum swing of 5 Volts.
Therefore cable loss is not going to be as much of a problem for serial
cables than they are for parallel</span><span style='font-family:宋体;
mso-ascii-font-family:Arial;mso-hansi-font-family:Arial'>所以</span><span
lang=EN-US>. </span></p>
</td>
</tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -