Media Access Control Layer in CAN Bus Protocol

Source: Internet
Author: User

When talking about protocols, many people always think about networks and computers first. Indeed, computers and networks are large users of Protocols. However, with the constant development of electronic technology, more and more fields are beginning to use electronic devices that are almost as intelligent as computers, which also involve Protocol issues. Now we will introduce the CAN bus protocol. CAN bus was originally designed for the monitoring and control of the automotive industry by BOSCH in Germany. It has been applied to railways, transportation, National Defense, engineering, industrial machinery, textiles, agricultural machinery, numerical control, medical equipment robots, buildings, and security. Now let's take a look at the relevant agreement issues.

CAN bus protocol

Some concepts and features of the Media Access Control Sub-layer of the CAN bus protocol are described as follows:

(1) messages on the Message bus are sent in different Message formats, but the length is limited. When the bus is idle, any node on the network can send packets.

(2) Information Routing (Information Routing) in CAN, the node does not use any message about the system configuration, such as the station address. The receiving node determines whether to receive the message based on its own characteristics. Therefore, you do not need to change the software and hardware of the application layer and any node during system expansion. You CAN directly add nodes to the CAN.

(3) Identifier the packet to be transmitted has a feature Identifier (a domain of a data frame and a remote frame). It does not provide the destination node address, but the characteristics of the packet. Information is sent over the network in broadcast mode, and can be received by all nodes. The node uses the identifier to determine whether to receive the frame information.
 
(4) data consistency should ensure that packets are received by all nodes at the same time or are not received at the same time in the CAN, which is achieved through the error processing and re-synchronization functions.

(5) The bit transfer rate varies with the CAN system, but in a given system, the bit transfer rate is unique and fixed.

(6) priority: the identifier in the sent message determines the priority of the message occupying the bus. The smaller the identifier, the higher the priority.

(7) the Remote Data Request sends a Remote frame, and the node that needs the Data requests the other node to send the corresponding Data. The data frame transmitted by the response node and the remote frame of the request data are named by the same identifier.

(8) As long as the bus is idle, any node can send messages to the bus. If two or more nodes send packets at the same time, it will cause a bus access collision. This collision can be solved by using the bitwise arbitration of identifiers. The arbitration mechanism ensures that neither the message nor the time are lost. When a data frame with the same identifier and a remote frame are sent at the same time, the data frame takes precedence over the remote frame. During the arbitration period, each transmitter compares the send bit level with the monitored bus level. If the level is the same, the Unit can continue sending. If the "recessive" level is sent and the "dominant" level is monitored, the Unit loses arbitration, you must exit the sending status.

(9) bus status bus have two states: "dominant" and "recessive". "dominant" corresponds to the logic "0" and "recessive" corresponds to the logic "1 ". The "Explicit" status and "recessive" status are the "dominant" status. Therefore, when both nodes send "0" and "1" at the same time, the bus displays "0 ". The CAN Bus uses binary non-zero (NRZ) encoding, so the bus is neither "0" nor "1 ". However, the CAN bus protocol does not specifically define the implementation methods of these two States, as shown in 7-7.

10) fault definition (Confinement) CAN be used to distinguish between faults caused by Transient Disturbance and permanent faults. The faulty node is disabled.

(11) the receiving node responds to the correctly received packets and marks inconsistent packets.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.