Can communication protocol

Source: Internet
Author: User
Tags ack

Marine Engine monitoring System Why use can bus communication protocol?

    • The Controller local Area network (CAN) has the high secrecy, the effective support distributed control or the real-time control serial communication network;
    • High speed, can bit rate of up to 1Mbps (40m);
    • Cheap, multi-use and transportation vehicles, engine control components, etc.;
    • With the linear bus structure, each subsystem has the same right and multi-master working mode to the bus. Any node can send information to other nodes on the network at any time, regardless of the master/slave;
    • The sending information is divided into different priority, using non-destructive bus adjudication technology, when two nodes transmit information to the network at the same time, the priority is low to stop sending the data, and the high priority node is not affected by the continuation of the data transmission;
    • The unit connected to the bus does not have information similar to "address", so when the unit is added on the bus, the hardware, software and application layer of other units connected to the bus do not need to change, and the node filters the received information according to the filter;
    • Has the function of error checking, false notification and error recovery;
    • Has a point-to-point, point-to-multipoint, global broadcast receive the ability to transmit data.

Basic knowledge of CAN bus:

    • Bus state bus has "dominant" and "recessive" two states, "dominant" corresponds to logic "0", "recessive" corresponds to Logic "1". "Dominant" state and "recessive" state and the result is "dominant" state, so two nodes simultaneously send "0" and "1", the bus renders "0". That is, the dominant level on the bus has priority, only the hidden level of all the units output, the bus is hidden level. In addition, at the start and end of the can bus there is a 120 ohm termination resistor to match the impedance to reduce the echo.
    • The can protocol is performed through the following 5 types of frames:
      Data frame
      Remote Frames
      Error frame
      Overload frame
      Interval Frames

Can message sending priority choice:

    • The CAN bus transmits data in a packet, the priority of the message is combined with a 11-bit identifier, and the identifier with the lowest binary number has the highest priority. This priority can no longer be changed once it has been established in the system design. Conflicts in bus reads can be resolved by a bit quorum. As shown in 2, when several stations simultaneously send the message, the message identifier of Station 1 is 011111, the message identifier of Station 2 is 0100110, and the message identifier of Station 3 is 0100111. All identifiers have the same two-bit 01, and until the 3rd bit is compared, the message of Station 1 is discarded because its 3rd bit is high, while the other two stations have a low 3rd-bit message. Station 2 and Station 3 messages 4, 5, 6 bit the same, until the 7th place, Station 3 of the Wencai was lost. Note that the signal in the bus keeps track of the message of the station that finally gets the bus read right. In this example, the message of station 2 is tracked. The advantage of this non-destructive bit quorum method is that the initial portion of the message has been transmitted over the network before the network finally determines which station's message is being transmitted. All stations that do not have the bus read right become the receiving station with the highest priority message and do not send the paper before the bus is idle again.

Can data frame composition:

    • (1) frame start. Represents the beginning of the segment frame where the data is open.
      (2) Arbitration section. Represents the frame priority of the quorum segment.
      (3) Control section. Represents the byte of data and the reserved bit control segment.
      (4) Data segment. The contents of the data, one frame can send 0~8 bytes of data segment.
      (5) CRC section. Check the transmission error segment of the frame.
      (6) ACK segment. Indicates a segment that confirms normal reception.
      (7) End of frame. Represents the end of the Zhi of the data.

    • The data frame is composed as shown in Figure D for the dominant level, and r for the dominant level.

    • The answer field (ACK) includes the answer bit and the answer delimiter. The two bits sent by the sending station are all recessive levels (logic 1), at which point the receiving station sends the main control level (logic 0) to cover it properly. In this way, the sending station can ensure that at least one station in the network can correctly receive the message the remote frame consists of 6 fields: Frame Initiation, arbitration field, control field, CRC field, answering field and frame end. There is no data field in the remote frame. The RTR bit of the remote frame must be an implicit bit. The data value of the DLC is independent, it can be any number in the 0~8, and the data length of the corresponding data frame.










Can communication protocol

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.