仪表技术与传感器
儀錶技術與傳感器
의표기술여전감기
INSTRUMENT TECHNIQUE AND SENSOR
2010年
1期
55-57
,共3页
单片机%多机通信%SPI总线%控制算法
單片機%多機通信%SPI總線%控製算法
단편궤%다궤통신%SPI총선%공제산법
singlechip%multi-computer communication%SPI bus%control algorithm
介绍了一种采用3个单片机组成的混合型网络多机通信系统.通过自定义的VendorCmnd描述符和从属FIFO实现了USB双向数据传输,利用SPI主从通信方式实现了两片PIC16F877A单片机双向串行通信.在硬件和软件上给出了抗强电磁干扰的若干方法,并提出了一种SPI通信控制算法,确保了SPI总线板间通信的实现.实际应用表明,该系统运行稳定可靠,实时性好.
介紹瞭一種採用3箇單片機組成的混閤型網絡多機通信繫統.通過自定義的VendorCmnd描述符和從屬FIFO實現瞭USB雙嚮數據傳輸,利用SPI主從通信方式實現瞭兩片PIC16F877A單片機雙嚮串行通信.在硬件和軟件上給齣瞭抗彊電磁榦擾的若榦方法,併提齣瞭一種SPI通信控製算法,確保瞭SPI總線闆間通信的實現.實際應用錶明,該繫統運行穩定可靠,實時性好.
개소료일충채용3개단편궤조성적혼합형망락다궤통신계통.통과자정의적VendorCmnd묘술부화종속FIFO실현료USB쌍향수거전수,이용SPI주종통신방식실현료량편PIC16F877A단편궤쌍향천행통신.재경건화연건상급출료항강전자간우적약간방법,병제출료일충SPI통신공제산법,학보료SPI총선판간통신적실현.실제응용표명,해계통운행은정가고,실시성호.
This paper introduced a hybrid-type network multi-singlechip communication system based on three singlechips. It implemented USB bidirectional transmission and two PIC16F877A singlechips' bidirectional serial communication via SPI. It discussed some methods for the resistance of Electro and Magnetic disturb and offer a SPI communication control arithmetic which satisfies SPI communication among boards. Practical application indicates this system is steady, and has a good real-time quality.