SlideShare a Scribd company logo
1 of 19
I2C COMMUNICATION
PROTOCOL
PRESENTED BY: SHANKAR
AGENDA
• Overview of I2C
• Features of I2C
• I2C Operation
• Internal circuit
• Fast Open Drain (FOD)
• Start and stop
• Frame format
• Master state machine
• Slave state machine
• General call address
• Bus Arbitration
• Bus capacitance
• Clock stretching
• I2C bus extenders
• I2C bus multiplexers
• I2C bus analyzers and exercisers
• Commonly faced issues
I2C communication is the short form for inter-
integrated circuits.
I2C is a serial protocol for two-wire interface to
connect low-speed devices like microcontrollers,
EEPROMs, A/D and D/A converters, I/O
interfaces and other similar peripherals in
embedded systems.
OVERVIEW OF I2C
FEATURES
OF I2C
• I2C is a synchronous serial communication.
• I2C supports upto 3.4 MBPS speed. Speed can vary
depending on the master and slave capabilities.
• Supported Speeds:
• 100 KBPS(Standard Mode)
• 400 KBPS(Fast Mode)
• 3.4 MBPS(Fast Mode Plus)
• I2C is a Master slave protocol where Master controls the
transactions.
• I2C is Half Duplex bi-directional protocol.
• Data length is fixed to 8 bits unlike in UART and SPI
where different data byte lengths are possible.
• Slave addressing modes supported are 7 bit and 10 bit.
• Only two lines are required for communication.
I2C
OPERATION
• I2C bus consists of two pins
namely Serial Clock(SCL) and
Serial Data(SDA).
• Devices on the bus can act as
master or slave.
• Bus is entirely controlled by
Master. i.e. only master can
initiate a read/write
transaction.
• Multiple masters and slaves
can be connected on same
bus.
• Each slave should have unique
slave address.
• Master can also act as slave
and can address itself on the
bus.
INTERNAL
CIRCUIT
• Open drain pins are used
for SCL and SDA lines.
• Open drain pins are
dominant 0 logic.
• If one slave is powered OFF,
it won’t impact the
performance of other
devices. Otherwise if one
device got damaged and
pulls the line low, then
entire BUS hangs up.
• Some devices support Fast
Open Drain pins(FOD) to
reduce the rise time of the
SCL and SDA lines.
START AND STOP
• When SCL is high, if SDA line
goes from high to low is treated
as start condition.
• When SCL is high, if SDA line
goes from low to high is treated
as stop condition.
• A start without a stop condition
is treated as Repeated start.
• I2C BUS is treated busy in
between start and stop
conditions. NO OTHER master is
allowed to initiate a transaction
FRAME FORMAT
MASTER STATE MACHINE
SLAVE STATE MACHINE
GENERAL CALL ADDRESS
• The general call address is for addressing every device
connected to the I2C-bus at the same time.
• If a device does require data from a general call address, it
behaves as a slave-receiver.
• The master does not actually know how many devices are
responsive to the general call.
• General call can only write data to slave, not read.
BUS ARBITRATION
• When two masters started to
initiate a transaction at the same
time, i.e. they both initiated a
start condition at the same time,
one which is trying to drive logic
high while the other is driving
low, looses the arbitration. Since
I2C bus is dominant 0, logic 0
takes priority and appears on
the BUS.
BUS CAPACITANCE
• Bus capacitance plays major role
in I2C bus speed.
CLOCK STRETCHING
• I2C devices can slow down
communication
by stretching SCL: During an
SCL low phase, any I2C
device on the bus may
additionally hold down SCL to
prevent it from rising again,
enabling it to slow down the
SCL clock rate or to stop I2C
communication for a while.
• Clock is stretched by the slave
device if clock rate is higher. E.g.
I2C BUS EXTENDERS
• Supports Bidirectional Data
Transfer of I 2C Bus Signals
• Allows Bus Capacitance of 400 pF
on Main I 2C Bus (Sx/Sy Side) and
3000 pF on Transmission Side
(Lx/Ly Side)
• It may also be used for level
translation.
I2C BUS
MULTIPLEXERS
• Sometimes there may be a need
to connect two devices with
same address to single I2C
master. In such cases, an I2C
multiplexer can be used to
communicate to a particular
device.
I2C BUS ANALYZERS AND EXERCISERS
• Logic analyzers like Saleae Logic are used for capturing and
analyzing I2C bus data.
• Aardvark I2C/SPI Host Adapter can be used to do master/slave
I2C transactions.
COMMONLY FACED ISSUES
• No I2C pull-up resistors are connected.
• SCL and SDA are interchanged.
• Conflicting address in the slaves.
• Excessive bus capacitance makes impossible for the bus to
reach logic High.
• Spurious glitches on the lines may be treated as start condition
and the bus may go into busy state.
THANK YOU

