×

基于SPI互连的多串口系统

消耗积分:5 | 格式:rar | 大小:888 | 2010-12-10

李勇

分享资料个

 针对个人计算机只有1~2个串口,给同时连接多个串口设备进行联合测量带来的不便,提出了一种由多个单片机基于高速同步串行接口(SPI)互连的串口扩展方法。采用此方法所建的系统只需占用1个现有的串口或USB口,就可连接3个以上的串口设备。该系统由多个STC12C5410AD单片机构成主体,该型号单片机同时具有UART和SPI。系统中的单片机以“单主—多从”结构进行SPI总线互连,主机与从机通过SPI方式交换信息和数据,每个从机的串口可以连接1个外部串口设备并交换数据,同时主机的串口可与上位计算机相连,从而实现上位计算机通过该系统与多个下位串口设备交换数据。系统中,主机和从机都开辟有一定的数据缓存区,并且使主机的数据吞吐率高于从机的总和。此外,还介绍了数据交换协议、存储器的组织、软件结构等。
Abstract:
 Personal computer only has 1 or 2 serial ports, which causes inconvenience when multiple serial devices are required to communicate with the computer at the same time. Aiming at this problem, a new method of serial port expansion based on SPI had been proposed. The multi-serial-port system which used the new method only took a serial or USB port available, and can connect three or more serial devices. The main body of this system consisted of multiple single chip processors STC12C5410AD which had both UART and SPI. Those processors in this system communicated in“single master- more slaves” mode, and the master exchanged the information and data with the slave by SPI. Every slave chip can connect to a serial device, and the master chip connected with the host computer’s serial port. Thus, the data can be transferred from computer to serial devices or reverse through this multi-serial-port system. The master and the slave have some data buffers, and the data throughput of master is larger than that of all of the slaves. In addition, and the protocol of data exchange, memory organization, and the software structure are also described in this article.

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

评论(0)
发评论

下载排行榜

全部0条评论

快来发表一下你的评论吧 !