1. What is CAN and its uses? 

Answer: 1. CAN is a multi-master broadcast serial bus standard for connecting electronic control unit (ECUs).

2. Controller–area network (CAN or CAN-bus) is a vehicle bus standard designed to allow microcontrollers  a devices to communicate with each other within a vehicle without a host computer.

3. CAN is a message-based protocol, designed specifically for automotive applications but now also used in other areas such as industrial automation and medical equipment.

4. The Controller Area Network (CAN) bus is a serial asynchronous bus used in instrumentation applications for industries such as automobiles.

USES:

– More reliably, e.g., fewer plug-in connectors that might cause
errors.
– Wiring less complicated, more economic.
– Easy to implement, changes, too.
– Additional elements (e.g., control units) are easy to integrate.
– Installation place exchangeable without electric problems.
– Wire may be diagnosed.

2.     CAN frame works?

Answer: SOF – 1 Dominant

Arbitration Field – 11 bit Identifier, 1 bit RTR (or) 11 bit, 1SRR, 1IDE, 18 bit, 1RTR

Control Field – IDE, r0, 4 bits (DLC)

Data Field – (0-8) Bytes

CRC Field – 15 bits, Delimiter (1 bit recessive)

ACK Field – 1 bit, Delimiter (1 bit recessive)

EOF – 7 bits recessive

IFS – 3 bits recessive

Types of frames – Data, remote, Error frame and Overload frame

Types of errors – ACK error, Bit error, Stuff error, Form error, CRC error

Error frame – 0-12 superposition flags, 8 recessive (Delimiter)

Overload frame – 0-12 superposition flags, 8 recessive (Delimiter)

3.     Why CAN is having 120 ohms at each end?

Answer: To minimize the reflection reference, to reduce noiseTo ensure that reflection does not cause communication failure, the transmission line must be terminated.

4.     Why CAN is message oriented protocol?

Answer: CAN protocol is a message-based protocol, not an address based protocol. This means that messages are not transmitted from one node to another node based on addresses. Embedded in the CAN message itself is the priority and the contents of the data being transmitted. All nodes in the system receive every message transmitted on the bus (and will acknowledge if the message was properly received). It is up to each node in the system to decide whether the message received should be immediately discarded or kept to be processed. A single message can be destined for one particular node to receive, or many nodes based on the way the network and system are designed. For example, an automotive airbag sensor can be connected via CAN to a safety system router node only. This router node takes in other safety system information and routes it to all other nodes on the safety system network. Then all the other nodes on the safety system network can receive the latest airbag sensor information from the router at the same time, acknowledge if the message was received properly, and decide whether to utilize this information or discard it.

5.     CAN logic what it follows?

Answer: Wired AND logic

6.     What is CAN Arbitration?

Answer: CAN Arbitration is nothing but the node trying to take control on the CAN bus.

7.     How CAN will follow the Arbitration?

Answer: CSMA/CD + AMP (Arbitration on Message Priority)

Two bus nodes have got a transmission request. The bus access method is CSMA/CD+AMP (Carrier Sense Multiple Access with Collision Detection and Arbitration on Message Priority). According to this algorithm both network nodes wait until the bus is free (Carrier Sense). In that case the bus is free both nodes transmit their dominant start bit (Multiple Access). Every bus node reads back bit by bit from the bus during the complete message and compares the transmitted value with the received value. As long as the bits are identical from both transmitters nothing happens. The first time there was a difference – in this example the 7th bit of the message – the arbitration process takes place: Node A transmits a dominant level, node B transmits a recessive level. The recessive level will be overwritten by the dominant level. This is detected by node B because the transmitted value is not equal to the received value (Collision Detection). At this point of time node B has lost the arbitration, stops the transmission of any further bit immediately and switches to receive mode, because the message that has won the arbitration must possibly be processed by this node (Arbitration on Message Priority)

For example, consider three CAN devices each trying to transmit messages:

•  Device 1 – address 433 (decimal or 00110110001 binary)
•  Device 2 – address 154 (00010011010)
•  Device 3 – address 187 (00010111011)

Assuming all three see the bus is idle and begin transmitting at the same time, this is how the arbitration works out. All three devices will drive the bus to a dominant state for the start-of-frame (SOF) and the two most significant bits of each message identifier. Each device will monitor the bus and determine success. When they write bit 8 of the message ID, the device writing message ID 433 will notice that the bus is in the dominant state when it was trying to let it be recessive, so it will assume a collision and give up for now. The remaining devices will continue writing bits until bit 5, then the device writing message ID 187 will notice a collision and abort transmission. This leaves the device writing message ID 154 remaining. It will continue writing bits on the bus until complete or an error is detected. Notice that this method of arbitration will always cause the lowest numerical value message ID to have priority. This same method of bit-wise arbitration and prioritization applies to the 18-bit extension in the extended format as well.

8.     What is the speed of CAN?

Answer: 40m @1Mbps and if the cable length increases will decrease the speed, due to RLC on the cable.

 9.     If master sends 764 and Slave sends 744 which will get the arbitration?

Answer: Starts from MSB, first nibble is same, Master sends 7, slaves also sends 7 the message with more dominant bits will gain the arbitration, lowest the message identifier higher the priority.

10.   Standard CAN and Extended CAN difference?

Answer: Number of identifiers can be accommodated for standard frame are 2power11.

 Number of identifiers more compare to base frame, for extended frame are 2power29.

IDE bit – 1 for extended frame.

IDE bit – 0 for Standard frame.