More Related Content

What's hot

Serial peripheral Interface - Embedded System Protocol
Serial peripheral Interface - Embedded System ProtocolSerial peripheral Interface - Embedded System Protocol
Serial peripheral Interface - Embedded System ProtocolAditya Porwal
 
I2C Bus (Inter-Integrated Circuit)
I2C Bus (Inter-Integrated Circuit)I2C Bus (Inter-Integrated Circuit)
I2C Bus (Inter-Integrated Circuit)Varun Mahajan
 
I2C BUS
I2C BUSI2C BUS
I2C BUSp_ayal
 
Serial Peripheral Interface
Serial Peripheral InterfaceSerial Peripheral Interface
Serial Peripheral InterfaceAnurag Tomar
 
I2C And SPI Part-23
I2C And  SPI Part-23I2C And  SPI Part-23
I2C And SPI Part-23Techvilla
 
Inter intergrated circuits-communication protocol
Inter intergrated circuits-communication protocolInter intergrated circuits-communication protocol
Inter intergrated circuits-communication protocolRevathi Subramaniam
 
I2c interfacing raspberry pi to arduino
I2c interfacing raspberry pi to arduinoI2c interfacing raspberry pi to arduino
I2c interfacing raspberry pi to arduinoMike Ochtman
 
I2C protocol and DS1307 RTC interfacing
I2C protocol and DS1307 RTC interfacingI2C protocol and DS1307 RTC interfacing
I2C protocol and DS1307 RTC interfacingBhargav Kakadiya
 
Slow peripheral interfaces (i2 c spi uart)
Slow peripheral interfaces (i2 c  spi uart)Slow peripheral interfaces (i2 c  spi uart)
Slow peripheral interfaces (i2 c spi uart)PREMAL GAJJAR
 
Universal synchronous asynchronous receiver transmitter(usart) and AtoD Coverter
Universal synchronous asynchronous receiver transmitter(usart) and AtoD CoverterUniversal synchronous asynchronous receiver transmitter(usart) and AtoD Coverter
Universal synchronous asynchronous receiver transmitter(usart) and AtoD CoverterTejas Shetye
 
Spi in arm7(lpc2148)
Spi in arm7(lpc2148)Spi in arm7(lpc2148)
Spi in arm7(lpc2148)Aarav Soni
 

What's hot (20)

Serial peripheral Interface - Embedded System Protocol
Serial peripheral Interface - Embedded System ProtocolSerial peripheral Interface - Embedded System Protocol
Serial peripheral Interface - Embedded System Protocol
 
I2c buses
I2c busesI2c buses
I2c buses
 
I2C Bus (Inter-Integrated Circuit)
I2C Bus (Inter-Integrated Circuit)I2C Bus (Inter-Integrated Circuit)
I2C Bus (Inter-Integrated Circuit)
 
Lpc2148 i2c
Lpc2148 i2cLpc2148 i2c
Lpc2148 i2c
 
I2C BUS
I2C BUSI2C BUS
I2C BUS
 
I2 c protocol
I2 c protocolI2 c protocol
I2 c protocol
 
Serial Peripheral Interface
Serial Peripheral InterfaceSerial Peripheral Interface
Serial Peripheral Interface
 
