基于MCS51的两片单片机之间的串行通信接口设计 联系客服

发布时间 : 星期三 文章基于MCS51的两片单片机之间的串行通信接口设计更新完毕开始阅读

昆 明 学 院

2013 届毕业论文(设计)

论文(设计)题目 基于MCS51的两片单片机之间的

串行通信接口设计

子课题题目

姓 名 学 号 所属院系 自动控制与机械工程学院 专业年级 10级通信技术专业 指导教师 任杰

2013年 5月

基于MCS51的两片单片机之间的串行通信接口设计

摘 要

随着电子技术的发展,单片机的应用也越来越多及越来越重要,而串行通信理论和单片机的开发相结合使电路板的线路少,成本低了,而且在远距离传输时,避免了很多条的线路特性不同而被广泛地使用。而RS232是一种比较成熟的串口,所以本次设计使用RS232串口,用串口通信时发送和接收到的每一个字符实际上都是一次一位的传送的,每一位为1或者为0。

本次设计就是要利用单片机来完成一个系统,实现两单片机之间的串行通信。并且使用DS18B20温度传感器,由一台单片机测量温度后传到另外一台单片机上显示。 串口通讯是单片机的一个重要应用,它既可以实现单片机对计算机的数据传输,同时计算机也可以对单片机进行控制。在本次设计中 ,我需要克服的问题有怎样把两串口与单片机连接和设置传输的格式,和怎样采集温度,怎样显示等问题,总之,在本次设计中我需要对单片机有一定的基础,同时数电和模电也需要好好温习下。对于画设计的系统电路图有很大的帮助。而且我希望通过本次设计,可以很好的学习单片机,同时喜欢上单片机的设计。其中单片机中,MCS51单片机上的通用异步接收/发送器UART,通过RXD和TXD可与部电路进行串行异步通信,数据的发送由TXD端送出,数据的接收由RXD端输入。

关键词:串行通信 RS-232串口 波特率

基于MCS51的两片单片机之间的串行通信接口设计

Abstract

MCU serial communication is a important application. In communication field, there are two types of data communication mode: parallel communication and serial communication. With the development of computer network and hierarchical distributed microcomputer application system, the function of the communication is more and more important. Communication refers to computer information transmission to the outside world, both transmission between the computer and the computer,Also includes the computer and external device, such as terminals, printers, and transmission between devices such as disk. Serial communication refers to using a data line, to transmit data a bit a ground in turn, each data holds a fixed length of time. Its just a few lines can exchange information between the systems, especially used in computer and computer, computer and remote communication between the peripherals. When using a serial port communication sending and receiving to each and every one of the characters are in fact a a delivery, each one is or is zero.

This design is to use single chip microcomputer to complete a system, realize the serial communication between the two MCU. And USES DS18B20 temperature sensor, temperature is measured by a single-chip computer and send to other displayed on a single chip microcomputer. For single chip microcomputer serial port communication is of great significance, not only can realize the MCU data transmission to the computer side, but also can realize the computer control of the microcontroller. Due to its less cable, wiring simple, so in the long distance transmission, has been widely used, MCS - 51 series microcontroller with a universal asynchronous receiver/transmitter UART, RXD by pin [P3. O] and TXD [P3.1] with external sound circuit B full duplex serial asynchronous communication, send data sent by the TXD end, when receiving data from the RXD input.

Keywords: serial communications RS - 232 serial port baud rate