i2c protocol

13
Inter-Integrated Circuit Protocol Presented By Abhijeet Kapse

Upload: zenith-system-solutions

Post on 24-May-2015

1.315 views

Category:

Education


3 download

DESCRIPTION

Communication Protocol

TRANSCRIPT

Page 1: I2C Protocol

Inter-Integrated Circuit Protocol

Presented By

Abhijeet Kapse

Page 2: I2C Protocol

Contents

• History• Basic Characteristics• Overview• Advantages• Disadvantages• Application• Comparison

Page 3: I2C Protocol

History

• Before 1980’s in Tv Sets- Microcontroller connected to each peripheral by wire

• Complex and Bulky Structure

• Philips Developed Two wired Protocol-I2C

• Reduced Complexity

Page 4: I2C Protocol

Basic Characteristics

• Two wired bus

• Speed

Normal mode-100kbps

Fast mode-400kbps

High Speed mode-3.4mbps

• Data Transfer: Serial,8 bit oriented , bidirectional

• Master slave approach with multimaster option

• Addressing-7 bit or 10 bit unique addressing

Page 5: I2C Protocol

Overview :

• SCL : Serial Clock Line

• SDA : Serial Data Line

• Data transfer between devices connected to the bus

• Master Slave Approach

Page 6: I2C Protocol

Overview :Terms

• Transmitter – The device sending data to the bus

• Receiver – Device receiving data from the bus

• Master – device initiating a transfer, generates to clock and terminates a transfer

• Slave – Device addressed by the master

• Multi-master – more than one master can attempt to control the bus

• Arbitration – procedure to insure that only one master has control of ther bus at any instant

• Synchronization – procedure to sync then clocks of two or more devices

Page 7: I2C Protocol

Master and Slave

• Master :

- Controls the SCL

- Starts and stops data transfer

- Controls addressing of other devices

• Slave :

- Device address by master

Page 8: I2C Protocol

Device 1Device

2Device

3

SCL

SDA

Rp Rp

+5v

Physical Structure:

Page 9: I2C Protocol

SDA SDA

SCLSCL

Special Start and Stop Conditions:

• Only in Start and Stop conditions SDA is allowed to change while SCL is high• Data transfer mode : SDA is stable when SCL is High

Page 10: I2C Protocol

Data Transfer

• Every Byte put on SDA must be 8 bit long

• Each Byte followed by Acknowledge bit

• Transfer- MSB to LSB

• When SCL is low- Data can be transfer

Page 11: I2C Protocol

Advantages

• Only two signal lines requires

• Flexible data transmission rates

• Each device on the bus is independently addressable

• Devices have a simple Master/Slave relationship

• Capable of handling multiple master communications by providing arbitration and communication collision detection

Page 12: I2C Protocol

Disadvantages• Open Collector driver at master needs pull up resistance 2.2k

on each line

• High Power Requirement

• Low Speed

• Low Throughput

Page 13: I2C Protocol

Comparison : I2C Vs SPI

I2C SPI

Requires only two lines Requires minimum four lines

Low Speed Higher Speed

Half Duplex Full Duplex

Additional Signal select lines not required if devices increases

Additional Signal select lines are required as devices increases

More Power required Less Power Required

Multimaster can be used easily Multimaster is difficult to implement