freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

串行通信設(shè)計外文翻譯--基于rs-232的串行通信設(shè)計-預(yù)覽頁

2025-06-21 17:24 上一頁面

下一頁面
 

【正文】 f good features and also has focused on areas of application. RS485 has a antinoise capacity transmitting data, so it is monly used in industrial production. USB interface and IEEE1394 have fast speed, but some puters and operating systems do not support such interfaces. RS232 is most widely used as a serial interface in a PC puter and munications industries. RS232C standard is a protocol of asynchronous serial munication and has been widely used in PC and munication industries. Many short distance municational peripherals of PC such as printers, disks and terminals all municate with PC via RS232 serial interface. RS232C standard RS232C is the American Electronics Industry Association (EIA) formally announced, in the asynchronous serial munication, the most widely used standard bus. The standard for DCE and DTE serial binary munication between the maximum data transfer rate of up to 19. 2kbps, the longest transmission cables up to 15 meters 1RS 232C standard defines the 25lead, twoway munication in general, just Serial input RXD, serial output TXD and ground GND1RS 232C standard levels using negative logic, the provisions of + 3V ~ + 15V at any level between a logic 0level, 3V ~ 15V of Any level between a logic 1 level, with TTL and CMOS levels are different. In the interface circuit and puter interface chip in the mostly level TTL or CMOS, so the munication, the need for level conversion, so with the RS 232C standard level matching 1MAX232 chip level conversion can be done in this work. 4 RS232 is defined as the singleended standards, which has much characteristic, such as more munication distance in a lowspeed serial munications, moderate price and good practicality of the system, so it is most appropriate to be a munication port. RS232 is an essential modern puter interface, it includes ports COM1 and COM2, the port COM1 has 9pin connector. The new generation puter has a 9pin connector (DB9) so as to connect with the RS232 munication port. In order to achieve reliable and real time transmission, the system adopt a threewire connection method, that is to say that the GND pin, RXD pin and TXD pin of RS232 port is connected with the external port, it is shown in Figure 1. Figure 1. The RS232 port III. THE HARDWARE DESIGN OF SERIAL PORT COMMUNICATION The inout level of single chip puter is TTL level, while the RS232 serial interface of a PC puter is standard serial interface, so both the electrical specifications are inconsistent. In order to municate with the upper and lower puter, it is needed that the out level of single chip puter is changed to the TTL level. The mon level converter chip between TTL and RS232 level is MCI1488 and MCI1489. The MCI1488 converts TTL level to RS232 level, it needs the supply voltage of 177。 R1OUT, R2OUT should take MCS 51 in the serial receive pins RXD1 corresponding RS232C level T1OUT, T2OUT should be connected to PCreceiver RD。 關(guān)鍵詞: 串行通信;單片機;程序設(shè)計 一、緒論 在控制系統(tǒng)的工作中, PC 微機通過發(fā)送指令到步進電機中來收集圖像信息。在電機的控制系統(tǒng)中, PC 微機被稱為上位機,而由單片機所控制的步進電機被稱為下位機。此外,電壓等級會因為輸電線路的因素和電磁干擾而改變。從 IBM 個人電腦和兼容式電腦的時代開始,幾乎所有的計算機都配有 一個或多個串行端口和一個并行端口。對于并行通信,你需要采用 8條導(dǎo)線。 二、串口 通訊的簡述 串行通信是指通信的發(fā)送方和接收方之間數(shù)據(jù)信息的傳輸是在單根數(shù)據(jù)線上 ,以每次一個二進制位移動。有些設(shè)備因為在同一時間發(fā)送和接收數(shù)據(jù),被稱為全雙工設(shè)備。發(fā)送器和接收器必須設(shè)置為相同的數(shù)據(jù)通信比特或正確的比特率。波特率通常以每秒的位數(shù)( bps)來計量。使用校驗位提供了一個基本的機制,以檢測已發(fā)送數(shù)據(jù)是否損壞,但不保證檢查數(shù)據(jù)本身的錯誤。 串行通信有異步通信和同步通信兩種基本通信方式。在串行通信前 ,發(fā)送方和接收方要約定具體的數(shù)據(jù)格式和波特率 (通信協(xié)議 )。 MCS51系列單片機片內(nèi)含有一個全雙工的串行接口 ,通過編程也可實現(xiàn)串行通信功能。它們都有著自身的特點,同時也分別適用于不同的的應(yīng)用領(lǐng)域。 RS232C 標準是異步串行協(xié)議溝通,并已廣泛應(yīng)用于個人電腦和通信產(chǎn)業(yè)。 RS232C 標準定義了 25根引線 ,對于一般的雙向通信 ,只需使用串行輸入 RXD,串行輸出 TXD和地線 GND。 RS232被定義為單端標準,它具有許多的優(yōu)點,如更低速的串行通信,通信距離遠,適中的價格和良好的系統(tǒng)實用性,所以它是最適用的一個通信端口。 圖 的端口 三、串行通信端口的硬件設(shè)計 單片機應(yīng)用的是 TTL 電平,而 PC 機的 RS232串行接口使用的是標準的串行接口標準,所以兩者的電氣性能規(guī)格是不一致的。 12V 電源電壓,而 MCI1489可以將 RS232轉(zhuǎn)換成標準級的 TTL 電平,它需要電源電壓為 +5V。 MAX232芯片內(nèi)部有一個電源電壓變換器 ,可以把輸入的 +5V 電源變換成RS232C 輸出電平所需177。 MAX232的引腳 T1IN、 T2IN、 R1OUT、 R2OUT 為接 TTL/CMOS 電平的引腳,引腳 T1OUT、T2OUT、 R1IN、 R2IN 為接 RS232C 電平的引腳。不僅如此,它有許多優(yōu)點,比如價格適中,硬件簡單等等。當單片機接收通過 PC 電腦發(fā)送的數(shù)據(jù)信號時,它就會調(diào)用中斷服務(wù)程序。 A 串口中斷子程序用于接收數(shù)據(jù) 用于接收數(shù)據(jù)的串行端口的中斷子程序,主要是將 PC 微機接收和發(fā)送的數(shù)據(jù)存儲到分配的內(nèi)存中(不進行數(shù)據(jù)處理,以減少中斷的時間)。定時器從 0開始計數(shù)初始值 65535,然后中斷設(shè)定的定時器0被調(diào)用,在其中 。如果第一個數(shù)據(jù)是一個數(shù)字標記“ 48”,串行口中斷分程序設(shè)置 ,那么接下來的五個字節(jié)的數(shù)據(jù)用于確保步進電機的速度和步驟。當通信方案完全由 PC 微機發(fā)送的數(shù)據(jù)交換,代碼為“ 1”可寫入發(fā)送緩沖區(qū)。 五、 PC 和單片機通信程序的設(shè)計 為了方便地實現(xiàn)系統(tǒng)軟件移植和統(tǒng)一,上位機程序的設(shè)計使用作為控制系統(tǒng)編程工具 C++Builder , C++Builder PC 的編程工具。 ( 2)配置串口。微機具有兩個串口,一般稱為 COM1和 COM2,以便程序可以自動識別串行端口,利于端 口成功的發(fā)送和接收數(shù)據(jù)和指令。 ( 2)幀格式為 :一位起始位 ,八位數(shù)據(jù)位 ,一位可編程的第九位 (此位為發(fā)送和接收的地址 /數(shù)據(jù)的標志位 ),一位停止位。數(shù)據(jù)的通信采用累加和校驗的方法 ,即每傳送一組數(shù)據(jù) (個數(shù)自定 ,設(shè)為 100個 ),校驗一次累加和是否正確 ,正確則返回 00H,否則返回 FFH。 ( 7) PC 機采用 COM2通信。 18 參考文獻 [1]樊一支 ,姜文祥 ,陳梨園 .串行通信控制的 C++生成和 :清華大學出版社 ,2020年 ,第218 [2]茍?zhí)K艾 .C++ .北京 :北京希望電子出版社 ,2020年 ,第 16 [3]劉艷玲 .使用 MAX232進行的 MCS51單片機與 PC 機之間的的通信 .天津科技 ,1999年 ,第研究所 15( 2) :第 5658 [4]楊國霞 .采用消息方式處理串口與主程序間的通訊 .雜志 :促進科技 ,2020年 ,河北省科學院卷 .18(4):220223頁 [5]黎步銀 ,江盛林 ,盧重 ,周東祥 .基于 C 語言的串行通信程序設(shè)計 .作者 :Transcluction 技術(shù) ,2020,卷 .(2)第 6566 [6]王志忠 .單片機和 PC 機之間的串行通信 .現(xiàn)代電子技術(shù) ,2020,119,第 6870
點擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1