I2C And SPI Part-23
I2C And  SPI Part-23I2C And  SPI Part-23
I2C And SPI Part-23
 
I2C Protocol
I2C ProtocolI2C Protocol
I2C Protocol
 
SPI Bus Protocol
SPI Bus ProtocolSPI Bus Protocol
SPI Bus Protocol
 
I2 c bus
I2 c busI2 c bus
I2 c bus
 
Inter intergrated circuits-communication protocol
Inter intergrated circuits-communication protocolInter intergrated circuits-communication protocol
Inter intergrated circuits-communication protocol
 
I2c interfacing raspberry pi to arduino
I2c interfacing raspberry pi to arduinoI2c interfacing raspberry pi to arduino
I2c interfacing raspberry pi to arduino
 
I2C protocol and DS1307 RTC interfacing
I2C protocol and DS1307 RTC interfacingI2C protocol and DS1307 RTC interfacing
I2C protocol and DS1307 RTC interfacing
 
I2C introduction
I2C introductionI2C introduction
I2C introduction
 
SPI Protocol
SPI ProtocolSPI Protocol
SPI Protocol
 
Slow peripheral interfaces (i2 c spi uart)
Slow peripheral interfaces (i2 c  spi uart)Slow peripheral interfaces (i2 c  spi uart)
Slow peripheral interfaces (i2 c spi uart)
 
I2C Protocol
I2C ProtocolI2C Protocol
I2C Protocol
 
Universal synchronous asynchronous receiver transmitter(usart) and AtoD Coverter
Universal synchronous asynchronous receiver transmitter(usart) and AtoD CoverterUniversal synchronous asynchronous receiver transmitter(usart) and AtoD Coverter
Universal synchronous asynchronous receiver transmitter(usart) and AtoD Coverter
 
Spi in arm7(lpc2148)
Spi in arm7(lpc2148)Spi in arm7(lpc2148)
Spi in arm7(lpc2148)
 

Similar to I2 c communication protocol

communication interfaces-Embedded real time systems
communication interfaces-Embedded real time systemscommunication interfaces-Embedded real time systems
communication interfaces-Embedded real time systemsRaghunath reddy
 
Raspberry Pi - Lecture 3 Embedded Communication Protocols
Raspberry Pi - Lecture 3 Embedded Communication ProtocolsRaspberry Pi - Lecture 3 Embedded Communication Protocols
Raspberry Pi - Lecture 3 Embedded Communication ProtocolsMohamed Abdallah
 
UNI T 6- SPI_I2C_Lecture8.pptx
UNI                    T 6- SPI_I2C_Lecture8.pptxUNI                    T 6- SPI_I2C_Lecture8.pptx
UNI T 6- SPI_I2C_Lecture8.pptxnaveen088888
 
serial_busses_i2c.pptx
serial_busses_i2c.pptxserial_busses_i2c.pptx
serial_busses_i2c.pptxSKUP1
 
Peripherals and interfacing
Peripherals  and interfacingPeripherals  and interfacing
Peripherals and interfacingRAMPRAKASHT1
 
Part-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver developmentPart-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver developmentFastBit Embedded Brain Academy
 
UNIT- 3.pptx
UNIT- 3.pptxUNIT- 3.pptx
UNIT- 3.pptxBASKARS53
 
Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Dhaval Kaneria
 
Embedded networking
Embedded networkingEmbedded networking
Embedded networkingArul Kumar
 
An Implementation of I2C Slave Interface using Verilog HDL
An Implementation of I2C Slave Interface using Verilog HDLAn Implementation of I2C Slave Interface using Verilog HDL
An Implementation of I2C Slave Interface using Verilog HDLIJMER
 
Unit II Study of Onchip Peripherals
Unit II Study of Onchip PeripheralsUnit II Study of Onchip Peripherals
Unit II Study of Onchip PeripheralsDr. Pankaj Zope
 
Networks-part17-Bridges-RP1.pptjwhwhsjshh
Networks-part17-Bridges-RP1.pptjwhwhsjshhNetworks-part17-Bridges-RP1.pptjwhwhsjshh
Networks-part17-Bridges-RP1.pptjwhwhsjshhVijayKaran7
 
