摘 要在多机通信领域.由于单片机具有灵活高效的多机通信功能和价格优势,应用越来越广泛 ,但由于单片机的收发信号都是 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 pr...