摘 要: 串行通信是指計算機主機與外設之間以及主機系統(tǒng)與主機系統(tǒng)之間按位進行傳輸數據的一種通信方式。串行通信所需的傳輸線少,成本低,不僅適用于近距離的人-機交換及串行存儲設備、實時控制系統(tǒng),而且可借助現有的電話網等通信通道實現遠距離傳輸,所以串行接口是計算機應用系統(tǒng)常用的接口。在設計通信接口時,必須根據需要選擇接口標準,并考慮傳輸介質、電平轉換等問題。關鍵詞:總線; 串行通信; 通信接口; 電平轉換
中圖分類號:TN915-33文獻標識碼:A
文章編號:1004-373X(2010)18-0083-04
Computer Serial Communication Interface and Its Application
WU Xiao-yan
(Sichuan Information Technology College, Guangyuan 628017, China)
Abstract: Serial communication is between the host computer and peripherals as well as between the host systems for the transmission of data by digital means of communication. As the serial communication needs less transmission line and is low cost, it is not only suitable for the man-machine exchange at close range, serial memory devices and real-time control system, but also the existing telephone network and other communication channels can be employed to achieve long-distance transmission. Therefore, the serial interface is commonly used as a interface of computer application system. In the design of communication interface, the selection of interface standards must be performed first, and the transmission medium and level translator should be considered.
Keywords: computer; serial communication; communication interface; level translator
0 引 言
隨著多微機系統(tǒng)的廣泛應用和計算機網絡技術的普及,計算機的通信功能顯得愈來愈重要。在多微機系統(tǒng)及現代測控系統(tǒng)中,信息的交換多采用串行通信方式。對于串行通信、數據信息、控制信息要按位在一條線上依次傳送,為了對數據和控制信息進行區(qū)分,收發(fā)雙方要事先約定共同遵守的通信協(xié)議。通信協(xié)議約定的內容包括數據格式、同步方式、傳輸速率和校驗方式等。依發(fā)送與接收設備的時鐘控制方式,串行通信可分為同步通信和異步通信兩類[1]。異步通信不要求收發(fā)雙方時鐘的嚴格一致,實現容易,設備開銷較小。下面介紹RS 232接口,RS 422A/RS 485接口和20 mA電流環(huán)三類異步串行通信中的串行接口。
1 RS 232C接口
RS 232C是使用最早、應用最多的一種異步串行通信總線標準。RS 232是美國電子工業(yè)協(xié)會(EIA)于1962年制定的標準。RS表示EIA的“推薦標準”,232為該標準的標識號。1969年修訂為RS 232C,1987年修訂為EIA-232D,1991年修訂為EIA-232E,1997年又修訂為EIA-232F。……