_TOP_MENU

Aug 18, 2021

Difference between I2C or CAN protocol ?


There are many differences between CAN and I2C.

-> If it’s on the inside of my car, I want it to be CAN, so that it’s compatible. If it’s on the inside of my computer, it better be I2C.

The two protocols have almost no overlapping applications due to physical conditions alone.

That said, it’s clear that I2C is more technically advanced. But then it doesn’t have to live in the engine compartment.

-> The very first is the physical layer of protocol applications. CAN uses differential signal technology to transfer its data from one node to another. 

we need transceiver IC (eg. MCP 2551) along with CAN controller IC( eg MCP 2510 ) to convert TTL logic in differential levels. 

whereas in case of I2C, simply two wires or tracks are used to carry data from one node to another. only TTL signals travel on the bus.

-> Though both protocols use bus topology, function wise those are different. in I2C, message can be received only by intended device. 

since in I2C, first link is established between two devices, then transfer will begin. therefore, though it is a bus topology, at a time only two devices can participate in communication.

In case of CAN, message is broadcast by the transmitter and whichever node having address of transmitter in its receiver filter can receive the message from the bus and generate acknowledge.

-> I2C is a short distance protocol since clock travels along the data and clock can not be modulated. hence, it must be limited to short distance.

in CAN, only data travels on the bus in differential level form. in differential level form, power loss is minimum and due to reverse polarity on two lines, noise interference is nullified. hence it can be carried over a long distance. In industries, automobiles, airplanes, etc , CAN protocol is highly recommended.

In I2C, devices incapable of generating the clock can be connected in the system (viz. EEPROM, PORT EXPANDER,etc). since, clock line is driven by master and all slaves use the same clock for functioning.

-> In CAN, each node must be able to generate its own clock, as no clock travels on the bus. every node must be able to detect correct bit time to get error free frame.

-> In I2C, only master device can initiate the transfer ie. start command is always sent by the master. then only, slave can take control of SDA line in case of read operation w.r.t. master.

-> In I2C, an acknowledge pulse is used for error detection. whereas in CAN, 15 bit CRC field is used for error detection.

-> In I2C, addressing bits are 7 bit or 10 bit. In most of the ICs supporting I2C, 7 bit addressing scheme is integrated which allows only 128 devices to be connected in the system. but practically only 8–10 devices can be connected. because as we increase the devices on the bus, bus capacitance also increases which results in reduction of bit rate.

-> In CAN, addressing bits are 11 bits for standard version and 29 bits for extended version. all address bits can be defined by programmer. even the standard mode supports 2^11=2048 devices to be connected on CAN bus.

Table of Contents

Digital Design Interview Question on Synthesis

No comments:

Post a Comment