SlideShare ist ein Scribd-Unternehmen logo
1 von 19
I2C PROTOCOL
Inter–Integrated Circuit Communication Protocol
I2C Protocol
• Introduction to I2C Communication
• How I2CWorks
• I2C DataTransmission
• Devices Communication
• Advantages and Disadvantages of I2C
• Real Life Uses
• Conclusion
Introduction to I2C Communication
I2C combines the best features of SPI and UARTs. With I2C, we can connect
multiple slaves to a single master (like SPI) and you can have multiple masters
controlling single, or multiple slaves. This is really useful when you want to
have more than one microcontrollers logging data to a single memory card or
displaying text to a single LCD.
UART - Universal Asynchronous Receiver/Transmitter driven communication
SPI - Serial Peripheral Interface
Introduction (Contd.)
Like UART communication, I2C only uses two wires to transmit data between devices:
• SDA (Serial Data) –The line for the master and slave to send and receive data.
• SCL (SerialClock) –The line that carries the clock signal.
I2C is a serial communication protocol, so data is transferred bit by bit along a single wire (the
SDA line).
Like SPI, I2C is synchronous, so the output of bits is synchronized to the sampling of bits by a
clock signal shared between the master and the slave.The clock signal is always controlled by
the master.
Introduction (Contd.)
How I2C Works
With I2C, data is transferred in messages. Messages are broken up
into frames of data. Each message has an address frame that contains the
binary address of the slave, and one or more data frames that contain the data
being transmitted. The message also includes start and stop conditions,
read/write bits, and ACK/NACK bits between each data frame:
• Start Condition: The SDA line switches from a high voltage level to a low
voltage level before the SCL line switches from high to low.
• Stop Condition: The SDA line switches from a low voltage level to a high
voltage level after the SCL line switches from low to high.
• Address Frame: A 7 or 10 bit sequence unique to each slave that identifies
the slave when the master wants to talk to it.
• Read/Write Bit: A single bit specifying whether the master is sending data
to the slave (low voltage level) or requesting data from it (high voltage
level).
• ACK/NACK Bit: Each frame in a message is followed by an acknowledge/no-
acknowledge bit. If an address frame or data frame was successfully
received, an ACK bit is returned to the sender from the receiving device.
Steps of I2C Data
Transmission
Inter–Integrated Circuit Communication Protocol
Steps(1-6)
• 1.The master sends the start condition to every connected slave by leaving
SCL high and switching SDA to low:
• 2. The master sends each slave the 7 or 10 bit address of the slave it wants to
communicate with, along with the read/write bit:
• 3. Each slave compares the address sent from the master to its own address.
If the address matches, the slave returns an ACK bit by pulling the SDA line
low for one bit. If the address from the master does not match the slave’s
own address, the slave leaves the SDA line high.
• 4. The master sends or receives the data frame:
• 5. After each data frame has been transferred, the receiving device returns
another ACK bit to the sender to acknowledge successful receipt of the
frame:
• 6.To stop the data transmission, the master sends a stop condition to the
slave by switching SCL high before switching SDA high:
Devices Communication
Master-Slave Relationship
1. Single Master with Multiple Slaves
2. Multiple Masters with Multiple Slaves
Advantages and Disadvantages of I2C
There is a lot to I2C that might make it sound complicated compared to other
protocols, but there are some good reasons why you may or may not want to
use I2C to connect to a particular device:
• Advantages
• Disadvantages
Advantages of I2C Protocol
• Only uses two wires.
• Supports multiple masters and multiple slaves.
• ACK/NACK bit gives confirmation that each frame is transferred
successfully.
• Hardware is less complicated than with UARTs.
• Well known and widely used protocol.
Disadvantages of I2C Protocol
• Slower data transfer rate than SPI.
• The size of the data frame is limited to 8 bits.
• More complicated hardware needed to implement than SPI.
Real Life Uses
We’ll probably find ourself using I2C if we ever build projects that use in
these modules.
• OLED displays
• barometric pressure sensors
• Gyroscope
• accelerometer
Conclusion
• We have presented the salient characteristics of I2C, and we now know
enough about the protocol’s pros and cons to allow for an informed decision
on which serial bus we might choose for a given application.
ThankYou

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

I2C
I2CI2C
I2C
 
