Thursday 15 June 2017

Embedded

Controller Area Networks (CAN) and Serial Peripheral Interfaces (SPI) are two of the most common such protocols.

Serial Peripheral Interface (SPI) is a clocked serial link. There are Rx and Tx lines, as in a standard serial link, and there is also a clock line. Clocking the data allows greater data transfer speeds. The clock is driven by one side of the interface, which is called the master. Each time the master drives a pulse on the clock line, one bit is transferred in each direction. The Tx line sends out a bit, while the Rx line receives a bit. While this means that the amount of data sent and the amount of data received must be equal, it's trivial to provide dummy data when you don't have anything interesting to send.

Controller Area Network (CAN) is a multi-drop bus protocol(i.e.multi-master serial bus standard for connecting ECUs), The CAN protocol is based on two signals shared by all nodes on the network. The CAN_High and CAN_Low signals provide a differential signal and allow collision detection. If both lines go high, two different nodes must be trying to drive two different signals, and one will then back off and allow the other to continue.
CAN is used in almost every automobile manufactured in Europe. In the U.S., CAN is popular in factory automation.

The biggest difference between CAN and SPI is that the CAN protocol defines packets. In SPI (and serial interfaces in general), only the transmission of a byte is fully defined.

CAN
Controller Area Network is the secure and fast serial communication protocol. CAN is generally used for different device at different location i.e, usually out side of our PCB. CAN is a multi-master serial bus standard for connecting ECUs
Lines: 2 Lines[TX and RX]
Speed: up to 1 Mbit/s

I2C
Inter Integrated Circuit is an official standard serial communication protocol that only requires two signal lines that was designed for communication between chips on a PCB. 
Lines: 2 lines [SCK and SCL]
Speed: 100kbps [faster data transmission modes have been developed over the years to achieve speeds of up to 3.4Mbps]

SPI
Serial Peripheral Interface is a very low power serial protocol. SPI bus is full-duplex bus, which allows communication to flow to and from the master device simultaneously.
Lines: 4 lines [MISO, MOSI, SCK, CS]
Speed: up to 10Mbps

 
  

No comments:

Post a Comment