【正文】
ata, the host display sending data. The system is a singlechip microcontroller receiving sending another way, balanced transmission standard, has a strong antijamming capability 、is easy to use、 easy to maintain、operate and simple, in real life, also has a wide range of applications. Keywords: muchmachine munication、RS485 protocol、 AVR microcontroller 基于AVR單片機的485通信系統(tǒng)設計1 引 言在一個基于單片機的數(shù)據(jù)采集和實時控制系統(tǒng)的微控制器系統(tǒng)中,通過計算機接口的RS232接口與計算機之間命令和數(shù)據(jù)傳送,我們可以檢測和控制生產(chǎn)現(xiàn)場。s society is a digital era, the application of muchmachine munication systems have been widely seeped into the scientific research in all fields ,such as: military technology, culture and the arts, engineering and people39。該系統(tǒng)是一個單片機發(fā)送另一個單片機接收的單向、平衡傳輸標準,具有強抗干擾能力,易于使用,易于維護,操作簡單等優(yōu)點,在現(xiàn)實生活中也擁有廣泛的應用。為了使系統(tǒng)中的多個計算機之間的數(shù)據(jù)通信都可以實現(xiàn),它們必須根據(jù)實際需要并且按照某種形式的網(wǎng)絡來進行,工程中經(jīng)常用的是使一個完整的主站發(fā)送,然后正確的從多機通信模式接收的信號,同時要防止總線上的信號沖突。 目 錄摘要 1 Abstract 2 1 引 言 3 2 系統(tǒng)總體方案確定 4 設計方案選擇 4 設計的內(nèi)容以及要求 4 設計的內(nèi)容 4 設計的要求 4 3 系統(tǒng)的組成及其工作的原理 4 系統(tǒng)的組成 5 工作原理 5 4 硬件電路方案設計 6 系統(tǒng)硬件的介紹 6 主機電路控制模塊 6 ATmega16 AVR單片機介紹 7 數(shù)據(jù)顯示模塊 8 鍵盤輸入模塊 9 通信電路模塊 9 RS485協(xié)議 10 從機控制模塊 10 單片機最小系統(tǒng) 10 5 軟件設計 12 IAR FOR AVR軟件的介紹 12 通信協(xié)議 13 串行通信協(xié)議RS232和RS485的比較 13 通信過程 13 主機程序 14 主程序總流程圖 14 鍵盤輸入的子程序 15 用數(shù)碼管顯示子程序 16 從機程序 16 從機總流程圖 16 接收并且顯示主程序 17 6 實驗調(diào)試和測試結果與分析 18 總 結 18 謝 辭 18 參 考 文 獻 20 蚌埠學院本科畢業(yè)設計(論文) 基于AVR單片機的485通信系統(tǒng)設計摘 要: 現(xiàn)在的社會是一個數(shù)字化的時代,多機通信系統(tǒng)的應用已經(jīng)廣泛滲透到人們生活的方方面面,在科學研究的軍事技術領域、文化藝術領域、工程設計領域都有它的應用。通過通訊方式交換信息、資源共享已經(jīng)成為了一種必然的趨勢。本文討論了用ATmega16 AVR單片機來控制RS485串行接口與主機系統(tǒng)進行數(shù)據(jù)交換,ATmega16為核心芯片,它與MAX485轉(zhuǎn)換器連接實現(xiàn)遠距離傳輸,同時ATmega16作為主控芯片控制按鍵電路與數(shù)據(jù)顯示電路,系統(tǒng)主要由主機控制模塊、通信模塊、數(shù)據(jù)輸入模塊、數(shù)據(jù)顯示模塊和模數(shù)轉(zhuǎn)換模塊五個部分組成,實現(xiàn)了利用RS485實現(xiàn)單片機通信,通過鍵盤實現(xiàn)從機的選擇、發(fā)送數(shù)據(jù),從機顯示發(fā)送的數(shù)據(jù)。關鍵字:多機通信、RS485接口、AVR單片機 Design of 485 Communication System based on AVR Microcontroller Abstract: Today39。s daily life. By means of munication to exchange information, share resources has bee an inevitable trend. To make the system in data munication between multiple puter are met, they must be posed according to the actual needs some form of network engineering is often used to make a plete master sends and receives signals from the muchmachine munication