根据I2C总线和SPI总线协议设计并实现了一种兼容I2C和SPI总线协议的从机同步串行接口电路.基于在传感器中的应用,介绍了该接口电路的整体结构和模块划分、时序、Verilog-HDL设计与实现,并给出了整个电路的仿真结果.验证结果表明,该接口电路可以实现与主机之间基于fC总线和SPI总线的数据发送与接收,可满足物联网中传感器系统的通信需求.
A synchronous serial interface circuit of slave is designed on the basis of I2C bus and SPI bus protocol. The circuit is compatible with I2C bus and SPI bus protocol and it is focused on the application in sensor. The interface circuit' s structure and modularization, timing, Verilog - HDL de- sign and implementation are introduced in this paper. Simulation results of the circuit are also presented. Test results show the proposed interface circuit can transmit data with master through I2C and SPI bus. The circuit can meet the communication need of the sensor systems in Internet of Things.