摘要
IIC总线设计自其诞生以来,由于其结构简单、连线少,被广泛运用于设备间的通信。针对现有的IIC驱动算法存在程序结构上的不足,无法胜任一些对时间控制精度较高的多任务工作的现状,该文设计了基于状态机原理的IIC驱动算法,该算法利用状态转换实现前台接收、后台处理,提高软件运行效率,完成IIC通信,且不影响系统别的程式的运行。
The IIC bus design,due to its simple structure and few connections,is widely used in the communication between devices since it was invented.The existing IIC driver algorithm has the deficiency of program structure,which is not competent for some multi-task work with high precision of time control.In this paper,we design the IIC driver algorithm which is based on state machines.This driver algorithm uses state transition to realize receiving frontend and processing background,this can improve the efficiency of the software,to complete IIC communication.It does not affect other programs in the system.
作者
郑安迪
林伟敏
富雅琼
ZHENG Andi;LIN Weimin;FU Yaqiong(College of Mechanical and Electrical Engineering,China Jiliang University,Hangzhou,Zhejiang Province,310018 China)
出处
《科技资讯》
2020年第21期1-3,6,共4页
Science & Technology Information
基金
中国计量大学开放实验项目《多通道温湿度气压检测记录仪》(项目编号:XL2019011)
中国计量大学教改项目《面向解决“复杂工程问题”能力培养的实践教学模式探索》(项目编号:HEX2018003)。
关键词
状态机
IIC通信
驱动算法
分时操作
State machine
IIC communication
Driving algorithm
Time-sharing operation