新型消防車的研究
新型消防車的研究,新型,消防車,研究,鉆研
畢業(yè)設(shè)計(jì)(論文)中期報(bào)告
學(xué)院
班級(jí)
學(xué)生
姓名
指導(dǎo)
教師
課題名稱:新型消防車的研究
簡(jiǎn)述開(kāi)題以來(lái)所做的具體工作、取得的進(jìn)展及下一步主要工作:
在畢業(yè)設(shè)計(jì)的最初階段, 認(rèn)真閱讀資料,了解新型消防車的基本原理及應(yīng)用前景、其工作原理以及控制方法。并進(jìn)行了以下幾步工作:
(1)、查找整理資料,學(xué)習(xí)相關(guān)知識(shí)。
(2)、經(jīng)過(guò)查閱相關(guān)資料,選擇比較可取的電路,對(duì)所設(shè)計(jì)的電路進(jìn)行分析論證。
(3)、畫出系統(tǒng)的流程,畫出硬件設(shè)計(jì)圖。
之后,分析各部分模塊電路的具體作用,分析工作原理。查找元器件的主要功能特性、內(nèi)部結(jié)構(gòu)及各引腳的作用,盡量選擇最適合的元器件,列元件清單,購(gòu)買器件。根據(jù)之前整理的資料進(jìn)行電路焊接。分模塊的對(duì)電路進(jìn)行調(diào)試,成功的調(diào)試完一些基本的單元電路,總結(jié)調(diào)試經(jīng)驗(yàn)。
下一步的主要任務(wù):
(1)、對(duì)未完成的電路繼續(xù)制作。
(2)、對(duì)單片機(jī)軟件進(jìn)行初始的編程。
(3)、軟件的后期調(diào)試及硬件電路的故障排除。
(4)、對(duì)整個(gè)電路進(jìn)行系統(tǒng)調(diào)試,達(dá)到穩(wěn)定,最后實(shí)現(xiàn)本課題所要實(shí)現(xiàn)的目標(biāo)。
一周的時(shí)間進(jìn)行畢業(yè)論文的準(zhǔn)備,最后準(zhǔn)備畢業(yè)答辯。
學(xué)生簽字:
年 月 日
指導(dǎo)教師的建議與要求:
指導(dǎo)教師簽字:
年 月 日
注:本表格同畢業(yè)設(shè)計(jì)(論文)一同裝訂成冊(cè),由所在單位歸檔保存。
附錄4:英文資料及中文翻譯
1.英文資料
Communicating with Datal
Data signals are transmitted over various types of telephone circuits. They travel on wire from telephone pole to telephone pole, through underground cables, from mountain top to mountain top over microwave facilities, on the ocean floor in submarine cables, and via communications satellites from continent to continent. Some type of data conversion equipment is required to change the digital machine signals to a form suitable for transmission over these facilities.
The data machine which provides an input to the transmit section of the conversion equipment, or modulator ,can be a keyboard , printer, card reader, paper tape terminal computer or magnetic tape terminal. The output from the receive section of the converter, or demodulator, can be applied to a tape punch, printer, card punch, magnetic tape unit, computer, or visual display terminal. Typically, both the modulator and demodulator sections of the converter are combined into a two-way data transmitter-receiver, commonly called a data modem or data set.
The typical full-duplex data transmission system including the originating data processing equipment and the interface assembly which consists of buffer and control units. The interface assembly at the transmitter accepts data at the rate determined by the operating speed of the data processor. stores the data temporarily, and regenerates it at a rate compatible with that of the data modem. At the receiving terminal the interface assembly accepts the received data, stores it, then feeds it to the data processor at the appropriate rate.
Timing signals from the interface assembly at the transmitter are applied to the data modem to synchronize the computer and the data set .At the receiver, synchronization pulses are derived from the data stream to synchronize the computer.
When more than one data set feeds into a computer, the capacity of the interface equipment is of major concern since it must determine the time slot allocation for each line. Various types of interface assemblies are employed, such as magnetic core memories, shift registers, and delay lines. Not all data communications terminals employ an interface between the data processor and the data modem. Without an interface, the input, data transmission, and output functions proceed simultaneously and at the same rate of speed.
Since data signals are rarely in suitable form for transmission over the various types of transmission facilities, a signal coding process is normally performed. Ideally, the transmission medium should have linear attenuation and delay characteristics, but this is never so in practice, and transmission impairments are always present to disturb the data signals. As a comparison, in voice communications a high degree of transmission irregularities can be tolerated. If a voice circuit has a heavy loss or is noisy, the speakers compensate automatically by increasing the intensity of their voices. If words are missed because of transmission difficulties, they are often understood anyway because of the redundant nature of speech. In contrast, there is no inherent redundancy in data signals unless purposely inserted and, therefore, transmission variations car only be compensated for over a very small range. In addition, data signals are sensitive to other transmission impairments which have little effect on speech.
Coding is undertaken to alleviate transmission irregularities, to increase the information capacity of the system, to enable error detection, and to provide message security. The coding process in the data transmitter simply rearranges the applied data machine signals into some other format. At the receiving end the reverse processing is performed to recover the original machine signals.
The diagrams show the two types of information signals that are applied in digital form to a data modem. Shown in A is a binary non-return to zero signal. In B the same signal is shown in the return to zero format. The difference between A and B is that in A successive marks or spaces follow one another, whereas in B there must be a return to the space level between successive marks. The voltage values of marks and spaces are arbitrary and may be positive, negative, or both.
Of primary concern when considering the transmission of data from one device to another is wiring. And of primary concern when considering the wiring is the data stream. Do we send one bit at a time, or do we group bits into larger groups and. if so, how? The transmission of binary data across a link can be accomplished either in parallel mode or serial mode. In parallel mode, multiple bits are sent with each clock pulse. In serial mode, one bit is sent with each clock pulse. While there is only one -way to send parallel data, there are two subclasses of serial transmission: synchronous and asynchronous.
Asynchronous transmission is so named because the timing of a signal is unimportant. Instead, information is received and translated by agreed-upon patterns. As long as those patterns are followed, the receiving device can retrieve the information without regard to the rhythm in which it is sent. Patterns are based on grouping the bit stream into bytes. Each group, usually eight bits, is sent along the link as a unit. The sending system handles each group independently, relaying it to the link whenever ready, without regard to a timer.
Without a synchronizing pulse, the receiver cannot use timing to predict when the next group will arrive. To alert the receiver to the arrival of a new group, therefore, an extra bit is added to the beginning of each byte. This bit, usually a 0, is called the start bit. To let the receiver know that the byte is finished, one or more additional bits are appended to the end of the byte. These bits, usually 1s, are called stop bits. By this method, each byte is increased in size to at least 10 bits, of which 8 are information and 2 or more are signals to the receiver. In addition, the transmission of each byte may then be followed by a gap of varying duration. This gap can be represented either by an idle channel or by a stream of additional stop bits.
The start and stop bits and the gap alert the receiver to the beginning and end of each byte and allow it to synchronize with the data stream. This mechanism is called asynchronous because, at the byte level, sender and receiver do not have to be synchronized. But within each byte, the receiver must still be synchronized with the incoming bit stream. That is, some synchronization is required, but only for the duration of a single byte. The receiving device resynchronizes at the onset of each new byte. When the receiver detects a start bit, it sets a timer and begins counting bits as they come in. After n bits the receiver looks for a stop bit. As soon as it detects the stop bit, it ignores any received pulses until it detects the next start bit.
The addition of stop and start bits and the insertion of gaps into the bit stream make asynchronous transmission slower than forms of transmission that can operate without the addition of control information. But it is cheap and effective, two advantages that make it an attractive choice for situations like low-speed communication. For example, the connection of a terminal to a computer is a na1ural application for asynchronous transmission. A user type’s only one character at a time, types extremely slowly in data processing terms, and leaves unpredictable gaps of time between each character.
In synchronous transmission, the bit stream is combined into longer "frames", which may contain multiple bytes. Each byte, however, is introduced onto the transmission link without a gap between it and the next one. It is left to the receiver to separate the bit stream into bytes for decoding purposes. In other words, data are transmitted as an unbroken string of 1s and 0s, and the receiver separates that string into the bytes, or characters, it needs to reconstruct the information.
It gives a schematic illustration of synchronous transmission. We have drawn in the divisions between bytes. In reality, those divisions do not exist; the sender puts as data onto the line as one long string. If the sender wishes to send data in separate bursts, the gaps between bursts must be filled with a special sequence of 0s and 1s that means idle. The receiver counts the bits as they arrive and groups them in eight-bit units.
Without gaps and start/stop bits, there is no built- in mechanism to help the receiving device adjust its bit synchronization in midstream. Timing becomes very important, therefore, because the accuracy of the received information is completely dependent on the ability of the receiving device to keep an accurate count of the bits as they come in.
The advantage of synchronous transmission is speed. With no extra bits or gaps to introduce at the sending end and remove at the receiving end and, by extension, with fewer bits to move across the link, synchronous transmission is faster than asynchronous transmission. For this reason, it is more useful for high-speed applications like the transmission of data from one computer to another. Byte synchronization is accomplished in the data link layer.
By far the most popular serial interface between a computer and its CRT terminal is the asynchronous serial interface. This interface is so called because the transmitted data and the received data are not synchronized over any extended period and therefore no special means of synchronizing the clocks at the transmitter and receiver is necessary. In fact, the asynchronous serial data link is a very old form of data transmission system and has its origin in the era of teleprompter.
Serial data transmission systems have been around for a long time and are found in the telephone (human speech), Morse code, semaphore, and even the smoke signals once used by native Americans. The fundamental problem encountered by all serial data transmission systems is how to split the incoming data stream into individual units (i.e., bits) and how to group these units into characters. For example, in Morse code the dots and dashes of a character are separated by an intersymbol space, while the individual characters are separated by an inter character space, which is three times the duration of an intersymbol space.
First we examine how the data stream is divided into individual bits and the bits grouped into characters in an asynchronous serial data link. The key to the operation of this type of fink is both simple and ingenious.
An asynchronous serial data link is said to be character oriented, as information is transmitted in the form of groups of bits called characters. These characters are invariable units comprising 7 or 8 bits of "information" plus 2 to 4 control bits and frequently correspond to ASCII-encoded characters. Initially, when no information is being transmitted, the line is in an idle state. Traditionally, the idle state is referred to as the mark level. By convention this corresponds to a logical 1 level.
When the transmitter wishes to send data, it first places the line in a space level (i.e., the complement of a mark) for one element period. This element is called the start bit and has a duration of T seconds. The transmitter then sends the character, 1 bit at a time, by placing each successive bit on the fine for a duration of T seconds, until all bits have been transmitted. Then a single parity bit is calculated by the transmitter and sent after the data bits. Finally, the transmitter sends a stop bit at a mark level (i.e., the same level as the idle state) for one or two bit periods. Now the transmitter may send another character whenever it wishes.
At the receiving end of an asynchronous serial data link, the receiver continually monitors the line looking for a start bit. Once the start bit has been detected, the receiver waits until the end of the start bit and then samples the next N bits at their centers, using a clock generated locally by the receiver. As each incoming bit is sampled, it is used to construct a new character. When the received character has been assembled, its parity is calculated and compared with the received parity bit following the character. If they are not equal, a parity error flag is set to indicate a transmission error.
The most critical aspect of the system is the receiver timing. The falling edge of the start bit triggers the receiver’s local clock, which samples each incoming bit at its nominal center. Suppose the receiver clock waits T/2 seconds from the falling edge of the start bit and samples the incoming data every T seconds thereafter until the stop bit has been sampled. As the receiver's clock is not synchronized with the transmitter clock, the sampling is not exact.
The most obvious disadvantage of asynchronous data transmission is the need for a start, parity, and stop bit for each transmitted character. If 7 bit characters are used, the overall efficiency is only 70%. A less obvious disadvantage is due to the character-oriented nature of the data link. Whenever the data link connects a CRT terminal to a computer, few problems arise, as the terminal is itself character oriented. However, if the data link is being used to, say, dump binary data to a magnetic tape, problems arise.
2.中文翻譯
數(shù)據(jù)通信
數(shù)據(jù)信號(hào)在各種各樣的話路上傳輸:它們通過(guò)導(dǎo)線從一根電桿傳到另一根電桿;它們經(jīng)過(guò)地下電纜傳送;它們通過(guò)微波設(shè)備從一個(gè)山頭傳到另一個(gè)山頭;它們通過(guò)海底電纜,通過(guò)通信衛(wèi)星,從一個(gè)洲傳到另一個(gè)洲。為了把數(shù)字化機(jī)器信號(hào)變換為適合在這些設(shè)備中傳輸?shù)男盘?hào)形式,需要使用某種類型的數(shù)據(jù)變換設(shè)備。
向變換設(shè)備發(fā)送部分(即調(diào)制器)提供輸入的數(shù)據(jù)設(shè)備可以是鍵盤、打印機(jī)、卡片閱讀器、紙帶終端計(jì)算機(jī)或磁帶終端機(jī)。變換器接收部分(即解調(diào)器)的輸出可以適用于紙帶鑿孔機(jī)、打印機(jī)、卡片鑿孔機(jī)、磁帶機(jī)、計(jì)算機(jī)或視頻顯示終端。一般地說(shuō),變換器的調(diào)制部分和解調(diào)部分合并成為一個(gè)雙向數(shù)據(jù)發(fā)送接收機(jī),通常稱之為數(shù)據(jù)調(diào)制解調(diào)器或數(shù)據(jù)傳輸機(jī)。
典型的全雙工數(shù)據(jù)傳輸系統(tǒng),包括始發(fā)端數(shù)據(jù)處理設(shè)備和由緩沖器和控制單元組成的接口部件。發(fā)端的接口部件以數(shù)據(jù)處理機(jī)的處理速度所確定的速率接收數(shù)據(jù),將它們暫時(shí)存儲(chǔ)起來(lái),并以與數(shù)據(jù)調(diào)制解調(diào)器兼容的速率予以轉(zhuǎn)發(fā)。在接收端,接口部件接受所收到的數(shù)據(jù),將它們存儲(chǔ)起來(lái),再以適當(dāng)?shù)乃俾仕偷綌?shù)據(jù)處理機(jī)中去。
來(lái)自發(fā)端接口部件的定時(shí)信號(hào)被加到數(shù)據(jù)調(diào)制解調(diào)器上,以使計(jì)算機(jī)與數(shù)傳機(jī)同步。在接收端,從數(shù)據(jù)流中取出同步脈沖使計(jì)算機(jī)同步。
當(dāng)有一臺(tái)以上數(shù)傳機(jī)接至一臺(tái)計(jì)算機(jī)時(shí),接口設(shè)備的容量是主要問(wèn)題,因?yàn)樗仨毚_定分配給每條線路的時(shí)隙。有各種類型的接口部件可以使用,如磁芯存儲(chǔ)器、移位寄存器和時(shí)延線。然而并不是所有的數(shù)據(jù)通信終端在數(shù)據(jù)處理機(jī)和數(shù)據(jù)調(diào)制解調(diào)器之間都使用接口。如果沒(méi)有接口,那么輸入、數(shù)據(jù)傳輸和輸出這三個(gè)操作過(guò)程同時(shí)進(jìn)行,而且速率相同。
由于數(shù)據(jù)信號(hào)的形式一般不適宜在各種傳輸設(shè)備上傳送,通常對(duì)信號(hào)要進(jìn)行編碼。在理想情況下,傳輸媒介應(yīng)當(dāng)具有線性衰減和線性時(shí)延的特性。但實(shí)際情況根本不是這樣,傳輸損傷總是存在,干擾了數(shù)據(jù)信號(hào)。相比之下,語(yǔ)聲通信可以容忍極不規(guī)則的傳輸情況。如果電話電路的衰耗嚴(yán)重或噪聲大,說(shuō)話人就會(huì)提高嗓音,自動(dòng)予以彌補(bǔ)。如果講的某些單詞因傳輸困難而沒(méi)聽(tīng)見(jiàn),雙方往往仍可聽(tīng)懂,因?yàn)檎Z(yǔ)言有冗余度。數(shù)據(jù)信號(hào)則與之相反,除非有意加入,它本身沒(méi)有冗余度,所以傳輸質(zhì)量的不穩(wěn)定只能得到非常有限的補(bǔ)償。另外,數(shù)據(jù) 信號(hào)對(duì)基本上不影響話音的其他傳輸質(zhì)量下降很敏感。
為了減少不正常的傳輸情況,增加系統(tǒng)的信息容量,實(shí)現(xiàn)差錯(cuò)檢測(cè)和消息保密,就要采用編碼手段。數(shù)據(jù)發(fā)送端的編碼僅僅是將所輸入的數(shù)據(jù)信號(hào)重新排列成其他形式。在接收端則進(jìn)行相反的過(guò)程(譯碼),恢復(fù)原來(lái)的數(shù)據(jù)信號(hào)。
所給的波形表示以數(shù)字形式輸入到數(shù)據(jù)調(diào)制解調(diào)器的兩類信息信號(hào)。波形A是二進(jìn)制不歸零(NRZ)信號(hào),波形B是同一信號(hào)的歸零(RZ)形式。波形A與波形B的區(qū)別是:波形A中傳號(hào)或空號(hào)連續(xù)不新地出現(xiàn),而波形B中脈沖幅度必須在兩個(gè)連續(xù)信號(hào)之間回到空號(hào)電平上來(lái)。傳號(hào)和空號(hào)的電壓值是任意的,可以是正值或負(fù)值,也可以是正負(fù)值兼而有之。
當(dāng)研究數(shù)據(jù)從一個(gè)設(shè)備向另一個(gè)設(shè)備傳輸時(shí),我們關(guān)心的主要問(wèn)題之一是連線。而考慮連線時(shí),數(shù)據(jù)流又是我們所關(guān)心的問(wèn)題。我們是一次發(fā)送一個(gè)比特呢,或者是成組發(fā)送它們呢?如果要成組發(fā)送,又如何做到這一點(diǎn)呢?通過(guò)鏈路來(lái)發(fā)送二進(jìn)制數(shù)據(jù)的方法可以這樣實(shí)現(xiàn):要么采用并行方式,要么使用串行的模式。在并行模式中,在每一個(gè)時(shí)鐘脈沖到來(lái)時(shí),可同時(shí)發(fā)送多個(gè)比特。而在串行方式里,伴隨每個(gè)時(shí)鐘只發(fā)送一個(gè)比特。雖然只有一種并行發(fā)送數(shù)據(jù)的方法,但串行傳輸卻有兩類:同步傳輸和異步傳輸。
異步傳輸被如此稱呼,是因?yàn)樾盘?hào)的定時(shí)并不重要。不同的是,信息是按事先約定的方式來(lái)接收和翻譯的。只要遵照這些約定,接收器件就能夠恢復(fù)信息,而不理會(huì)它們?cè)诎l(fā)送時(shí)的節(jié)拍。約定的基礎(chǔ)是將比特流組合成字節(jié)。每一個(gè)組合通常含有8個(gè)比特,它被作為一個(gè)單元在鏈路上發(fā)送。發(fā)送系統(tǒng)單獨(dú)處理每個(gè)組合,當(dāng)將組合準(zhǔn)備停當(dāng)就將它放到鏈路上,且與定時(shí)器沒(méi)有關(guān)系。
沒(méi)有了同步脈沖,接收機(jī)就不能利用定時(shí)信號(hào)去預(yù)測(cè)下一個(gè)組合什么時(shí)候到達(dá)。因此,為了通知接收機(jī)有新的組合到達(dá),就得在每個(gè)字節(jié)的開(kāi)始加上一個(gè)額外的比特。這個(gè)比特通常為0,并被稱為起始位。為了讓接收機(jī)知道字節(jié)的結(jié)束,在字節(jié)的尾部又另加了一個(gè)或多個(gè)比特。這些比特通常為1,被人們稱為停止住。運(yùn)用這種方法,每一個(gè)字節(jié)的長(zhǎng)度至少增加到10個(gè)比特,其中有8 個(gè)比特的信息,以及2個(gè)或更多的比特,作為向接收機(jī)打"招呼"的信號(hào)。此外,在每個(gè)字節(jié)傳送之后,可能會(huì)有一段變化的間隙。這個(gè)時(shí)隙可用空閑信道或另加停止位來(lái)表示。
起始位、停止位和時(shí)隙告訴接收機(jī)每一個(gè)字節(jié)的開(kāi)始和結(jié)束,并讓接收機(jī)按照數(shù)據(jù)流進(jìn)行同步。這種機(jī)制被稱為是異步的,因?yàn)樵谧止?jié)級(jí)上,發(fā)送器和接收器不需要同步。但是在每個(gè)字節(jié)內(nèi)部,接收器仍需與流入的比特流同步。 這就是說(shuō),某種同步還是需要的,但僅限于在一個(gè)字節(jié)持續(xù)的期間內(nèi)。在每一個(gè)新的字節(jié)開(kāi)始時(shí),接收機(jī)又重新進(jìn)行同步。當(dāng)接收機(jī)檢測(cè)到一個(gè)起始位,它就將定時(shí)器置位,并在比特流入時(shí)開(kāi)始記數(shù)。在接收了n比特之后,接收器就尋找停止住。一旦它檢測(cè)到停止住,它就忽略以后收到的脈沖,直到檢測(cè)到下 一個(gè)起始位為止。
比起不添加控制信息就能運(yùn)行的傳輸形式,異步傳輸由于增加了停止住、 起始位和在比特流中插入時(shí)隙而顯得慢一些。但由于具有便宜和高效兩大優(yōu)點(diǎn),這使得它在如低速通信的一些場(chǎng)合成為一項(xiàng)誘人的選擇。例如,終端與計(jì)算機(jī)的連接就是異步傳輸方式很自然的應(yīng)用。用戶每次只能敲一個(gè)字符,這在數(shù)據(jù)處理領(lǐng)域里是極慢的,而且在每個(gè)字符闊的間隙長(zhǎng)短也難以預(yù)測(cè)。
在同步傳輸中,比特流合并成較長(zhǎng)的“幀”,而幀可能含有多個(gè)字節(jié)。然而當(dāng)字節(jié)被引入到傳輸鏈路的時(shí)候,在字節(jié)之間卻沒(méi)有間隙。將比特流分成字節(jié)的任務(wù)是由接收器在解碼過(guò)程中完成的。換句話說(shuō),數(shù)據(jù)是以1和0組成的無(wú)間斷碼串來(lái)傳輸?shù)?,而接受器將這個(gè)碼串分離成字節(jié)或字符,它需要將信息重新恢復(fù)。
對(duì)同步傳輸做了簡(jiǎn)要的說(shuō)明。在字節(jié)之間我們畫上了分隔線。事實(shí)上,這些分隔線并不存在,而發(fā)送器是將一長(zhǎng)串的數(shù)據(jù)放到線路上的。如果發(fā)送器想以分離突發(fā)的形式發(fā)送數(shù)據(jù),則突發(fā)數(shù)據(jù)群之間的間隙就必須用一種由0和1組成的特殊碼序列來(lái)填充,而該序列表示空閑。接收器對(duì)收到的比特計(jì)數(shù)并將它們組合成8比特的單元。
由于沒(méi)有間隙和起始/停止住,因而就沒(méi)有了內(nèi)部機(jī)制去幫助接收器在碼流中調(diào)整它的比特同步。因?yàn)樗邮諗?shù)據(jù)的準(zhǔn)確性完全取決于接收器對(duì)流入比特精確計(jì)數(shù)的能力,因此定時(shí)交得極為重要。
同步傳輸?shù)膬?yōu)勢(shì)是速度。既然在發(fā)送端不用再引入間隙和額外的比特,在接收端不用再去除這些,并由此知道鏈路傳輸更少的數(shù)據(jù),因而同步傳輸比異步傳輸要快。因此,對(duì)于高速應(yīng)用的場(chǎng)合,例如由一個(gè)計(jì)算機(jī)向另一個(gè)計(jì)算機(jī)傳送數(shù)據(jù),則同步傳輸就更為有用。字節(jié)同步被在數(shù)據(jù)鏈路層中實(shí)現(xiàn)。
在計(jì)算機(jī)及其顯示器終端之間最為常見(jiàn)的串行接口是異步串行接口。這個(gè)接口之所以如此稱呼,是因?yàn)闊o(wú)論在多長(zhǎng)的時(shí)間區(qū)間里發(fā)送的數(shù)據(jù)和接收的數(shù)據(jù)是不同步的,因而沒(méi)有必要采用特殊的手段使發(fā)送器和接收器的時(shí)鐘同步。實(shí)際上,異步串行數(shù)據(jù)鏈路是一種古老的數(shù)據(jù)傳輸方式,它起源于電傳打字機(jī)的時(shí)代。
串行數(shù)據(jù)傳輸系統(tǒng)已有很長(zhǎng)的歷史了,電話(人類語(yǔ)音)、莫爾斯電碼、旗語(yǔ),甚至土著美洲人從前用過(guò)的煙火信號(hào)都可以視為串行數(shù)據(jù)傳輸。所有串行數(shù)據(jù)傳輸系統(tǒng)面臨的首要問(wèn)題都是如何把輸入的數(shù)據(jù)流分開(kāi)為單獨(dú)的碼元(即比特),以及怎樣把這些碼元組合成字符。例如,在莫爾斯電碼中,字的點(diǎn)、劃是由符號(hào)間的空格來(lái)分開(kāi)的,而字符之間又是由字符間的空格分開(kāi)的,這個(gè)空格是點(diǎn)、劃間空格的三倍。
首先我們研究一下在異步串行數(shù)據(jù)鏈路中數(shù)據(jù)流是怎樣分成單獨(dú)的碼元,以及碼元是如何組成字符的。這類系統(tǒng)運(yùn)行的核心原理既簡(jiǎn)單又精巧。
異步串行數(shù)據(jù)鏈路被稱為面向字符的,因?yàn)樾畔⑹且员环Q作字符的比特組的形式傳送的。這些字符是一些固定的單元,每個(gè)單元都包含7個(gè)或8個(gè)信息比特加上2~4個(gè)控制比特,并通常與ASCII碼的字符一致。當(dāng)傳輸開(kāi)始,無(wú)信息發(fā)送時(shí),線路處于空閑狀態(tài),而空閑狀態(tài)習(xí)慣上被稱為信號(hào)電平。通常它對(duì)應(yīng)于邏輯1電平。
當(dāng)發(fā)送器想要發(fā)送數(shù)據(jù)時(shí),它首先將線路置成空號(hào)電平(即信號(hào)的反瑪),此電平持續(xù)一個(gè)單元(碼元)的問(wèn)隔時(shí)間。此(空號(hào))單元稱為起始位,持續(xù)時(shí)間為T秒。然后發(fā)送器發(fā)送字符,一次一個(gè)比特地將相繼的碼元送上線路。每個(gè)碼元持續(xù)T秒,直到所有碼元發(fā)完為止。此后,發(fā)送器計(jì)算得出一個(gè)奇偶校驗(yàn)位并將它在數(shù)據(jù)碼元之后發(fā)出。最后,發(fā)送器送出一個(gè)停止位,其電平為信號(hào)電平(與空閑狀態(tài)電乎相同),時(shí)長(zhǎng)為1個(gè)或2個(gè)比特寬度。如果發(fā)送器需要,它又可發(fā)送另一個(gè)字符。
在異步串行數(shù)據(jù)鏈路系統(tǒng)的接收端,接收器持續(xù)監(jiān)視著線路,搜索著起始位。一旦檢測(cè)到起始位并等到它結(jié)束,接收器就對(duì)隨后的N個(gè)碼元抽樣,抽樣點(diǎn)選在這些碼元的中心處。抽樣所用的時(shí)鐘是由接收器本地產(chǎn)生的。當(dāng)每一個(gè)輸入的碼元被抽樣后,就用這些樣值構(gòu)成一個(gè)新的字符。當(dāng)接收到的字符匯齊后,它的奇偶校驗(yàn)位就由計(jì)算得出并與接收到的奇偶校驗(yàn)位進(jìn)行比較。如果它們不等,則將奇偶校驗(yàn)錯(cuò)誤標(biāo)志置位,以標(biāo)明傳輸錯(cuò)誤。
對(duì)系統(tǒng)來(lái)說(shuō),最關(guān)鍵的問(wèn)題是接收器的定時(shí)。接收器的本地時(shí)鐘由起始位的下降沿啟動(dòng),然后在碼元的標(biāo)稱中心處對(duì)每個(gè)輸入比特進(jìn)行抽樣。接收器的時(shí)鐘自起始位的下降沿開(kāi)始等待T/2,而后每隔T秒抽樣輸入數(shù)據(jù),直至抽樣到停止位。如果接收器時(shí)鐘與發(fā)送器時(shí)鐘不同步,抽樣則是不準(zhǔn)確的。
對(duì)于每一個(gè)傳送的字符,異步數(shù)據(jù)傳輸都需要起始位、奇偶校驗(yàn)位和停止住,這是它最明顯的缺點(diǎn)。如果采用7比特字符,則總效率僅為70%。一個(gè)不太明顯的缺點(diǎn)是由于數(shù)據(jù)鏈路面向字符的特性造成的。在數(shù)據(jù)鏈路中無(wú)論何時(shí)將CRT終端連接到計(jì)算機(jī)上,都不會(huì)出現(xiàn)什么問(wèn)題,因?yàn)榻K端本身也是面向字符的。但是如果數(shù)據(jù)鏈路用于別處,比方說(shuō),將大量二進(jìn)制數(shù)據(jù)轉(zhuǎn)儲(chǔ)到磁帶上,則會(huì)產(chǎn)生麻煩。
10
收藏