摘要
分析了L IN总线协议的特点、报文帧结构及校验方法,以V isua l C++6.0为开发平台,利用W indow s AP I函数通过PC机的RS232口实现了基于L IN总线协议的串口通信.给出了实现的部分流程图及代码,在通信过程中选择简便的奇偶校验及和校验进行差错校验,保证了数据的无差错传输.
The LIN bus protocol characteristics , the message frame's construction and correspondence method is analysed in this paper. Base on machine of PC's serial port RS232 respectively, Windows API function is used to realization communications with PC to PC on Visual C^++ 6.0, part of the flow chart and code included. On the process of communications, parity and sum check is used to check the result, and the accurate communication of data is realized.
出处
《中南民族大学学报(自然科学版)》
CAS
2006年第1期65-68,共4页
Journal of South-Central University for Nationalities:Natural Science Edition
基金
国家民委科研基金资助项目(05ZN03)
武汉化工学院等离子体化学与新材料重点实验室开放课题基金资助项目(PCAM0503)