摘要
本文以一主两从的多机系统为例,介绍了一种多个微控制器柔性扩展和可靠通信的方法。基于SPI接口,外加一根地址分配控制线实现了对从机的地址分配,应用软件寻址方式和自定义通信协议实现了主机对从机的数据查询和发送。实际应用表明,该方法占用较少的I/O资源、通信速率高且稳定可靠,可推广应用于其他多机系统。
Taking a multi-microcontroller system with one host microcontroller and two slave microcontrollers as example,a method of multi-microcontroller's flexible expansion and reliable communication is introduced in this paper.Based on SPI interface,the distribution of the slave address is realized with an additional address assignment control line.The dates receiving and sending between host microcontroller and slave are also realized with using the software addressing and author's communication protocol.Practice has proved that this method takes up less I/O resources,has higher communication rate and reliability communication,and can be wildly used.
出处
《自动化与信息工程》
2011年第2期39-42,共4页
Automation & Information Engineering
关键词
微控制器
SPI接口
多机通信
通信协议
Microcontroller
SPI Interface
Multi-Microcontroller Communication
Communication Protocol