摘要
通过介绍SPI总线的特点与优势,运用软件模拟SPI总线时序与SPI接口相结合的方法,实现宏晶STC89C系列单片机与STC12C系列单片机的高速通信,并给出SPI的接口电路与软件流程及交换协议的定义,从而实现系统485串口、RAM等资源的扩展,并应用在联合收割机脱粒滚筒监控系统的MODBUS协议上。设计完成后经测试证明,该方案完全满足SPI协议串行数据高速传输的要求,简化系统结构,分散单片机工作任务,增强系统实时性和可靠性。
This article introduces the SPI bus characteristic and the superiority,using the software simulation SPI bus and SPI interface combined method realizes the HongJing STC89C series MCU and the STC12C series MCU's high-speed communication,gives the SPI interface circuit,the software flow and the swap agreement definition,and thus has realized system resources expansion of 485 serial ports,RAM and so on,using in combine shelling cylinder monitoring system's MODBUS protocol.After the design completing,the test proves that this plan satisfies the SPI agreement serial data high speed transmission request completely,simplifies the system structure,disperses MCU work mission,and enhances system's timeliness and the reliability.
出处
《中国农机化》
北大核心
2012年第1期155-158,共4页
Chinese Agricul Tural Mechanization
基金
国家油菜产业技术体系建设收获机械岗位专家基金(nycytx-00519)
2011年中国农业科学院基本科研项目(0032011030)