CAN stands for Controller Area Network protocol. It is a protocol that was developed by Robert Bosch in around 1986. The CAN protocol is a standard designed to allow the microcontroller and other devices to communicate with can u freeze rice other without any host computer.
The feature that makes the CAN protocol unique among other communication protocols is the broadcast type of bus. The need for a centralized standard communication protocol came because of the increase in the number of electronic devices. For example, there can be more than 7 TCU for various subsystems such as dashboard, transmission control, engine control unit, and many more in a modern vehicle. If all the nodes are connected one-to-one, then the speed of the communication would be very high, but the complexity and cost of the wires would be very high. Applications of CAN protocol Initially, CAN protocol was designed to target the communication issue that occurs within the vehicles. But later on, due to the features it offers, it is used in various other fields. CAN layered architecture As we know that the OSI model partitions the communication system into 7 different layers.
But the CAN layered architecture consists of two layers, i. Data-link layer: This layer is responsible for node to node data transfer. It allows you to establish and terminate the connection. It defines how devices in a network gain access to the medium.
LLC: LLC stands for Logical link control. It is responsible for frame acceptance filtering, overload notification, and recovery management. Physical layer: The physical layer is responsible for the transmission of raw data. It defines the specifications for the parameters such as voltage level, timing, data rates, and connector. CAN specifications define CAN protocol and CAN physical layer, which are defined in the CAN standard ISO 11898. ISO 11898-1: This part contains the specification of the Data-link layer and physical signal link. ISO 11898-2: This part comes under CAN physical layer for high speed CAN.
The high- speed CAN allows data rate upto 1 Mbps used in the power train and the charges area of the vehicle. ISO 11898-3: This part also comes under CAN physical layer for low-speed CAN. It allows data rate upto 125 kbps, and the low speed CAN is used where the speed of communication is not a critical factor. CiA DS-102: The full form of CiA is CAN in Automation, which defines the specifications for the CAN connector. As far as the implementation is concerned, the CAN controller and CAN transceiver are implemented in the software with the help of the application, operating system, and network management functions. CAN Framing Let’s understand the structure of the CAN frame. SOF: SOF stands for the start of frame, which indicates that the new frame is entered in a network.
Identifier: A standard data format defined under the CAN 2. 0 A specification uses an 11-bit message identifier for arbitration. Basically, this message identifier sets the priority of the data frame. RTR: RTR stands for Remote Transmission Request, which defines the frame type, whether it is a data frame or a remote frame. Control field: It has user-defined functions. IDE: An IDE bit in a control field stands for identifier extension. A dominant IDE bit defines the 11-bit standard identifier, whereas recessive IDE bit defines the 29-bit extended identifier.
DLC: DLC stands for Data Length Code, which defines the data length in a data field. Data field: The data field can contain upto 8 bytes. CRC field: The data frame also contains a cyclic redundancy check field of 15 bit, which is used to detect the corruption if it occurs during the transmission time. The sender will compute the CRC before sending the data frame, and the receiver also computes the CRC and then compares the computed CRC with the CRC received from the sender.
ACK field: This is the receiver’s acknowledgment. In other protocols, a separate packet for an acknowledgment is sent after receiving all the packets, but in case of CAN protocol, no separate packet is sent for an acknowledgment. EOF: EOF stands for end of frame. It contains 7 consecutive recessive bits known End of frame. Now we will see how data is transmitted through the CAN network. A CAN network consists of multiple of CAN nodes.
In the above case, we have considered three CAN nodes, and named them as node A, node B, and node C. A host is a microcontroller or microprocessor which is running some application to do a specific job. A host decides what the received message means and what message it should send next. CAN controller deals with the communication functions described by the CAN protocol. It also triggers the transmission, or the reception of the CAN messages.
CAN transceiver is responsible for the transmission or the reception of the data on the CAN bus. It converts the data signal into the stream of data collected from the CAN bus that the CAN controller can understand. In the above diagram, unshielded twisted pair cable is used to transmit or receive the data. It is also known as CAN bus, and CAN bus consists of two lines, i.
CAN low line and CAN high line, which are also known as CANH and CANL, respectively. The transmission occurs due to the differential voltage applied to these lines. The CAN uses twisted pair cable and differential voltage because of its environment. The above figure is the voltage graph that shows the voltage level of CAN low and CAN high. In CAN terminology, logic 1 is said to be recessive while logic 0 is dominant. When CAN high line and CAN low line are applied with 2.