PLC lecture by raj nayak
PLC lecture by raj nayakPLC lecture by raj nayak
PLC lecture by raj nayakRaj Nayak
 
spi-180501092933-converted.pptx
spi-180501092933-converted.pptxspi-180501092933-converted.pptx
spi-180501092933-converted.pptxsauryakumar3
 
Switched networks (LAN Switching – Switches)
Switched networks (LAN Switching – Switches)Switched networks (LAN Switching – Switches)
Switched networks (LAN Switching – Switches)Fleurati
 

Similar to I2 c communication protocol (20)

communication interfaces-Embedded real time systems
communication interfaces-Embedded real time systemscommunication interfaces-Embedded real time systems
communication interfaces-Embedded real time systems
 
Raspberry Pi - Lecture 3 Embedded Communication Protocols
Raspberry Pi - Lecture 3 Embedded Communication ProtocolsRaspberry Pi - Lecture 3 Embedded Communication Protocols
Raspberry Pi - Lecture 3 Embedded Communication Protocols
 
Serial Busses.pptx
Serial Busses.pptxSerial Busses.pptx
Serial Busses.pptx
 
UNI T 6- SPI_I2C_Lecture8.pptx
UNI                    T 6- SPI_I2C_Lecture8.pptxUNI                    T 6- SPI_I2C_Lecture8.pptx
UNI T 6- SPI_I2C_Lecture8.pptx
 
I2C Protocol
I2C ProtocolI2C Protocol
I2C Protocol
 
serial.ppt
serial.pptserial.ppt
serial.ppt
 
serial.ppt
serial.pptserial.ppt
serial.ppt
 
serial_busses_i2c.pptx
serial_busses_i2c.pptxserial_busses_i2c.pptx
serial_busses_i2c.pptx
 
Peripherals and interfacing
Peripherals  and interfacingPeripherals  and interfacing
Peripherals and interfacing
 
Part-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver developmentPart-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver development
 
UNIT- 3.pptx
UNIT- 3.pptxUNIT- 3.pptx
UNIT- 3.pptx
 
Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)
 
Embedded networking
Embedded networkingEmbedded networking
Embedded networking
 
An Implementation of I2C Slave Interface using Verilog HDL
An Implementation of I2C Slave Interface using Verilog HDLAn Implementation of I2C Slave Interface using Verilog HDL
An Implementation of I2C Slave Interface using Verilog HDL
 
Unit II Study of Onchip Peripherals
Unit II Study of Onchip PeripheralsUnit II Study of Onchip Peripherals
Unit II Study of Onchip Peripherals
 
Microcontroller part 9_v1
Microcontroller part 9_v1Microcontroller part 9_v1
Microcontroller part 9_v1
 
Networks-part17-Bridges-RP1.pptjwhwhsjshh
Networks-part17-Bridges-RP1.pptjwhwhsjshhNetworks-part17-Bridges-RP1.pptjwhwhsjshh
Networks-part17-Bridges-RP1.pptjwhwhsjshh
 
PLC lecture by raj nayak
PLC lecture by raj nayakPLC lecture by raj nayak
PLC lecture by raj nayak
 
spi-180501092933-converted.pptx
spi-180501092933-converted.pptxspi-180501092933-converted.pptx
spi-180501092933-converted.pptx
 
Switched networks (LAN Switching – Switches)
Switched networks (LAN Switching – Switches)Switched networks (LAN Switching – Switches)
Switched networks (LAN Switching – Switches)
 

Recently uploaded

UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 

Recently uploaded (20)

UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 

