![MORNSUN TD3USPCAN Скачать руководство пользователя страница 28](http://html1.mh-extra.com/html/mornsun/td3uspcan/td3uspcan_application-notes_1834434028.webp)
第 28 页 共 60 页
Figure. 3.20 Example 1 CAN frame to SPI frame (transparent
conversion, frame information, frame ID enabled)
3.3.2 Transparent conversion with identification
Transparent conversion with identification is derived from transparent conversion, which means that the
serial frames sent or received contain valid CAN frame ID bytes. In this way, the "frame ID" in the serial frame is
automatically converted into the frame ID in the CAN frame. As long as the product is told the starting
position and length of the serial frame, the product extracts this "frame ID" during conversion and fills it in the
frame ID field of the CAN frame as the frame ID of the CAN frame when the serial frame is forwarded. When
the CAN frame is converted into a serial frame, the product converts the frame ID of the CAN frame to the
corresponding position of the serial frame and returns the frame information at the same time. In the mode of
transparent identification conversion, users CAN control the CAN frame ID of data sent by serial frames,
which is convenient for users to send CAN data with different IDs at the same node. The user CAN also obtain
the hidden CAN frame ID from the received serial frame.
1. Serial frame to CAN frame conversion( UART/SPI
→
CAN )
The "Frame ID" of the CAN frame in the serial frame, the "start address" and "length" in the serial frame
can be set by user configuration. The starting address ranges from 0 to 7, and the length ranges from 1 to 2