当前位置:网站首页>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
边栏推荐
- R语言检验时间序列的平稳性:使用tseries包的adf.test函数实现增强的Dickey-Fuller(ADF)检验、检验时序数据是否具有均值回归特性(平稳性)、具有均值回归特性的案例
- 【随心笔记】假期快过去了,都干了点什么
- Dapr 与 NestJs ,实战编写一个 Pub & Sub 装饰器
- Transfer learning to freeze the network:
- Promise learning (1) What is Promise?how to use?How to solve callback hell?
- 博弈论(Depu)与孙子兵法(42/100)
- Envoy 源码流程图
- 千万级乘客排队系统重构&压测方案——总结篇
- 【公开课预告】:超分辨率技术在视频画质增强领域的研究与应用
- Qt get all files in a folder
猜你喜欢

xss-labs靶场挑战

How do programmers solve online problems gracefully?

2022 Go生态圈 rpc 框架 Benchmark

程序员如何优雅地解决线上问题?
![[Open class preview]: Research and application of super-resolution technology in the field of video image quality enhancement](/img/fc/cd859efa69fa7b45f173de74c04858.png)
[Open class preview]: Research and application of super-resolution technology in the field of video image quality enhancement

语音聊天app源码——语音聊天派对

数字化转型实践:世界级2B数字化营销的方法框架

博弈论(Depu)与孙子兵法(42/100)

mysql进阶(二十二)MySQL错误之Incorrect string value中文字符输入错误问题分析

CAN通信的数据帧和远程帧
随机推荐
C语言实现!20000用4秒计算
监视网络连接的ss命令
R语言检验时间序列的平稳性:使用tseries包的adf.test函数实现增强的Dickey-Fuller(ADF)检验、检验时序数据是否具有均值回归特性(平稳性)、具有均值回归特性的案例
回归预测 | MATLAB实现RNN循环神经网络多输入单输出数据预测
slice、splice、split傻傻分不清
Solve vscode input! Unable to quickly generate skeletons (three methods for the new version of vscode to quickly generate skeletons)
Aeraki Mesh became CNCF sandbox project
Generate certificates using KeyStore
【公开课预告】:超分辨率技术在视频画质增强领域的研究与应用
如何设计一个分布式 ID 发号器?
表连接详解
新书上市 |《谁在掷骰子?》在“不确定性时代”中确定前行
Several methods of appending elements are commonly used in js: append, appendTo, after, before, insertAfter, insertBefore, appendChild
JWT
redis6 跟着b站尚硅谷学习
R语言ggplot2可视化:使用ggpubr包的geom_exec函数执行geom_*函数(没有任何参数需要放置在aes中)
Golang内存分析工具gctrace和pprof实战
mysql进阶(二十二)MySQL错误之Incorrect string value中文字符输入错误问题分析
Aeraki Mesh 加入 CNCF 云原生全景图
音视频技术开发周刊 | 256