当前位置:网站首页>The CAN communication standard frame and extended frame is introduced
The CAN communication standard frame and extended frame is introduced
2022-08-01 11:33:00 【passing bear~】
Introduction
The CAN interface is compliant with specifications 2.0A and 2.0B (active) with bit rates up to 1 Mbit/s.It can receive and transmit standard frames with 11-bit identifiers and extended frames with 29-bit identifiers.
The difference between standard and extended frames is:
1. The arbitration field of Extended frame has 29 bits, and 2^29 messages can appear, and there is a gap on the data link (transparent to the operator), and the frame IDThe range is 0000 0000-1FFF FFFF.(PS: The purpose is to construct a 29-bit CAN ID, which can achieve a larger ID group, and mother no longer has to worry about insufficient IDs!)
Second, the arbitration field of standard frame is continuousThe 11 bits of the frame can appear 2^11 kinds of messages, that is, the frame ID range is 000-7FF;
3. The DLC (data length) in the control frame is exactly the same, but reservedDifferent bits, standard frames IDE, R0, extended frames R1, R0, must be sent at a dominant level (operated by the data link layer), transparent to the programmer;
4. Summary:Everything else is exactly the same, so in fact, the CAN standard frame and the extended frame are only different in the length of the frame ID, so as to expand more CAN nodes and better support the upper layer protocol.
Note: The frame ID here does not indicate the destination address, but the priority of the message accessing the bus (the smaller the frame ID value, the higher the priority, the minimum is 0x00000000).
Standard frame: (0x12)
Extended frame: (0x1314)
CAN standard frame format
CAN standard frame information is 11 bytes (3 + 8), including two parts: information and data parts.The first 3 bytes are the information part.
Byte 1 is frame information.The 7th bit (FF) represents the frame format, in the standard frame, FF=0; the 6th bit (RTR) represents the frame type, RTR=0 represents the data frame, RTR=1 represents the remote frame; DLC represents the data frameThe actual data length of the frame.
Bytes 2 and 3 are the message identification code, 11 bits are valid.
Bytes 4 to 11 are the actual data of the data frame, and are invalid for remote frames.
CAN Extended Frame Format
CAN extended frame information is 13 bytes (5 + 8), including two parts, information and data parts.The first 5 bytes are the information part
Byte 1 is frame information.The 7th bit (FF) represents the frame format, in the extended frame, FF=1; the 6th bit (RTR) represents the frame type, RTR=0 represents the data frame, RTR=1 represents the remote frame; DLC represents the data frameThe actual data length of the frame.
Bytes 2 to 5 are the message identification code, and the upper 29 bits are valid.
The actual data of the data frame in bytes 6~13, invalid in remote frame
Replenishing knowledge
One of the biggest features of the CAN protocol is that the traditional station address encoding is abolished, and the communication data block is encoded instead.The advantage of this method is that the number of nodes in the network is theoretically unlimited.The above different data blocks, this way of coding according to data blocks, can also enable different nodes to receive the same data at the same time, which is very useful in a distributed control system.The length of the data segment is up to 8 bytes, which can meet the general requirements of control commands, working status and test data in common industrial fields.
At the same time, 8 bytes will not occupy the bus for too long, thus ensuring the real-time communication.CAN protocol adopts CRC check and can provide corresponding error handling function, which ensures the reliability of data communication.CAN's excellent characteristics, high reliability and unique design are especially suitable for the interconnection of industrial process monitoring equipment. Therefore, CAN has been paid more and more attention by the industry and has been recognized as one of the most promising field buses.
Appendix:
The latest download address of the above CANTest software: https://www.zlg.cn/Index/Search/search?selc=all&key=cantest
The CAN box needs to be configured to use
边栏推荐
- Flutter Widget 如何启用和屏蔽点击事件
- shell--面试题
- R语言检验时间序列的平稳性:使用tseries包的adf.test函数实现增强的Dickey-Fuller(ADF)检验、检验时序数据是否具有均值回归特性(平稳性)、具有均值回归特性的案例
- How to use DevExpress controls to draw flowcharts?After reading this article, you will understand!
- Sparse representation - study notes
- C#/VB.NET 将PPT或PPTX转换为图像
- slice、splice、split傻傻分不清
- R语言ggplot2可视化:使用ggpubr包的geom_exec函数执行geom_*函数(没有任何参数需要放置在aes中)
- 一篇文章,带你详细了解华为认证体系证书(1)
- 分类预测 | MATLAB实现1-DCNN一维卷积神经网络分类预测
猜你喜欢

.NET analyzes the LINQ framework in depth (three: the elegant prelude of LINQ)

xss-labs靶场挑战

2022 Go生态圈 rpc 框架 Benchmark

CAN通信标准帧和扩展帧介绍

利用正则表达式的回溯实现绕过

Promise学习(三)Promise的几个关键性问题 -- 状态改变、执行顺序与机制、多任务串联、异常穿透、中断promise链

leetcode/submatrix element sum

Mini Program Graduation Works WeChat Food Recipes Mini Program Graduation Design Finished Products (2) Mini Program Functions

Promise to learn several key questions (3) the Promise - state change, execution sequence and mechanism, multitasking series, abnormal penetration, interrupt the chain of Promise

冰冰学习笔记:gcc、gdb等工具的使用
随机推荐
Promise学习(三)Promise的几个关键性问题 -- 状态改变、执行顺序与机制、多任务串联、异常穿透、中断promise链
Pytest e-commerce project combat (below)
表达式引擎在转转平台的实践
【公开课预告】:超分辨率技术在视频画质增强领域的研究与应用
For small applications, which database is better to use?
迁移学习冻结网络的方法:
Kaitian aPaaS mobile phone number empty number detection [Kaitian aPaaS battle]
[Open class preview]: Research and application of super-resolution technology in the field of video quality enhancement
Small application project works WeChat gourmet recipes applet graduation design of finished product (1) the development profile
Istio Meetup China:全栈服务网格 - Aeraki 助你在 Istio 服务网格中管理任何七层流量
How to find out hidden computer software (how to clean up the computer software hidden)
Promise learning (1) What is Promise?how to use?How to solve callback hell?
Pve delete virtual machine "for a collection"
R语言诊断ARIMA模型:forecast包构建了一个ARIMA模型、使用checkresiduals函数诊断ARIMA模型、并进行结果解读(拟合较差的ARIMA模型具有的特点)
Excel表格打印时不打印标记填充颜色
Promise to learn several key questions (3) the Promise - state change, execution sequence and mechanism, multitasking series, abnormal penetration, interrupt the chain of Promise
腾讯云原生:Areaki Mesh 在 2022 冬奥会视频直播应用中的服务网格实践
bat倒计时代码
正则表达式
每日一题:连续子数组的最大和(动态规划)