摘 要在多机通信领域.因为单片机含有灵活高效多机通信功效和价格优势,应用越来越广泛,但因为单片机收发信号全部是 TTI 电平,驱动能力和抗干扰性有限,有用中常配合其它总线实现互联,RS-485 总线就是其中之一。RS-485 总线是平衡差分传输,抗干扰性好,最远可传输 4000 m,可互联多达 128 个单片机,很适台组成多机通信系统。在多机通信中,最关键是确保通信有条不紊地进行,所以需要严格通信协议和完善通信软件,本文将关键介绍应用于某大型工程单片机多机通信协议和通信软件设计方法。本文介绍一个利用单片机本身所提供串行通讯口,实行自定义串行通信协议,加上总线驱动器如 MAX481、MAX483、MAX485、MAX487 等组合成简单 RS-485 通讯网络,完成单片机间多机通讯。 关键词: 单片机;串行通信;RS-485 总线: 多机通信协议 AbstractIn computer communication field. Because of the single chip microcomputer has flexible and efficient computer communication function and price advantage, used more and more widely, but because of the single chip microcomputer to send and receive signals are TTI level, drive and anti-interference ability is limited, practical cooperation with other bus realize in Internet, RS-485 bus is one of them. RS-485 bus is a balanced differential transmission, anti-jamming of the good and as far as 4000 m could be transmitted, interconnected as many as 128 single chip microcomputer, very comfortable a composition computer communication system. In computer communication, the most important is to ensure that communications in an orderly way, and therefore need to strict communication protocol and perfect communication software, this paper will focus on introduces applied in a large project single-chip computer communication association Put the communication software design method. This paper introduces a microcontroller itself provide the serial communication mouth, use custom serial communication protocol, plus the bus drive...