【正文】
河 北大學(xué) 20xx 屆本科生學(xué)年論文(課程設(shè)計) 基于 AT89C51 的 雙機串行通信 設(shè)計 摘 要 本文 利用 ATMEL 公司的 兩片 單片機 AT89C51, 采用 RS232, 通過 KEIL 軟件 匯編 編程和 PROTUES 軟件仿真, 最終完成雙機 的串行 通信。 設(shè)計要求為:兩片單片機之間進行串行通信,發(fā)送端通過串行口 TXD 將 0~F 循環(huán)發(fā)送到接收端,完成后在接收端的 LED 燈亮。軟件部分設(shè)計:通過通信協(xié)議進行發(fā)送接收,主機收到從機的接收信號后,向從機發(fā)送 16 個數(shù)據(jù)與校驗和,從機接收數(shù)據(jù)并與校驗和比較,若相同則燈亮。 關(guān)鍵詞: AT89C51 單片機 ;匯編程序;接口技術(shù);仿真及封裝 河 北大學(xué) 20xx 屆本科生學(xué)年論文(課程設(shè)計) The design of the Dual Serial Communications system based on the AT89C51 ABSTRACT This paper uses two pieces of microcontroller AT89C51 made by ATMEL Corporation, using RS232, programming by KEIL software pilation and simulatting by PROTUES software, then carries out the final pletion of the serial munication double machine. Design requirements: serial munication between two microcontrollers, the sender sends 0 ~ F to the receiver by via serial port TXD, at the receiving end after the pletion of LED lights. Software part of the design: transmitting and receiving via the munication protocol, the host machine after receiving a signal from the slave machine ,sends 16 datas and the checksum, then the slave machine receives datas and pares with the checksum ,if the same is lights. Key words: AT89C51 sngle chip microputer。 Assemble program。 Interface technology。 Encapsulation and simulation 河北大學(xué) 20xx 屆本科生學(xué)年論文(課程設(shè)計) 目 錄 1 引言 ............................................... 1 2 總體設(shè)計 .............................................. 2 3 硬件系統(tǒng)設(shè)計 ......................................... 3 AT89C51 簡介 ....................................... 3 整體電路設(shè)計 ......................................... 4 4 軟件系統(tǒng)設(shè)計 ....................................... 5 串行通信軟件實現(xiàn) ...................................... 5 程序流程圖 ............................................ .6 源程序 ................................................. 7 系統(tǒng)調(diào)試 ...............................................10 5 設(shè)計總結(jié) ......