Serial Peripheral Interface
Serial Peripheral InterfaceSerial Peripheral Interface
Serial Peripheral Interface
 
I2C Bus (Inter-Integrated Circuit)
I2C Bus (Inter-Integrated Circuit)I2C Bus (Inter-Integrated Circuit)
I2C Bus (Inter-Integrated Circuit)
 
UART
UARTUART
UART
 
I2C BUS PROTOCOL
I2C BUS PROTOCOLI2C BUS PROTOCOL
I2C BUS PROTOCOL
 
Serial peripheral interface
Serial peripheral interfaceSerial peripheral interface
Serial peripheral interface
 
I2C
I2CI2C
I2C
 
AMBA 3 APB Protocol
AMBA 3 APB ProtocolAMBA 3 APB Protocol
AMBA 3 APB Protocol
 
AMBA Ahb 2.0
AMBA Ahb 2.0AMBA Ahb 2.0
AMBA Ahb 2.0
 
Communication protocols - Embedded Systems
Communication protocols - Embedded SystemsCommunication protocols - Embedded Systems
Communication protocols - Embedded Systems
 
I2C And SPI Part-23
I2C And  SPI Part-23I2C And  SPI Part-23
I2C And SPI Part-23
 
APB protocol v1.0
APB protocol v1.0APB protocol v1.0
APB protocol v1.0
 
Introduction about APB Protocol
Introduction about APB ProtocolIntroduction about APB Protocol
Introduction about APB Protocol
 
The I2C Interface
The I2C InterfaceThe I2C Interface
The I2C Interface
 
Serial Peripheral Interface
Serial Peripheral InterfaceSerial Peripheral Interface
Serial Peripheral Interface
 
I2 c
I2 cI2 c
I2 c
 
Spi in arm7(lpc2148)
Spi in arm7(lpc2148)Spi in arm7(lpc2148)
Spi in arm7(lpc2148)
 
PCI express
PCI expressPCI express
PCI express
 
I2 c protocol
I2 c protocolI2 c protocol
I2 c protocol
 
Serial peripheral Interface - Embedded System Protocol
Serial peripheral Interface - Embedded System ProtocolSerial peripheral Interface - Embedded System Protocol
Serial peripheral Interface - Embedded System Protocol
 

Andere mochten auch

I2C BUS
I2C BUSI2C BUS
I2C BUSp_ayal
 
Serial Peripherical Interface (SPI)
Serial Peripherical Interface (SPI)Serial Peripherical Interface (SPI)
Serial Peripherical Interface (SPI)OswST
 
I2C Subsystem In Linux-2.6.24
I2C Subsystem In Linux-2.6.24I2C Subsystem In Linux-2.6.24
I2C Subsystem In Linux-2.6.24Varun Mahajan
 
Spi master core verification
Spi master core verificationSpi master core verification
Spi master core verificationMaulik Suthar
 
Esp8266 hack sonoma county 4/8/2015
Esp8266 hack sonoma county 4/8/2015Esp8266 hack sonoma county 4/8/2015
Esp8266 hack sonoma county 4/8/2015mycal1
 
Digital and Analog IR Sensor Working and Cocepts
Digital and Analog IR Sensor Working and Cocepts Digital and Analog IR Sensor Working and Cocepts
Digital and Analog IR Sensor Working and Cocepts Robo India
 
Serial Communication
Serial CommunicationSerial Communication
Serial CommunicationRashmi
 
Communication Protocol - Arindam Samanta
Communication Protocol - Arindam SamantaCommunication Protocol - Arindam Samanta
Communication Protocol - Arindam Samantasankhadeep
 

Andere mochten auch (15)

I2C BUS
I2C BUSI2C BUS
I2C BUS
 
SPI Protocol
SPI ProtocolSPI Protocol
SPI Protocol
 
Serial Peripherical Interface (SPI)
Serial Peripherical Interface (SPI)Serial Peripherical Interface (SPI)
Serial Peripherical Interface (SPI)
 
Can Bus communication Protocol
Can Bus communication ProtocolCan Bus communication Protocol
Can Bus communication Protocol
 
USB 2.0
USB 2.0USB 2.0
USB 2.0
 
