SlideShare a Scribd company logo
1 of 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

More Related Content

What's hot (20)

I2 c protocol
I2 c protocolI2 c protocol
I2 c protocol
 
I2C And SPI Part-23
I2C And  SPI Part-23I2C And  SPI Part-23
I2C And SPI Part-23
 
I2C BUS PROTOCOL
I2C BUS PROTOCOLI2C BUS PROTOCOL
I2C BUS PROTOCOL
 
Uart
UartUart
Uart
 
Serial Peripheral Interface
Serial Peripheral InterfaceSerial Peripheral Interface
Serial Peripheral Interface
 
I2C
I2CI2C
I2C
 
I2C
I2CI2C
I2C
 
I2 c
I2 cI2 c
I2 c
 
UART(universal asynchronous receiver transmitter ) PPT
UART(universal asynchronous receiver transmitter ) PPTUART(universal asynchronous receiver transmitter ) PPT
UART(universal asynchronous receiver transmitter ) PPT
 
I2 c bus
I2 c busI2 c bus
I2 c bus
 
UART
UARTUART
UART
 
The I2C Interface
The I2C InterfaceThe I2C Interface
The I2C Interface
 
Serial peripheral Interface - Embedded System Protocol
Serial peripheral Interface - Embedded System ProtocolSerial peripheral Interface - Embedded System Protocol
Serial peripheral Interface - Embedded System Protocol
 
UART
UARTUART
UART
 
APB protocol v1.0
APB protocol v1.0APB protocol v1.0
APB protocol v1.0
 
I2C BUS
I2C BUSI2C BUS
I2C BUS
 
Advance Peripheral Bus
Advance Peripheral Bus Advance Peripheral Bus
Advance Peripheral Bus
 
I2C-Bus Design and Verification Specs
I2C-Bus Design and Verification SpecsI2C-Bus Design and Verification Specs
I2C-Bus Design and Verification Specs
 
axi protocol
axi protocolaxi protocol
axi protocol
 
SPI Protocol in LPC2148
SPI  Protocol in LPC2148SPI  Protocol in LPC2148
SPI Protocol in LPC2148
 

Viewers also liked

Serial peripheral interface
Serial peripheral interfaceSerial peripheral interface
Serial peripheral interfaceAbhijeet kapse
 
Serial Peripherical Interface (SPI)
Serial Peripherical Interface (SPI)Serial Peripherical Interface (SPI)
Serial Peripherical Interface (SPI)OswST
 
Serial Peripheral Interface
Serial Peripheral InterfaceSerial Peripheral Interface
Serial Peripheral InterfaceChirag Parikh
 
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
 
Spi in arm7(lpc2148)
Spi in arm7(lpc2148)Spi in arm7(lpc2148)
Spi in arm7(lpc2148)Aarav Soni
 

Viewers also liked (16)

Serial peripheral interface
Serial peripheral interfaceSerial peripheral interface
Serial peripheral interface
 
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
 
Serial Peripheral Interface
Serial Peripheral InterfaceSerial Peripheral Interface
Serial Peripheral Interface
 
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 in arm7(lpc2148)
Spi in arm7(lpc2148)Spi in arm7(lpc2148)
Spi in arm7(lpc2148)
 

Similar to 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
 

Similar to 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
 

Recently uploaded

DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesMayuraD1
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxMuhammadAsimMuhammad6
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxSCMS School of Architecture
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersMairaAshraf6
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiessarkmank1
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...drmkjayanthikannan
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"mphochane1998
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilVinayVitekari
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdfKamal Acharya
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxchumtiyababu
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadhamedmustafa094
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARKOUSTAV SARKAR
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdfKamal Acharya
 

Recently uploaded (20)

DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to Computers
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 

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.