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

正文內(nèi)容

單片機課程設(shè)計論文-基于cbuilder的pc機與單片機之間的串口通信(已修改)

2024-12-03 22:14 本頁面
 

【正文】 1 河海大學(xué)計算機及信息工程學(xué)院(常州) 課程設(shè)計報告 題 目 基于 C++Builder 的 PC 機與單片機之間的串口通信 專業(yè) 自動化 學(xué)號 0862510109 學(xué)生姓名 指導(dǎo)教師 完成時間 20201222 2 摘 要 《單片機》是一 門技術(shù)性、應(yīng)用性很強的學(xué)科,如果不在 實踐技能的鍛煉上下功夫,單憑課堂理論課學(xué)習(xí),勢必出現(xiàn)理論與實踐脫節(jié),學(xué)習(xí)與應(yīng)用脫節(jié)的局面。因此為了能夠?qū)⒄n堂上學(xué)到的理論知識與實際應(yīng)用結(jié)合起來,而且能夠?qū)﹄娮与娐?、?子元器件、 印制電路板等方面的知識進(jìn)一步加深認(rèn)識,此次課設(shè) 主題為單片機串口通信的應(yīng)用之一。 通過串口,我們的個人電腦和單片機系統(tǒng)進(jìn)行通信。 個人電腦作為上位機,向下位機單片機系統(tǒng)發(fā)送數(shù)據(jù)幀 ,單片機系統(tǒng)接收后, 發(fā)回通信協(xié)議要求的數(shù)據(jù)幀??梢?用 C++ Builder 語言制作的應(yīng)用程序界面 或串口 調(diào)試助手字符 串輸入框中輸入數(shù)字和字符 來實現(xiàn) PC機與 80C51 系列 單片機的串口通信。 關(guān)鍵字:單片機、 PC 機、串口通信、 C++ Builder Abstract SCM is a technical, applied a strong discipline, if not in practice, work hard skills training, theoretical study of the classroom alone, theory and practice is bound to appear out of line, the gap between learning and application of situation. Therefore, in order to be able to classroom and practical application of theoretical knowledge bined, but also on the electronic circuits, electronic ponents, printed circuit boards and other knowledge to further deepen understanding of the theme of the course based Application Serial Communication one. Through the serial port, our personal puter and microcontroller systems to municate. PC as the host puter, the downbit machine microcontroller system to send data frames after receiving the SCM system, sends back the requested data munication protocol frame. Can make C + + Builder application language interface or serial debugging assistant string input box numbers and characters to achieve the PC, and 80C51 series microcontroller serial munication. Keywords: microcontroller, PC, serial munication, C + + Builder 3 目 錄 摘 要 .......................................................................................................................... 2 一、 需求分析 ........................................................................................................... 4 二、 系統(tǒng)設(shè)計及詳細(xì)設(shè)計 .............................................................................. 4 1. 串行通信原理 .............................................................................................. 4 2. 硬件設(shè)計 ....................................................................................................... 5 3. 軟件設(shè)計 ....................................................................................................... 5 串口初始化 ................................................................................................... 6 從機(單片機)接收主機( PC機)發(fā)送來的數(shù)據(jù)幀 ...................................... 6 從機發(fā)送數(shù)據(jù)幀給主機 ................................................................................. 7 拓展部分 ...................................................................................................... 7 三、 運行調(diào)試 ........................................................................................................... 8 ........................................................................................................... 8 ........................................................................................................... 8 四、總結(jié)與體會 ................................................................................................ 10 五、參考文獻(xiàn) ..................................................................................................... 10 六、附錄 ................................................................................................................ 11 4 一、 需求分析 在工業(yè)自動化系統(tǒng)中,常用到微機與單片機進(jìn)行控制和調(diào)試。單片機常被用作工業(yè)自動化系統(tǒng)中的前端處理器(也稱下位機)。深入到現(xiàn)場,采集各種數(shù)據(jù)及信息,進(jìn)行簡單處理后送至上位機( PC 機)。用一臺 PC機接收來自下位機的信息和數(shù)據(jù),經(jīng)處理后在微機界面上顯示,并向下位機下達(dá)命令,通過下位機對現(xiàn)場實施控制。其中,主要要解決的就是上位機與下位機的通信問題。 接下來將會描述本次課設(shè) PC 機與單片機間的串行通信原理、相關(guān)軟硬件設(shè)計及流程圖。 二、 系統(tǒng)設(shè)計及詳細(xì)設(shè)計 此次采用 80C51 系列串口的方式 1 進(jìn)行串行通信。串口結(jié)構(gòu) 如圖 1 所示。 圖 1 方式 1 是 10 位數(shù)據(jù)的異步通信口。 TXD 為數(shù)據(jù)發(fā)送引腳, RXD 為數(shù)據(jù)接收引腳,傳送一幀數(shù)據(jù)的格式 如圖 2 所示。其中 1 位起始位, 8 位數(shù)據(jù)位, 1位停止位。用軟件置 REN為 1 時,接收器以所選擇波特率的 16 倍速率采樣 RXD 引腳電平,檢測到 RXD 引腳輸入電平發(fā)生負(fù)跳變時,則說明起始位有效,將其移入輸入移位寄存器,并開始接收這一幀信息的其余位。接收過程中,數(shù)據(jù)從輸入移位寄存器右邊移入,起始位移至輸入移位寄存器最左邊時,控制電路進(jìn)行最后一次移位。當(dāng) RI=0,且 SM2=0(或接收到的停止位為 1)時,將接收到的 9 位數(shù)據(jù)的前 8 位數(shù)據(jù)裝入接收 SBUF,第 9 位(停止位
點擊復(fù)制文檔內(nèi)容
高考資料相關(guān)推薦
文庫吧 www.dybbs8.com
公安備案圖鄂ICP備17016276號-1