I2C Subsystem In Linux-2.6.24
I2C Subsystem In Linux-2.6.24I2C Subsystem In Linux-2.6.24
I2C Subsystem In Linux-2.6.24
 
Spi master core verification
Spi master core verificationSpi master core verification
Spi master core verification
 
Lecture 10
Lecture 10Lecture 10
Lecture 10
 
Esp8266 hack sonoma county 4/8/2015
Esp8266 hack sonoma county 4/8/2015Esp8266 hack sonoma county 4/8/2015
Esp8266 hack sonoma county 4/8/2015
 
I2c buses
I2c busesI2c buses
I2c buses
 
Digital and Analog IR Sensor Working and Cocepts
Digital and Analog IR Sensor Working and Cocepts Digital and Analog IR Sensor Working and Cocepts
Digital and Analog IR Sensor Working and Cocepts
 
Serial Communication
Serial CommunicationSerial Communication
Serial Communication
 
Rs 232 y rs-485
Rs 232 y rs-485Rs 232 y rs-485
Rs 232 y rs-485
 
Communication Protocol - Arindam Samanta
Communication Protocol - Arindam SamantaCommunication Protocol - Arindam Samanta
Communication Protocol - Arindam Samanta
 
SPI Protocol in LPC2148
SPI  Protocol in LPC2148SPI  Protocol in LPC2148
SPI Protocol in LPC2148
 

Ähnlich wie I2c protocol - Inter–Integrated Circuit 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
 
Inter intergrated circuits-communication protocol
Inter intergrated circuits-communication protocolInter intergrated circuits-communication protocol
Inter intergrated circuits-communication protocolRevathi Subramaniam
 
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
 
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
 
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
 
I2 c and mpu6050 basics
I2 c and mpu6050 basicsI2 c and mpu6050 basics
I2 c and mpu6050 basicsironstein1994
 
Embedded networking
Embedded networkingEmbedded networking
Embedded networkingArul Kumar
 
serial_busses_i2c.pptx
serial_busses_i2c.pptxserial_busses_i2c.pptx
serial_busses_i2c.pptxSKUP1
 
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
 
Deepu Kumar Shah.pptx
Deepu Kumar Shah.pptxDeepu Kumar Shah.pptx
Deepu Kumar Shah.pptxDeepuShah
 
spi-180501092933-converted.pptx
spi-180501092933-converted.pptxspi-180501092933-converted.pptx
spi-180501092933-converted.pptxsauryakumar3
 

Ähnlich wie I2c protocol - Inter–Integrated Circuit 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
 
COM_BASIC.pptx
COM_BASIC.pptxCOM_BASIC.pptx
COM_BASIC.pptx
 
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
 
Inter intergrated circuits-communication protocol
Inter intergrated circuits-communication protocolInter intergrated circuits-communication protocol
Inter intergrated circuits-communication protocol
 
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
 
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
 
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 PRESENTATION.PPT
I2C PRESENTATION.PPTI2C PRESENTATION.PPT
I2C PRESENTATION.PPT
 
Serial Busses.pptx
Serial Busses.pptxSerial Busses.pptx
Serial Busses.pptx
 
I2 c and mpu6050 basics
I2 c and mpu6050 basicsI2 c and mpu6050 basics
I2 c and mpu6050 basics
 
Embedded networking
Embedded networkingEmbedded networking
Embedded networking
 
serial_busses_i2c.pptx
serial_busses_i2c.pptxserial_busses_i2c.pptx
serial_busses_i2c.pptx
 
I2C protocol and DS1307 RTC interfacing
I2C protocol and DS1307 RTC interfacingI2C protocol and DS1307 RTC interfacing
I2C protocol and DS1307 RTC interfacing
 
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)
 
Deepu Kumar Shah.pptx
Deepu Kumar Shah.pptxDeepu Kumar Shah.pptx
Deepu Kumar Shah.pptx
 
Introduction to embedded systems
Introduction to embedded systemsIntroduction to embedded systems
Introduction to embedded systems
 
spi-180501092933-converted.pptx
spi-180501092933-converted.pptxspi-180501092933-converted.pptx
spi-180501092933-converted.pptx
 
I2C
I2CI2C
I2C
 
I2 c communication protocol
I2 c communication protocolI2 c communication protocol
I2 c communication protocol
 

