Chengdu Ebyte Electronic Technology Co.,Ltd.
ECAN-401 User Manual
Copyright ©2012–2022
,
Chengdu Ebyte Electronic Technology Co.,Ltd.
17
on
1Byte
4Byte
8Byte
The frame information is shown in Table 1.1
The length of the frame ID is 4 bytes, the standard frame valid bit is 11 bits, and the extended frame valid bit is 29 bits.
Extended frame ID number
0x12345678
Standard frame ID number
0x3FF
0x12
0x34
0x56
0x78
0x00
0x00
0x03
0xFF
1. Convert serial frame to CAN message
In the process of converting a serial frame to a CAN message, in a serial data frame aligned with a fixed byte (13 bytes),
if the data format of a certain fixed byte is not standard, the fixed byte length will not be converted. Then convert the
following data. If you find that some CAN messages are missing after conversion, please check whether the fixed byte
length serial data format of the corresponding message does not conform to the standard format.
2. Convert serial frame to CAN message
When the frame data is converted in CAN format, the length is fixed to 8 bytes. The effective length is determined by the
value of DLC3~DLC0. When the effective data is less than the fixed length, it needs to be filled with 0 to the fixed
length.
In this mode, it is necessary to pay attention to the serial data format in strict accordance with the fixed byte format to
successfully convert. The CAN mode conversion can refer to the example (CAN format conversion standard frame
example). When converting, first ensure that the frame information is correct and the data length indicates No errors,
otherwise no conversion will be performed.
Conversion example:
Serial frame to CAN message (protocol mode).
CAN configuration parameters configured in this example. Conversion mode: protocol mode, frame type: extended
frame, conversion direction: two-way. Frame ID: No need to configure, the data before and after conversion is as follows.
Serial frame
CAN Message
88
Frame
information
88
17
Frame ID
17
65
65
43
43
21
21
99
Data field
99
88
88
77
77
66
66
55
55
44
44
33
33
22
22
Serial frame to CAN message (protocol mode)