CAN总线位定时和同步的研究与设计

2010-05-13 08:46:00单琳娜,徐斌山,陈文平
现代电子技术 2009年12期

单琳娜,徐斌山,陈文平

摘 要:在CAN规范中,位定时和同步机制是既重要又难于理解的环节之一,它不仅关系到对规范其他相关内容的理解,甚至能对节点开发的成功与否产生直接的影响。因此介绍了位时间(周期)的组成与结构,总结并归纳位定时的作用;在此基础上,给出硬同步和重同步的定义,重点分析硬同步和重同步的机理,并给出它们相应的图解,形象而又清晰地表明其本质;以独立CAN控制器为例,详细说明在一般开发和工程实际中,位定时参数设置和计算的一般方法及步骤。

关键词:位定时;硬同步;重同步;参数

中图分类号:TP3344文献标识码:B

文章编号:1004-373X(2009)12-142-04

Research and Design on CANbus Bit Time and Synchronization

SHAN Linna,XU Binshan,CHEN Wenping

(College of Information and Electronic Technology,Jiamusi University,Jiamusi,154007,China)

Abstract:In the CANbus norm,bit time and synchronous mechanism is one of the link that is important and difficult to understand,it not only relates to norm the comprehension of other related content,even to influence direct the success or a case of crabs of node development.The constitute and structure of the bit time(period) is introduced,the function of bit time is tallied up and induced.The definition of hard and repetition synchronous is presented on the foundation,the mechanism of hard and repetition synchronous is analyzed,the correspondence diagram is presented,the hypostases is indicated vividly and clear.As an example with independent CANbus controller,the general method and step of bit time are elaborated in the general development and the engineering practice.

Keywords:bit time;hard synchronous;repetition synchronous;parameter

0 引 言

控制器局域网CAN是一种用于连接汽车和工业场合中电子控制模块、传感器和执行器的串行、多主通信规范[1,2]。由于CAN总线具有很强的纠错能力、支持差分收发、传输距离远等特点,因此CAN总线用途非常广泛,现已成为工业数据通信领域的主流技术、基础技术,目前比较流行的TTCan,DeviceNet,CANOpen,SAE J1939等规范均是以CAN为基础的,因此对CAN总线的深入研究是十分必要的。在CAN规范中,位定时和同步机制是既重要又难于理解的环节之一,它不仅关系到对波特率、总线长度等相关内容的理解,甚至对节点开发的成功与否产生直接的影响。然而,目前相关文献均缺乏针对CAN总线位定时和同步机制的详细分析和探讨。在此以CAN技术规范为基础,深入分析CAN总线的位定时和同步机制,给出硬同步和重同步的定义,并给出相应的图解解释方式,对位时间的组成与结构、同步的发生时刻、同步是如何进行的等关键内容给出了明确而又具体的分析。……

登录APP查看全文