可以创建自己的网络入门
CAN是一种易于实现的灵活网络。如果您正在考虑为下一个嵌入式设计设计网络拓扑,本文将为您提供正确的路径。
可广泛应用于汽车和卡车,可在多种应用场合发现。有许多“供能”应用层,如ISO 15765(辆),J1939(卡车),和CANopen(工厂自动化),但它是开发自己的协议用来简化你的需求很容易。现代收发器可以提供稳定可靠的物理环境,而不需要昂贵的同轴电缆。多年来,神秘的大部分都消失了。有很多例子可以提供软件帮助您快速开发自己的网络。
can控制器是一个复杂的设备。几乎所有下面描述的can协议的特性都由控制器自动处理,几乎不受主机处理器的干预。所有您需要做的是配置控制器,通过写入其寄存器,向控制器写入数据,然后控制器负责所有的内务处理工作,以便在总线上获取消息。
控制器还将读取总线上发现的任何帧,并将它们保存在一个小FIFO存储器中。它会通知主机处理器,这些数据是可用的,然后从控制器读取。控制器还包含一个硬件过滤器机制,可以编程忽略您不希望传递给处理器的CAN帧。

For the purposes of this article; we will assume a CAN network consists of the physical layer (the voltages and the wires) and a frame consisting of an ID and a varying number of data bytes. CAN has the following general attributes:
11- or 29-bit ID and from zero to eight data bytes. These can be dynamically changed “on the fly.”
Peer-to-Peer network. Every node can see all messages from all other nodes. A node cannot read its own messages.
Nodes are easy to add. Attach one to the network with two wires plus a ground.
Higher priority messages are sent first depending on the value of the ID. A lower ID has the highest priority.
Automatic retransmission of defective frames. A node will “bus-off” if it causes too many errors.
Speeds from approximately 10 Kbps to 1 Mbps. All nodes must operate at the same frequency.
The twisted differential pair provides excellent noise immunity and some decent bus fault protection.
The CAN system will work with the ground connection at different DC levels or no ground at all.
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
全部0条评论
快来发表一下你的评论吧 !