I2 c communication protocol

  • 2. AGENDA • Overview of I2C • Features of I2C • I2C Operation • Internal circuit • Fast Open Drain (FOD) • Start and stop • Frame format • Master state machine • Slave state machine • General call address • Bus Arbitration • Bus capacitance • Clock stretching • I2C bus extenders • I2C bus multiplexers • I2C bus analyzers and exercisers • Commonly faced issues
  • 3. I2C communication is the short form for inter- integrated circuits. I2C is a serial protocol for two-wire interface to connect low-speed devices like microcontrollers, EEPROMs, A/D and D/A converters, I/O interfaces and other similar peripherals in embedded systems. OVERVIEW OF I2C
  • 4. FEATURES OF I2C • I2C is a synchronous serial communication. • I2C supports upto 3.4 MBPS speed. Speed can vary depending on the master and slave capabilities. • Supported Speeds: • 100 KBPS(Standard Mode) • 400 KBPS(Fast Mode) • 3.4 MBPS(Fast Mode Plus) • I2C is a Master slave protocol where Master controls the transactions. • I2C is Half Duplex bi-directional protocol. • Data length is fixed to 8 bits unlike in UART and SPI where different data byte lengths are possible. • Slave addressing modes supported are 7 bit and 10 bit. • Only two lines are required for communication.
  • 5. I2C OPERATION • I2C bus consists of two pins namely Serial Clock(SCL) and Serial Data(SDA). • Devices on the bus can act as master or slave. • Bus is entirely controlled by Master. i.e. only master can initiate a read/write transaction. • Multiple masters and slaves can be connected on same bus. • Each slave should have unique slave address. • Master can also act as slave and can address itself on the bus.
  • 6. INTERNAL CIRCUIT • Open drain pins are used for SCL and SDA lines. • Open drain pins are dominant 0 logic. • If one slave is powered OFF, it won’t impact the performance of other devices. Otherwise if one device got damaged and pulls the line low, then entire BUS hangs up. • Some devices support Fast Open Drain pins(FOD) to reduce the rise time of the SCL and SDA lines.
  • 7. START AND STOP • When SCL is high, if SDA line goes from high to low is treated as start condition. • When SCL is high, if SDA line goes from low to high is treated as stop condition. • A start without a stop condition is treated as Repeated start. • I2C BUS is treated busy in between start and stop conditions. NO OTHER master is allowed to initiate a transaction
  • 11. GENERAL CALL ADDRESS • The general call address is for addressing every device connected to the I2C-bus at the same time. • If a device does require data from a general call address, it behaves as a slave-receiver. • The master does not actually know how many devices are responsive to the general call. • General call can only write data to slave, not read.
  • 12. BUS ARBITRATION • When two masters started to initiate a transaction at the same time, i.e. they both initiated a start condition at the same time, one which is trying to drive logic high while the other is driving low, looses the arbitration. Since I2C bus is dominant 0, logic 0 takes priority and appears on the BUS.
  • 13. BUS CAPACITANCE • Bus capacitance plays major role in I2C bus speed.
  • 14. CLOCK STRETCHING • I2C devices can slow down communication by stretching SCL: During an SCL low phase, any I2C device on the bus may additionally hold down SCL to prevent it from rising again, enabling it to slow down the SCL clock rate or to stop I2C communication for a while. • Clock is stretched by the slave device if clock rate is higher. E.g.
  • 15. I2C BUS EXTENDERS • Supports Bidirectional Data Transfer of I 2C Bus Signals • Allows Bus Capacitance of 400 pF on Main I 2C Bus (Sx/Sy Side) and 3000 pF on Transmission Side (Lx/Ly Side) • It may also be used for level translation.
  • 16. I2C BUS MULTIPLEXERS • Sometimes there may be a need to connect two devices with same address to single I2C master. In such cases, an I2C multiplexer can be used to communicate to a particular device.
  • 17. I2C BUS ANALYZERS AND EXERCISERS • Logic analyzers like Saleae Logic are used for capturing and analyzing I2C bus data. • Aardvark I2C/SPI Host Adapter can be used to do master/slave I2C transactions.
  • 18. COMMONLY FACED ISSUES • No I2C pull-up resistors are connected. • SCL and SDA are interchanged. • Conflicting address in the slaves. • Excessive bus capacitance makes impossible for the bus to reach logic High. • Spurious glitches on the lines may be treated as start condition and the bus may go into busy state.