Ebyte ECAN-401S User Manual page 14

Table of Contents

Advertisement

Chengdu Ebyte Electronic Technology Co.,Ltd.
CAN message is converted into serial frame (transparent mode)
4.1.2 Transparent transmission with logo mode
Transparent conversion with identification is a special usage of transparent conversion. The serial frame carries the ID
information of the CAN message, and CAN messages with different IDs can be sent as needed. It is helpful for users to
construct their own network more conveniently through the module, and use self-defined application protocol. This
method automatically converts the ID information in the serial frame into the frame ID of the CAN bus. As long as the
module is told in the configuration that the ID information is at the start position and length of the serial frame, the
module extracts the frame ID and fills it in the frame ID field of the CAN message when converting, as the CAN when
the serial frame is forwarded The ID of the message. When the CAN message is converted into a serial frame, the ID of
the CAN message is also converted to the corresponding position of the serial frame.
Conversion method:
1. Convert serial frame to CAN message
The start address and length of the "frame ID" of the CAN message contained in the serial frame in the serial frame can
be set by configuration. The starting address ranges from 0 to 7, and the length ranges from 1 to 2 (standard frame) or 1
to 4 (extended frame). During the conversion, the CAN message "frame ID" in the serial frame is converted into the
frame ID field of the CAN message according to the prior configuration (if the number of frame IDs is less than the
number of frame IDs of the CAN message, then The high byte of the frame ID in the CAN message is filled with 0.),
other data is converted in order, if a CAN message has not been converted to the serial frame data, the same ID is still
used as the frame of the CAN message ID continues to convert until the serial frame conversion is completed
Note: If the ID length is greater than 2, the frame type sent by the device will be set as an extended frame. At this time,
the frame ID and frame type configured by the user are invalid and are determined by the data in the serial frame. The
frame ID range of the standard frame is: 0x000-0x7ff, which are respectively represented as frame ID1 and frame ID0,
where frame ID1 is the high byte, and the frame ID range of extended frames is: 0x00000000-0x1fffffff, which are
represented as frame ID3, frame ID2, and Frame ID1, frame ID0, among which frame ID3 is the high byte
Serial frame
0
Data 1(ID1)
1
Data 2(ID0)
2
3
4
5
6
Copyright ©2012–2022,Chengdu Ebyte Electronic Technology Co.,Ltd.
0xAB
0xCD
0xEF
0xFF
Data 3
Data 4
Data 5
Data 6
Data 7
CAN Message
Frame
User
informati
configuration
on
Data 1(ID1)
Frame ID
Data 2(ID0)
Data 3
Data 4
Data field
Data 5
Data 6
ECAN-401S User Manual
0xAB
0xCD
0xEF
0xFF
CAN Message x
User
configurati
on
Data 1(ID1)
Data 2(ID0)
Data ...
Data N-1
Data N
14

Advertisement

Table of Contents
loading

Table of Contents