Presentation is loading. Please wait.

Presentation is loading. Please wait.

SERIAL BUS COMMUNICATION PROTOCOLS

Similar presentations


Presentation on theme: "SERIAL BUS COMMUNICATION PROTOCOLS"— Presentation transcript:

1 SERIAL BUS COMMUNICATION PROTOCOLS
𝐈 𝟐 𝐂 & CAN

2 SERIAL BUS COMMUNICATION PROTOCOLS

3 Introduction to I2C I2C is well known bus invented by PHILIPS.
I2C stands for INTER-INTEGRATED CIRCUIT. These type of bus is famous in TV circuit board and then it come to computer environment. It has speed of 100kbs but it can be extended to 450kbps. But only the problem is our processor has a capability of I2C protocol bus inbuilt.

4 Technical Specifications
The I2C Bus has two lines that carry its signals − one line is for clock named as SCL and second is for data named as SDL. By using I2C protocol the master can address 127 slaves at an instances. It has a processing element functionally as a bus controller or a microcontroller with I2C bus interface circuits.

5 Bit format of I2C

6 Brief introduction by video session

7 State Diagram of I2C Bus Master
Address Start Idle Address Address 1 Start Start Stop DATA Read DATA Write Get DATA Send DATA Stop

8 SERIAL BUS COMMUNICATION PROTOCOLS
CAN Protocol

9 Serial Communication Distributed Control Area Network (CAN) Bus
Example - a network of embedded systems in automobile It has a speed of 1 Mbps as a data rate It uses Multi-master bus. CAN Module are required

10 CANBUS and the OSI Model
CAN is a closed network – no need for security, sessions or logins. - no user interface requirements. Physical and Data Link layers in silicon. OSI:-> Open Systems Interconnection

11 Conventional multi-wire looms
CANBUS Physical Layer Physical medium – two wires terminated at both ends by resistors. Differential signal - better noise immunity. Benefits: Reduced weight, Reduced cost Fewer wires = Increased reliability Conventional multi-wire looms CAN bus network vs.

12 Message Oriented Transmission Protocol
Each node – receiver & transmitter A sender of information transmits to all devices on the bus All nodes read message, then decide if it is relevant to them All nodes verify reception was error-free All nodes acknowledge reception CAN bus © 2005 Microchip Technology Incorporated. All Rights Reserved.

13 Message Format Each message has an ID, Data and overhead.
Data –8 bytes max Overhead – start, end, CRC, ACK

14 Bus Arbitration Arbitration – needed when multiple nodes try to transmit at the same time Only one transmitter is allowed to transmit at a time. A node waits for bus to become idle Nodes with more important messages continue transmitting CAN bus © 2005 Microchip Technology Incorporated. All Rights Reserved.

15 Lower value = More important
Bus Arbitration Message importance is encoded in message ID. Lower value = More important As a node transmits each bit, it verifies that it sees the same bit value on the bus that it transmitted. A “0” on the bus wins over a “1” on the bus. Losing node stops transmitting, winner continues.

16 CAN protocol There is a CAN controller between the CAN line and the host node. CAN controller ─BIU (Bus Interface Unit) consisting of a buffer and driver Method for arbitration─ CSMA/AMP (Carrier Sense Multiple Access with Arbitration on Message Priority basis)

17 Each Distributed Node Uses:
Twisted Pair Connection up to 40 m – for bi- directional data. Line, which pulls to Logic 1 through a resistor between the line and + 4.5V to +12V. : Line Idle state Logic 1 (Recessive state) Detects Input Presence at the CAN line pulled down to dominant (active) state logic 0 (ground ~ 0V) by a sender to the CAN line

18 Physical Layer It has two states Dominant State(Logic 0)
Recessive State(Logic 1)

19 Data Link Layer Bit Format of CAN Bus
There are 5-fields in CAN data Frame Format and START & STOP Bits Arbitration field Control Field [Specifies the number of bytes of data to follow (0-8)] Data Field CRC Field [cyclic redundancy check code] Acknowledge Field START ARBITRATION FIELD CONTROL DATA ACK END FRAME 1 BIT 12 BITS 6 BITS 0 TO 64 BITS CRC 16 BITS 2 BITS 7 BITS

20 Protocol defined First field in frame bits
First field of 12 bits ─ “Arbitration field”. 11-bit destination address and RTR bit (Remote Transmission Request) Destination device address specified in an 11-bit sub- field and whether the data byte being sent is a data for the device or a request to the device in 1-bit sub-field. Maximum 211 devices can connect a CAN controller in case of 11-bit address field standard

21 Arbitration Field Identifies(11 bits) the device to which data is being sent or request is being made. When RTR bit is at '1', it means this packet is for the device at destination address. If this bit is at '0' (dominant state) it means, this packet is a request for the data from the device.

22 Control Field (6 bits) Second field of 6 bits- control field.
The first bit is for the identifier’s extension. The second bit is always '1'. The last 4 bits specify code for data length

23 Data Field (up-to 8 bytes data)
Third field of 0 to 64 bits Its length depends on the data length code in the control field.

24 CRC Field Fourth field (third if data field has no bit present) of 16 bits─ CRC (Cyclic Redundancy Check) bits. The receiver node uses it to detect the errors, if any, during the transmission

25 ACK Field Fifth field of 2 bits─ First bit 'ACK slot'
ACK = '1 BIT' and receiver sends back '0' in this slot when the receiver detects an error in the reception. Sender after sensing '0' in the ACK slot, generally retransmits the data frame. Second bit 'ACK delimiter' bit. It signals the end of ACK field. If the transmitting node does not receive any acknowledgement of data frame within a specified time slot, it should retransmit.

26 EOF Field Sixth field of 7-bits
end- of- the frame specification and has seven '0's

27 Summary CAN bus – Controller Area Network bus
Primarily used for building ECU (Engine control unit) networks in automotive applications. Two wires OSI - Physical and Data link layers Differential signal - noise immunity 1Mbit/s, 120’ Messages contain up to 8 bytes of data

28 Self Study USB Protocol…………………..!!!


Download ppt "SERIAL BUS COMMUNICATION PROTOCOLS"

Similar presentations


Ads by Google