摘要
SPI(SerialPeripheralInterface—串行外设接口)总线系统是一种同步串行外设接口,它可以使MCU与各种外围设备以串行方式进行通信以交换信息。在某些情况下,由于高速处理器的SPI设置的最低波特率往往也要高于SPI外围芯片可识别的最高速率,因此常出现数据接收不正常,错误率高的现象,本文拟通过对外围通用端口的软件模拟,从而达到处理器和SPI接口芯片的正常通讯,并且加入了对CAN控制卡(基于SPI端口通讯)的硬件和软件设计,并给出相关驱动程序。这种设计可广泛应用于汽车电子工业现场的手持设备等领域。
SPI (Serial Peripheral Interface), a kind of synchronous serial interfaces, is widely used to communicate between MCU (Micro Chip Unit) and peripheral device, However, in case of processor's high clock frequency, some SPI-Interface peripheral device can't work well with it, which result in transporting or receiving abnormally, getting the invalid byte, and so on. This paper will bring forward a solution based on software simulated SPI, which can ensure the quality of communication. The SPI interface in this paper is used to communicate between the CAN controller and AR.M9 core chip, also given the hardware design and the driver based on WINCE system. This system can be widely used in the field of auto-electronic, industry handhold device and so on.
出处
《机电产品开发与创新》
2006年第6期131-133,共3页
Development & Innovation of Machinery & Electrical Products
基金
河北省自然科学基金攻关培育计划资助(E2006000030)