摘要
在LIN总线的应用中,由于MCU串口被LIN总线通信所占用,从而使得PC机与目标机之间的通信缺少串行口。因此,介绍一种用普通I/O口模拟串口实现PC机与目标机之间通信的方法,并将其成功地应用于基于LIN总线的汽车车身控制系统中。详细阐述了普通I/O口模拟串口实现上位机通信的难点分析及解决办法,并给出详细的软件设计方案。在实际的工程应用中,巧妙地利用汇编语言高效的特点,可以写出准确的延时函数,并配合一些技巧性的处理,实现通信的准确无误。同时给出了一种数据帧格式定义的策略,具有很强的实际应用价值。
In the application of LIN Bus, because the serial port is taken by the UN Bus communication, the communication between PC and the target circuit board lacks of serial port. An efficient method of using single-chip processor common I/O port to simulate serial communication to realize the communication between PC and the target circuit board is introduced. And this method is successfully applied in the automotive body s controlling system based on LIN Bus.The difficulty and solution of using common I/O port t...
出处
《控制工程》
CSCD
2008年第S2期141-143,164,共4页
Control Engineering of China
基金
国家863基金资助项目(2007AA041403
2006AA040308)
上海启明星计划基金资助项目(07QA14030)
关键词
汽车电子
LIN总线
串行通信
普通I/O口
上位机
automotive electronics
UN Bus
serial communication
common I/O port
upper computer