Kürzlich hochgeladen

Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
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
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
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
 
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
 
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
 
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
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
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
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
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
 

Kürzlich hochgeladen (20)

Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
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
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
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
 
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...
 
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
 
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...
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
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
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
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, ...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
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
 

I2c protocol - Inter–Integrated Circuit Communication Protocol

  • 2. I2C Protocol • Introduction to I2C Communication • How I2CWorks • I2C DataTransmission • Devices Communication • Advantages and Disadvantages of I2C • Real Life Uses • Conclusion
  • 3. Introduction to I2C Communication I2C combines the best features of SPI and UARTs. With I2C, we can connect multiple slaves to a single master (like SPI) and you can have multiple masters controlling single, or multiple slaves. This is really useful when you want to have more than one microcontrollers logging data to a single memory card or displaying text to a single LCD. UART - Universal Asynchronous Receiver/Transmitter driven communication SPI - Serial Peripheral Interface
  • 4. Introduction (Contd.) Like UART communication, I2C only uses two wires to transmit data between devices: • SDA (Serial Data) –The line for the master and slave to send and receive data. • SCL (SerialClock) –The line that carries the clock signal. I2C is a serial communication protocol, so data is transferred bit by bit along a single wire (the SDA line). Like SPI, I2C is synchronous, so the output of bits is synchronized to the sampling of bits by a clock signal shared between the master and the slave.The clock signal is always controlled by the master.
  • 6. How I2C Works With I2C, data is transferred in messages. Messages are broken up into frames of data. Each message has an address frame that contains the binary address of the slave, and one or more data frames that contain the data being transmitted. The message also includes start and stop conditions, read/write bits, and ACK/NACK bits between each data frame:
  • 7. • Start Condition: The SDA line switches from a high voltage level to a low voltage level before the SCL line switches from high to low. • Stop Condition: The SDA line switches from a low voltage level to a high voltage level after the SCL line switches from low to high. • Address Frame: A 7 or 10 bit sequence unique to each slave that identifies the slave when the master wants to talk to it. • Read/Write Bit: A single bit specifying whether the master is sending data to the slave (low voltage level) or requesting data from it (high voltage level). • ACK/NACK Bit: Each frame in a message is followed by an acknowledge/no- acknowledge bit. If an address frame or data frame was successfully received, an ACK bit is returned to the sender from the receiving device.
  • 8. Steps of I2C Data Transmission Inter–Integrated Circuit Communication Protocol Steps(1-6)
  • 9. • 1.The master sends the start condition to every connected slave by leaving SCL high and switching SDA to low: • 2. The master sends each slave the 7 or 10 bit address of the slave it wants to communicate with, along with the read/write bit:
  • 10. • 3. Each slave compares the address sent from the master to its own address. If the address matches, the slave returns an ACK bit by pulling the SDA line low for one bit. If the address from the master does not match the slave’s own address, the slave leaves the SDA line high. • 4. The master sends or receives the data frame:
  • 11. • 5. After each data frame has been transferred, the receiving device returns another ACK bit to the sender to acknowledge successful receipt of the frame: • 6.To stop the data transmission, the master sends a stop condition to the slave by switching SCL high before switching SDA high:
  • 13. 1. Single Master with Multiple Slaves 2. Multiple Masters with Multiple Slaves
  • 14. Advantages and Disadvantages of I2C There is a lot to I2C that might make it sound complicated compared to other protocols, but there are some good reasons why you may or may not want to use I2C to connect to a particular device: • Advantages • Disadvantages
  • 15. Advantages of I2C Protocol • Only uses two wires. • Supports multiple masters and multiple slaves. • ACK/NACK bit gives confirmation that each frame is transferred successfully. • Hardware is less complicated than with UARTs. • Well known and widely used protocol.
  • 16. Disadvantages of I2C Protocol • Slower data transfer rate than SPI. • The size of the data frame is limited to 8 bits. • More complicated hardware needed to implement than SPI.
  • 17. Real Life Uses We’ll probably find ourself using I2C if we ever build projects that use in these modules. • OLED displays • barometric pressure sensors • Gyroscope • accelerometer
  • 18. Conclusion • We have presented the salient characteristics of I2C, and we now know enough about the protocol’s pros and cons to allow for an informed decision on which serial bus we might choose for a given application.