

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、<p><b> 本科畢業(yè)設(shè)計(jì)</b></p><p><b> 英文翻譯</b></p><p> 專業(yè)名稱 電子信息工程 </p><p> 學(xué)生姓名 ****** </p><p> 指導(dǎo)教師 *****
2、 </p><p> 完成時(shí)間 2013.06 </p><p> 本科畢業(yè)設(shè)計(jì)英文翻譯</p><p><b> 指導(dǎo)教師評(píng)閱意見</b></p><p> 學(xué)生姓名:****** 班級(jí):122902 得分: </p><p>
3、Serial Communication Based Character Display Terminal </p><p> To introduce</p><p> With microcontroller and microprocessor technology continues to evolve, especially in the field of network t
4、echnology widely used in the monitoring and control by the PC and multi-single chip consisting of multi-machine network monitoring and control system has become the SCM technology development in one direction. Computer a
5、nd computer or computer data transfer between the terminal can use a serial communications and parallel communications in two ways. Since the serial communication line with</p><p> Microcontroller hardware
6、structure and communication system </p><p> Microcontroller and PC serial communication generally use RS-232, RS-422, or B3-485 bus standard interface, there is also a non-standard 20nnJL current loop. To e
7、nsure reliable communications, the choice of interface must be noted: (1) the rate of communication; (2) Communication distance: (3) anti-jamming capability; (4) networking. This paper describes the use of RS-232 interfa
8、ce to communicate with the microcontroller method.</p><p> 1, RS-232 level converter and PC interface circuit</p><p> RS-232 is an early data communication to the public telephone network and
9、established standards, the logic level and ITL \ CMOS power almost entirely different. Logic "0" is defined as +5- +15 V between logic "1, defined as between -5 ~-15V Since RS-232 transmit and receive betw
10、een common ground transmission using non-equilibrium model, so a total of mode noise is coupled to the signal system, the standard recommended maximum communication distance of 15 meters, but the practical application of
11、 </p><p> RS-232 level and the general provisions of the microprocessor logic level inconsistent, must be level conversion, logic-level translators can use the following three ways.</p><p> Th
12、e conversion interface using MAX232 MAX232 chip is produced by MAXIM, including two-way driver and receiver RS-232 converter chip. Figure 2 is a practical circuit. Chip has an internal voltage converter, you can convert
13、the input voltage is +5 v RS-232 interface ± 10V voltage required, especially for no ± 12V single supply system. With this principle, the same chip as well MAx202, AD's ADDtl01 and INl2 only SIL's ICl23
14、2 chips.</p><p> Implemented using discrete components Figure 3 shows the conversion interface implemented using discrete components RS-232-TTL level conversion interface circuit, which is characterized by
15、the use of PC-BS-232 interface signal ③ feet out (also available ④, ⑦ feet ) to supply the negative supply, FC machine ③, ④, ⑦ feet in the non-transmission logic "0" level are one level (-10V or so), the drive
16、capacity of 20mA, using this characteristic, with a diode and an electrolytic capacitors, electrolyti</p><p> The introduction of the RS. 232 to TTL level conversion method can be applied to most of the com
17、munication system, in some special applications such as electrostatic protection needs, multi-transceiver (eg with MODEM connected) can be used when MAX238 (4 drive, four receiving) or MAX3221t t15Kv electrostatic protec
18、tion) and other chips.</p><p> 2, single-chip serial communication design</p><p> SCM string works the widely used 51 series microcontroller serial communication can operate in synchronous or
19、asynchronous mode, most compatible with the 8051 series has one or more UART asynchronous serial interface, which is designed for users communication program provides good facilities. When the application system requires
20、 multiple serial communication interface, we can use the following methods: (a) multi-chip serial port, such as Winbond WW77E58 there are two serial interfaces; (2) adopt</p><p> Microcontroller serial port
21、 rate setting microcontroller and PC communication, the communication rate by timer T1 or T2 timer generates (52 series), at work in the way 2:00 T1 communication rate is calculated as: Porter String = (SMOD × Fosc)
22、 / (32 × 12 × [256-TH1]). Which crystal frequency Fosc, in order to obtain accurate communication rate, Fosc usually 11.0592MH2. The T1 timer communication system, the rate can not be too high, generally up to
23、19200bit / s. If in order to obtain a higher com</p><p> Single-chip serial communication program implementations practical applications, SCM communication procedures generally use interrupt communication w
24、ith the computer, the computer do the main prosecution. When the microcontroller receives address signals sent by computer, they transferred to the interrupt service routine, the computer sends data. Its interrupt servic
25、e program flow shown in Figure 4, the interrupt service procedure also applies to multi-machine communication systems. See the deta</p><p> General principles of design requirements:</p><p> T
26、he entire control system to send data from the PC to operate, using 51 microcontroller system and PC RS232 serial port, two-way data communications, and then use visual programming preparing serial debugging software, fu
27、rther serial port to send "1", "2", "3 "......" 8 "," 9 "," 0 "and other characters, the circuit board receives the data via lcd1602 LCD display, feedback to th
28、e PC, and it will show the successful confirmation signal that the PC serial port debugging software receive buffer wil</p><p> 基于串口通信的字符顯示終端的設(shè)計(jì) </p><p><b> 介紹</b></p><
29、p> 隨著單片機(jī)和微機(jī)技術(shù)的不斷發(fā)展,特別是網(wǎng)絡(luò)技術(shù)在測(cè)控領(lǐng)域的廣泛應(yīng)用,由PC機(jī)和多臺(tái)單片機(jī)構(gòu)成的多機(jī)網(wǎng)絡(luò)測(cè)控系統(tǒng)已成為單片機(jī)技術(shù)發(fā)展的一個(gè)方向。計(jì)算機(jī)與計(jì)算機(jī)或計(jì)算機(jī)與終端之間的數(shù)據(jù)傳送可以采用串行通訊和并行通訊二種方式。由于串行通訊方式具有使用線路少、成本低,特別是在遠(yuǎn)程傳輸時(shí),避免了多條線路特性的不一致而被廣泛采用。 在串行通訊時(shí),要求通訊雙方都采用一個(gè)標(biāo)準(zhǔn)接口,使不同的設(shè)備可以方便地連接起來進(jìn)行通訊。
30、0;RS-232-C接口(又稱 EIA RS-232-C)是目前最常用的一種串行通訊接口。它是在1970年由美國(guó)電子工業(yè)協(xié)會(huì)(EIA)聯(lián)合貝爾系統(tǒng)、 調(diào)制解調(diào)器廠家及計(jì)算機(jī)終端生產(chǎn)廠家共同制定的用于串行通訊的標(biāo) 準(zhǔn)。它的全名是“數(shù)據(jù)終端設(shè)備(DTE)和數(shù)據(jù)通訊設(shè)備(DCE)之間 串行二進(jìn)制數(shù)據(jù)交換接口技術(shù)標(biāo)準(zhǔn)”該標(biāo)準(zhǔn)規(guī)定采用一個(gè)25個(gè)腳的 DB25連接器,對(duì)連接器的每個(gè)引腳的信
31、號(hào)內(nèi)容加以規(guī)定,還對(duì)各種信 號(hào)的電平加以規(guī)定。串口通信結(jié)合了單片機(jī)在實(shí)時(shí)數(shù)據(jù)采集和微機(jī)對(duì)圖形處理、顯示的優(yōu)點(diǎn)。同時(shí),windows環(huán)境下后臺(tái)微機(jī)在數(shù)據(jù)庫管理上具有明顯的優(yōu)勢(shì)。使得單片機(jī)的應(yīng)用已不僅僅局限于傳統(tǒng)意義上</p><p> 硬件結(jié)構(gòu)和單片機(jī)的通信系統(tǒng)設(shè)計(jì)</p><p> 單片機(jī)和PC機(jī)的串行通信一般采用RS-232、RS-422或B3-485總線標(biāo)準(zhǔn)接口,也有采用
32、非標(biāo)準(zhǔn)的20nnJL電流環(huán)的。為保證通信的可靠,在選擇接口時(shí)必須注意:(1)通信的速率;(2)通信距離:(3)抗干擾能力;(4)組網(wǎng)方式。本文主要介紹采用RS-232接口與單片機(jī)通信的方法。</p><p> 1、 RS-232電平轉(zhuǎn)換和PC機(jī)的接口電路</p><p> RS-232是早期為公用電話網(wǎng)絡(luò)數(shù)據(jù)通信而制定的標(biāo)準(zhǔn),其邏輯電平與ITL\CMOS電乎完全不同。邏輯“0”規(guī)定為+
33、5- +15V之間,邏輯“1,,規(guī)定為-5~-15V之間。由于RS-232發(fā)送和接收之間有公共地,傳輸采用非平衡模式,因此共模噪聲會(huì)耦合到信號(hào)系統(tǒng)中,其標(biāo)準(zhǔn)建議的最大通信距離為15米.但實(shí)際應(yīng)用中我們?cè)?00bi/s的速率下可以達(dá)到300米。</p><p> RS-232規(guī)定的電平和一般微處理器的邏輯電平不一致,必須進(jìn)行電平轉(zhuǎn)換,實(shí)現(xiàn)邏輯電平轉(zhuǎn)換可以采用以下三種方式。</p><p>
34、 采用MAX232芯片的轉(zhuǎn)換接口 MAX232是MAXIM公司生產(chǎn)的,包含兩路驅(qū)動(dòng)器和接收器的RS-232轉(zhuǎn)換芯片。圖2為實(shí)際電路。芯片內(nèi)部有一個(gè)電壓轉(zhuǎn)換器,可以把輸入的+5v電壓轉(zhuǎn)換為RS-232接口所需的±10V電壓,尤其適用于沒有±12V的單電源系統(tǒng)。與此原理相同的芯片還有MAx202、AD公司的ADDtl01以及 INl2只SIL公司的ICl232芯片。</p><p> 采用分立
35、元件實(shí)現(xiàn)的轉(zhuǎn)換接口圖3為采用分立元件實(shí)現(xiàn)的RS-232-TTL電平的轉(zhuǎn)換接口電路,其特點(diǎn)是利用PC機(jī)的BS-232接口的③腳信號(hào)出(也可用④、⑦腳)來供給負(fù)電源,F(xiàn)C機(jī)的③、④、⑦腳在非發(fā)送邏輯”0“電平時(shí)均為1電平(-10V左右),其驅(qū)動(dòng)能力為20mA,利用這個(gè)特性,用一個(gè)二極管和電解電容,即在電解電容上獲取了RS-232通信所需的負(fù)電源。該電路簡(jiǎn)單、功耗小,在沒有專用芯片時(shí)不失為一種替代方法。</p><p>
36、; 上述介紹的RS。232至TTL電平轉(zhuǎn)換的方法可以適用于大多數(shù)通信系統(tǒng),在一些特殊應(yīng)用場(chǎng)合需要諸如靜電保護(hù)、多收發(fā)器(如與MODEM連接)時(shí)可采用MAX238(4驅(qū)動(dòng)、4接收)或MAX3221t t15Kv靜電保護(hù))等芯片。</p><p> 2、單片機(jī)串口通信設(shè)計(jì)</p><p> 單片機(jī)串工作方式目前廣泛應(yīng)用的51系列單片機(jī)的串行通信可工作于同步或異步方式,多數(shù)與8031兼容的
37、51系列單片機(jī)都有一個(gè)或多個(gè)UART異步串行接口,這就為用戶設(shè)計(jì)通信程序提供了很好的便利條件。當(dāng)應(yīng)用系統(tǒng)中需要多個(gè)串行通信接口時(shí),可采用以下幾種方法:(1)采用多串口的單片機(jī),如華邦的WW77E58就有2個(gè)串行接口;(2)采用通用異步串口擴(kuò)展芯片,如TLl6c552(2路)、LCl6C554(4路);(3)采用普通I/O模擬實(shí)現(xiàn)通信。這是最簡(jiǎn)單經(jīng)濟(jì)的方法,并且可以實(shí)現(xiàn)高速串通信,實(shí)現(xiàn)方法詳見《電子世界)雜志以前刊登的有關(guān)文章。本文僅討論
38、采用一個(gè)異步串行通信的設(shè)計(jì)方法,單片機(jī)串口的控制方式MCS-51系列單片機(jī)對(duì)串口的控制是通過對(duì)串行口控制寄存器SCON和功率控制寄存器PCON的設(shè)置來實(shí)現(xiàn)的。SCON是一個(gè)可位尋址的特殊功能寄存器,通過設(shè)置SGON的SM0和SMI,可以使單片機(jī)有四種不同的工作方式。SCON的格式可參見有關(guān)手冊(cè)說明。在用于和PC機(jī)實(shí)現(xiàn)串行通信時(shí),一般設(shè)置為方式1或方式3,主要區(qū)別是方式1的數(shù)據(jù)格式為8位,方式3的數(shù)據(jù)格式為9位,其中第9位SM2為多機(jī)通信
39、位,‘可實(shí)現(xiàn)單片機(jī)的多</p><p> 單片機(jī)串口的速率設(shè)置單片機(jī)和PC機(jī)通信時(shí),其通信速率由定時(shí)器T1或定時(shí)器T2產(chǎn)生(52系列),在T1工作在方式2時(shí)的通信速率的計(jì)算公式為:波特串=(SMOD× Fosc)/(32×12×[256-TH1])。其中Fosc晶振頻率,為獲得準(zhǔn)確的通信速率,F(xiàn)osc通常為11.0592MH2。采用T1定時(shí)器通信的系統(tǒng),速率不可能過高,一般情況下最
40、高為19200bit/s。如為了獲得更高的通信速率可利用52系列單片機(jī)的定時(shí)器T2,最高速率可達(dá) 115200bjt/s。實(shí)際應(yīng)用中我們?cè)?jīng)在6MH2晶振的單片機(jī)系統(tǒng)中實(shí)現(xiàn)了38400bit/s的高速通信。</p><p> 單片機(jī)串口通信程序的實(shí)現(xiàn)方法實(shí)際應(yīng)用中,單片機(jī)通信程序一般采用中斷方式與微機(jī)通信,微機(jī)做為主控方。當(dāng)單片機(jī)收到微機(jī)發(fā)送的地址信號(hào)時(shí),便轉(zhuǎn)入中斷服務(wù)程序,向微機(jī)發(fā)送數(shù)據(jù)。其中斷服務(wù)于程序流程
41、見圖4,該中斷服務(wù)于程序也適用于多機(jī)通信的系統(tǒng)。詳細(xì)的程序清單請(qǐng)參見本刊網(wǎng)站COMMON.ASM,單片機(jī)的晶振為11. 0592MHz,通信速率為9600bit/s,幀格式為N.8.1。</p><p><b> 總設(shè)計(jì)要求原理:</b></p><p> 整個(gè)控制系統(tǒng)由PC機(jī)發(fā)送數(shù)據(jù)進(jìn)行操作,利用51單片機(jī)系統(tǒng)與PC機(jī)RS232串口相連,實(shí)現(xiàn)雙向數(shù)據(jù)通信,然后利
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 眾賞文庫僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 基于串口通信的字符終端的設(shè)計(jì)畢業(yè)設(shè)計(jì)
- 外文翻譯--字符的計(jì)算機(jī)處理與顯示
- 外文翻譯--字符的計(jì)算機(jī)處理與顯示
- 外文翻譯--字符的計(jì)算機(jī)處理與顯示
- 外文翻譯--字符的計(jì)算機(jī)處理與顯示.doc
- 外文翻譯--字符的計(jì)算機(jī)處理與顯示.doc
- 基于dsp的串口通信設(shè)計(jì)與實(shí)現(xiàn)
- 基于fpga的串口通信電路設(shè)計(jì)
- 基于Ad Hoc網(wǎng)絡(luò)的船舶通信終端顯示系統(tǒng).pdf
- 串口通信c++課程設(shè)計(jì)--基于串口通信的高級(jí)語言控制程序的設(shè)計(jì)
- 基于 qt 的串口通信工具的設(shè)計(jì)與實(shí)現(xiàn)
- 基于fpga的lcd字符顯示電子鐘設(shè)計(jì)
- 基于cpld的字符液晶顯示課程設(shè)計(jì)
- 單片機(jī)串口通信及液晶顯示
- 基于網(wǎng)絡(luò)通信與串口通信的電梯仿真軟件的設(shè)計(jì).pdf
- 串行通信設(shè)計(jì)外文翻譯--基于rs-232的串行通信設(shè)計(jì)
- 基于FPGA實(shí)現(xiàn)的USB串口通信.pdf
- 基于DirectDraw的雷達(dá)操控顯示終端設(shè)計(jì).pdf
- 基于FPGA實(shí)現(xiàn)高速串口通信的電路設(shè)計(jì).pdf
- 畢業(yè)論文--基于fpga的串口通信電路設(shè)計(jì)
評(píng)論
0/150
提交評(píng)論